1
1
#!/usr/bin/env python3
2
2
3
- import alive_progress , argparse , colorama , concurrent .futures , copy , datetime , io , json , os , pycurl , random , regex as re , requests , socket , subprocess , sys , tabulate , tempfile , termcolor , threading , urllib .parse
3
+ import alive_progress , argparse , colorama , concurrent .futures , copy , datetime , io , json , os , pycurl , random , regex as re , requests , socket , sys , tabulate , tempfile , termcolor , threading , time , urllib .parse
4
4
5
5
colorama .init (autoreset = True )
6
6
@@ -201,7 +201,7 @@ def write_file(data, out):
201
201
202
202
# ----------------------------------------
203
203
204
- default_user_agent = "Stresser/12.3 "
204
+ default_user_agent = "Stresser/12.4 "
205
205
206
206
def get_all_user_agents ():
207
207
tmp = []
@@ -212,7 +212,7 @@ def get_all_user_agents():
212
212
line = line .strip ()
213
213
if line :
214
214
tmp .append (line )
215
- return tmp if tmp else [default_agent ]
215
+ return tmp if tmp else [default_user_agent ]
216
216
217
217
def get_random_user_agent ():
218
218
tmp = get_all_user_agents ()
@@ -238,7 +238,7 @@ def __init__(self, url, ignore_qsf, ignore_requests, force, headers, cookies, ig
238
238
self .__repeat = repeat
239
239
self .__threads = threads
240
240
self .__user_agents = user_agents
241
- self .__user_agents_len = len (self .__user_agents )
241
+ self .__user_agents_len = len (self .__user_agents )
242
242
self .__proxy = proxy
243
243
self .__status_codes = status_codes
244
244
self .__show_table = show_table
@@ -537,7 +537,7 @@ def __inspect_cookies(self, cookies = None):
537
537
return tmp
538
538
539
539
def __get_user_agent (self ):
540
- return self .__user_agents [random .randint (0 , self .__user_agents_len - 1 )] if self . __user_agents_len > 1 else self . __user_agents [ 0 ]
540
+ return self .__user_agents [random .randint (0 , self .__user_agents_len - 1 )]
541
541
542
542
def __build_command (self , record ):
543
543
tmp = ["curl" , ("--connect-timeout {0}" ).format (self .__connect_timeout ), ("-m {0}" ).format (self .__read_timeout ), "-iskL" , ("--max-redirs {0}" ).format (self .__max_redirects ), "--path-as-is" ]
@@ -909,7 +909,7 @@ def show_results(self):
909
909
class MyArgParser (argparse .ArgumentParser ):
910
910
911
911
def print_help (self ):
912
- print ("Stresser v12.3 ( github.com/ivan-sincek/forbidden )" )
912
+ print ("Stresser v12.4 ( github.com/ivan-sincek/forbidden )" )
913
913
print ("" )
914
914
print ("Usage: stresser -u url -dir directory -r repeat -th threads [-f force] [-o out ]" )
915
915
print ("Example: stresser -u https://example.com/secret -dir results -r 1000 -th 200 [-f GET ] [-o results.json]" )
@@ -932,7 +932,7 @@ def print_help(self):
932
932
print ("HEADER" )
933
933
print (" Specify any number of extra HTTP request headers" )
934
934
print (" Extra HTTP request headers will not override test's HTTP request headers" )
935
- print (" Semi-colon, in e.g., 'Content-Type;' will expand to an empty HTTP request header" )
935
+ print (" Semi-colon in, e.g., 'Content-Type;' will expand to an empty HTTP request header" )
936
936
print (" -H, --header = \" Authorization: Bearer ey...\" | Content-Type; | etc." )
937
937
print ("COOKIE" )
938
938
print (" Specify any number of extra HTTP cookies" )
@@ -1187,7 +1187,7 @@ def main():
1187
1187
if validate .run ():
1188
1188
print ("##########################################################################" )
1189
1189
print ("# #" )
1190
- print ("# Stresser v12.3 #" )
1190
+ print ("# Stresser v12.4 #" )
1191
1191
print ("# by Ivan Sincek #" )
1192
1192
print ("# #" )
1193
1193
print ("# Bypass 4xx HTTP response status codes with stress testing. #" )
0 commit comments