mirror of
https://github.com/autistic-symposium/sec-pentesting-toolkit.git
synced 2025-04-27 11:09:09 -04:00
requirements
This commit is contained in:
parent
fc0dea98ec
commit
4e13f2ba45
23
Network_and_802.11/scapy/scanning_ip.py
Normal file
23
Network_and_802.11/scapy/scanning_ip.py
Normal file
@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
__author__ = "bt3"
|
||||
|
||||
import sys
|
||||
import random
|
||||
from scapy.all import IP, TCP, send
|
||||
|
||||
def send_syn(dest, src=None, sport=1234, dport=80):
|
||||
pkt = IP(dst=dest,src=src)/TCP(sport=sport,dport=dport,flags="S")
|
||||
send(pkt)
|
||||
|
||||
def scan_ip(dest):
|
||||
for i in range(1, 65535):
|
||||
send_syn(dest, sport=random.randint(21024, 51024))
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
if len(sys.argv) > 1:
|
||||
scan_ip(sys.argv[1])
|
||||
else:
|
||||
print 'Usage: scan_ip <destination>'
|
22
Network_and_802.11/scapy/scanning_port.py
Normal file
22
Network_and_802.11/scapy/scanning_port.py
Normal file
@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
__author__ = "bt3"
|
||||
|
||||
import sys
|
||||
from scapy.all import *
|
||||
|
||||
|
||||
DEST = '192.168.1.25'
|
||||
|
||||
def scan_port():
|
||||
packet=IP(dst=DEST)/TCP(dport=(1,100),flags="S")
|
||||
responded, unanswered = sr(packet, timeout=10, verbose=0)
|
||||
|
||||
print "List of all open ports in " + DEST
|
||||
|
||||
for a in responded:
|
||||
if a[1][1].flags == 18:
|
||||
print a[1].sport
|
||||
|
||||
if __name__ == '__main__':
|
||||
scan_port()
|
1
requirements.txt
Normal file
1
requirements.txt
Normal file
@ -0,0 +1 @@
|
||||
scapy==2.2.0-dev
|
Loading…
x
Reference in New Issue
Block a user