nmap: do not check for length of output
This commit is contained in:
parent
7bc24ca6fc
commit
dfbf0ba7ce
1 changed files with 12 additions and 16 deletions
|
@ -189,9 +189,6 @@ async def on_message(message):
|
|||
ports = []
|
||||
if output.split("\n")[1][:6] == "Failed":
|
||||
mess = await message.reply(embed=guilded.Embed(title=":sweebot-fail: Command Failed!",description="Nmap failed to resolve the domain!"))
|
||||
else:
|
||||
if len(output.split("\n")) < 8:
|
||||
mess = await message.reply(embed=guilded.Embed(title=":sweebot-unknown:",description="Nmap ran successfully, but the output is smaller than usual."))
|
||||
else:
|
||||
ending = False
|
||||
for i, j in enumerate(output.split("\n")):
|
||||
|
@ -206,7 +203,6 @@ async def on_message(message):
|
|||
ports.append(("🟢 " if temp[1] == "open" else "🔴 ") + temp[0] + " (" + temp[2] + ")")
|
||||
else:
|
||||
break
|
||||
|
||||
mess = await message.reply(embed=guilded.Embed(title=":sweebot-success: Found " + str(len(ports)) +" ports",description="\n".join(ports)))
|
||||
print("[" + GREEN + "OK" + RESET + "] '$nmap' executed successfully.")
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue