Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- #Scans a range and prints a output list of "targets" that have the VNC port open
- import sys
- from scapy import *
- conf.verb=0
- if len(sys.argv) != 2:
- print "Usage: ./vnc_scan.py <target>"
- print "Where <target> is a range like 192.168.1.0/24"
- sys.exit(1)
- target=sys.argv[1]
- p=IP(dst=target)/TCP(dport=5900, flags="S") # Making the packet :)
- ans,unans=sr(p, timeout=9) # Setting the timeouts :)
- for a in ans:
- if a[1].flags == 2:
- print a[1].src
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement