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