mirror of
https://github.com/autistic-symposium/sec-pentesting-toolkit.git
synced 2025-05-02 23:05:11 -04:00
requirements
This commit is contained in:
parent
fc0dea98ec
commit
4e13f2ba45
3 changed files with 46 additions and 0 deletions
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>'
|
Loading…
Add table
Add a link
Reference in a new issue