Skip to content

Commit f729d3a

Browse files
WillowSauceRWillowSauceR
authored andcommitted
fix auto scan
1 parent 85c9471 commit f729d3a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

send.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,10 @@ def createSocket():
9797

9898
def sendPacket(target: str, port, payloadFile: str, loops, interval):
9999
targetAddr = target
100+
autoScan = port
101+
targetFile, targetInfo = target.split(":")
100102
for i in range(loops):
101103
if ":" in target:
102-
targetFile, targetInfo = target.split(":")
103104
with open(targetFile, "r") as file: #, encoding="utf-8"
104105
fileContent = file.readlines()
105106
contentCount = len(fileContent)
@@ -129,9 +130,8 @@ def sendPacket(target: str, port, payloadFile: str, loops, interval):
129130
except:
130131
if isDisplayMotd:
131132
log(f"Target server offline.")
132-
if ":" in target and int(port) == 8:
133-
targetFile, targetInfo = target.split(":")
134-
os.system(f"py scan.py {targetFile} 10000-21000 nn 0 {targetFile}")
133+
if ":" in target and int(autoScan) == 8:
134+
os.system(f"python scan.py {targetFile} 10000-21000 nn 0 {targetFile}")
135135
#log(f"Sending packet...")
136136
try:
137137
if port == "*":

0 commit comments

Comments
 (0)