File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 55
66localHostIP  =  socket .gethostbyname (socket .gethostname ())
77localHostPort  =  randint (1024 , 65535 )
8- BDSIP  =  str (sys .argv [1 ])
8+ try :
9+     TargetAddr  =  str (sys .argv [1 ])
10+ except :
11+     TargetAddr  =  input ("Target IP: " )
912motdData  =  b'\x01 \x00 \x00 \x00 \x00 $\r \x12 \xd3 \x00 \xff \xff \x00 \xfe \xfe \xfe \xfe \xfd \xfd \xfd \xfd \x12 4Vx\n ' 
1013serverCount  =  0 
1114
@@ -15,7 +18,7 @@ def sendPacket(startNum, count):
1518        Time  =  time .strftime ('%H:%M:%S' )
1619        if  port  %  1000  ==  0 :
1720            print (f"[{ Time }   I] Scaning port: { str (port )}   ~ { str (port  +  1000 )}  " )
18-         send (IP (src = localHostIP , dst = BDSIP ) /  UDP (sport = localHostPort , dport = port ) / 
21+         send (IP (src = localHostIP , dst = TargetAddr ) /  UDP (sport = localHostPort , dport = port ) / 
1922             motdData ,
2023             verbose = False )
2124        if  port  ==  65535 :
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments