自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

Scapy:交互式數(shù)據(jù)包處理工具

安全 數(shù)據(jù)安全
Scapy是一款強(qiáng)大的交互式數(shù)據(jù)包處理工具、數(shù)據(jù)包生成器、網(wǎng)絡(luò)掃描器、網(wǎng)絡(luò)發(fā)現(xiàn)工具和包嗅探工具。

Scapy是一款強(qiáng)大的交互式數(shù)據(jù)包處理工具、數(shù)據(jù)包生成器、網(wǎng)絡(luò)掃描器、網(wǎng)絡(luò)發(fā)現(xiàn)工具和包嗅探工具。它提供多種類別的交互式生成數(shù)據(jù)包或數(shù)據(jù)包集合、對(duì)數(shù)據(jù)包進(jìn)行操作、發(fā)送數(shù)據(jù)包、包嗅探、應(yīng)答和反饋匹配等等功能。Python解釋器提供交互功能,所以要用到Python編程知識(shí)(例如variables、loops、和functions)。支持生成報(bào)告,且報(bào)告生成簡單。

下載鏈接:http://down.51cto.com/data/148110

>>去網(wǎng)絡(luò)安全工具百寶箱看看其它安全工具

scapy2.X安裝

linux下比較方便,直接執(zhí)行下面shell命令即可

  1. $ cd /tmp  
  2. $ wget scapy.net  
  3. $ unzip scapy-latest.zip  
  4. $ cd scapy-2.*  
  5. $ sudo python setup.py install  
  6.  

安裝完后,可以直接從shell里啟動(dòng):(需要root權(quán)限)

  1. root@D-Lab:~/python# scapy  
  2.  
  3. INFO: Can't import python gnuplot wrapper . Won't be able to plot.  
  4.  
  5. INFO: Can't import PyX. Won't be able to use psdump() or pdfdump().  
  6.  
  7. WARNING: No route found for IPv6 destination :: (no default route?)  
  8.  
  9. Welcome to Scapy (2.1.0)  
  10. >>>也可以從Python中導(dǎo)入:  
  11. inpython:  
  12. >>> from scapy import TCP  
  13. Traceback (most recent call last):  
  14. File "<stdin>", line 1in <module>  
  15. ImportError: cannot import name TCP  
  16. >>> from scapy.all import TCP  
  17. WARNING: No route found for IPv6 destination :: (no default route?)  
  18. >>> 

注意導(dǎo)入形式,TCP是里面的一個(gè)對(duì)象,使用from scapy import TCP 時(shí)python報(bào)錯(cuò),要使用from scapy.all import TCP.

Scapy基本使用

conf 命令查看當(dāng)前配置,包括本機(jī)的網(wǎng)絡(luò)配置,其值均為變量,可以修改,例如

conf.verb=1

ls命令

這個(gè)ls命令不是linux里的ls,是在scapy環(huán)境中的命令,其作用也是list show,ls()不帶參數(shù),可以顯示所有支持的數(shù)據(jù)包對(duì)象,種類太多了截取一點(diǎn)點(diǎn)貼出來,常見的包都有,包括Ether ,ip,tcp,udp,icmp,smb等等。

  1. >>> ls()  
  2. ARP        : ARP  
  3. ASN1_Packet : None 
  4. BOOTP      : BOOTP  
  5. CookedLinux : cooked linux  
  6. DHCP       : DHCP options  
  7. DHCP6      : DHCPv6 Generic Message)  
  8. DHCP6OptAuth : DHCP6 Option - Authentication  
  9. DHCP6OptBCMCSDomains : DHCP6 Option - BCMCS Domain Name List  
  10. DHCP6OptBCMCSServers : DHCP6 Option - BCMCS Addresses List  
  11. DHCP6OptClientFQDN : DHCP6 Option - Client FQDN 

ls(),同時(shí)還可以查看具體的包結(jié)構(gòu),我覺得通過這個(gè)軟件學(xué)習(xí)TCP/IP也是很方便的,例如ls(IP)

  1. >>> ls(IP)  
  2. version    : BitField             = (4)  
  3. ihl        : BitField             = (None)  
  4. tos        : XByteField           = (0)  
  5. len        : ShortField           = (None)  
  6. id         : ShortField           = (1)  
  7. flags      : FlagsField           = (0)  
  8. frag       : BitField             = (0)  
  9. ttl        : ByteField            = (64)  
  10. proto      : ByteEnumField        = (0)  
  11. chksum     : XShortField          = (None)  
  12. src        : Emph                 = (None)  
  13. dst        : Emph                 = ('127.0.0.1')  
  14. options    : PacketListField      = ([])  
  15. >>> 

可以看到IP包頭的結(jié)構(gòu),很清晰,“=”后面的是默認(rèn)屬性,在對(duì)象被建立時(shí)或者建立后我們都可以修改。

  1. >>> myip=IP(dst='www.d-up.org',src='192.168.73.1')  
  2. >>> ls(myip)  
  3. version    : BitField             = 4               (4)  
  4. ihl        : BitField             = None            (None)  
  5. tos        : XByteField           = 0               (0)  
  6. len        : ShortField           = None            (None)  
  7. id         : ShortField           = 1               (1)  
  8. flags      : FlagsField           = 0               (0)  
  9. frag       : BitField             = 0               (0)  
  10. ttl        : ByteField            = 64              (64)  
  11. proto      : ByteEnumField        = 0               (0)  
  12. chksum     : XShortField          = None            (None)  
  13. src        : Emph                 = '192.168.73.1' (None)  
  14. dst        : Emph                 = Net('www.d-up.org') ('127.0.0.1')  
  15. options    : PacketListField      = []              ([])  
  16. >>> 

 

責(zé)任編輯:佟健 來源: d-up.org
相關(guān)推薦

2021-05-18 08:00:38

數(shù)據(jù)包處理Scapy

2021-05-26 08:01:25

數(shù)據(jù)包Scapy數(shù)據(jù)安全

2015-10-14 17:59:53

Google數(shù)據(jù)探索交互開發(fā)

2020-12-11 08:00:00

數(shù)據(jù)可視化工具大數(shù)據(jù)

2023-10-16 16:14:32

數(shù)據(jù)中心

2021-04-01 13:25:46

Node命令工具

2022-07-14 14:37:05

Linux軟件開發(fā)工具

2013-09-22 16:22:21

2010-02-24 09:39:25

Python交互式

2023-05-05 18:45:21

Python人工智能機(jī)器學(xué)習(xí)

2015-04-07 09:59:19

SDNSDN管理工具分路器

2019-01-03 09:06:55

Node.js命令行工具 前端

2023-08-11 17:26:51

Pandas數(shù)據(jù)分析Python

2011-03-01 14:23:39

2017-02-17 09:20:24

rtopSSH監(jiān)控

2025-02-25 10:40:00

圖像生成工具模型

2014-07-16 09:32:34

Pinterest

2020-12-31 10:29:05

數(shù)據(jù)可視化可視化工具編碼

2011-06-13 18:54:12

2024-07-25 08:58:16

GradioPython數(shù)據(jù)應(yīng)用
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)