Skip to content

Instantly share code, notes, and snippets.

@dreadpiratesr
Created November 5, 2015 16:13
Show Gist options
  • Save dreadpiratesr/568d3102d1864a53666c to your computer and use it in GitHub Desktop.
Save dreadpiratesr/568d3102d1864a53666c to your computer and use it in GitHub Desktop.
import socket
import random
import os, sys
import threading
if sys.platform == 'linux' or sys.platform == 'linux2':
clearing = ' clear'
else:
clearing = 'cls'
os.system(clearing)
openrdp = open("rdp.txt","w")
port = 3389
test = 0
print("######################################")
print("# Random RDP Scanner by Cyb3r H4ck3r")
print("# Version 1.0")
print("# Greetz to Team IHC")
print("# http://team-ihc.in")
print("######################################")
broj=input("enter random ip : ")
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
while(test<broj):
ran1 = random.randrange(1,255)
ran2 = random.randrange(1,255)
ran3 = random.randrange(1,255)
ran4 = random.randrange(1,255)
host = "%d.%d.%d.%d" % (ran1, ran2, ran3, ran4)
test=test+1
try:
s.connect((host, port))
s.shutdown(2)
except:
print ("Cannot connect to "+host)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment