fix nmap
This commit is contained in:
parent
a25430cd17
commit
25bd35db7e
@ -277,8 +277,8 @@ async def on_message(message):
|
|||||||
rejection = await generate_chat_response("Hey Garfield, explain to me why I am dumb for trying to hack your private computer network.")
|
rejection = await generate_chat_response("Hey Garfield, explain to me why I am dumb for trying to hack your private computer network.")
|
||||||
await message.channel.send(rejection)
|
await message.channel.send(rejection)
|
||||||
else:
|
else:
|
||||||
await message.channel.send(f"Scanning {target}, hold on a sec...")
|
await message.channel.send(f"`Scanning {target}...`")
|
||||||
result = subprocess.run(['nmap', '-A', '-Pn', target], capture_output=True, text=True)
|
result = subprocess.run(['nmap', '-Pn', '-O', '-v', target], capture_output=True, text=True)
|
||||||
await message.channel.send(f"`Ping result for {target}: {result.stdout}`")
|
await message.channel.send(f"`Ping result for {target}: {result.stdout}`")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
await message.channel.send(f"`GarfBot Error: {str(e)}`")
|
await message.channel.send(f"`GarfBot Error: {str(e)}`")
|
||||||
|
Loading…
Reference in New Issue
Block a user