Skip to content

Commit 051d018

Browse files
committed
Import Fixes and Version Bump
1 parent cc2c837 commit 051d018

File tree

4 files changed

+24
-24
lines changed

4 files changed

+24
-24
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ python3 -m pip install --upgrade build
143143

144144
python3 -m build
145145

146-
python3 -m pip install dist/forbidden-12.3-py3-none-any.whl
146+
python3 -m pip install dist/forbidden-12.4-py3-none-any.whl
147147
```
148148

149149
## Single URL
@@ -427,8 +427,8 @@ Inject at the end of the URL path only if it does not end with forward slash.
427427
],
428428
"cookies": [],
429429
"body": null,
430-
"user_agent": "Forbidden/12.3",
431-
"command": "curl --connect-timeout 60 -m 60 -iskL --max-redirs 10 --path-as-is -A 'Forbidden/12.3' -H 'Host: 127.0.0.1' -X 'GET' 'https://example.com:443/admin'",
430+
"user_agent": "Forbidden/12.4",
431+
"command": "curl --connect-timeout 60 -m 60 -iskL --max-redirs 10 --path-as-is -A 'Forbidden/12.4' -H 'Host: 127.0.0.1' -X 'GET' 'https://example.com:443/admin'",
432432
"code": 200,
433433
"length": 255408
434434
},
@@ -441,8 +441,8 @@ Inject at the end of the URL path only if it does not end with forward slash.
441441
],
442442
"cookies": [],
443443
"body": null,
444-
"user_agent": "Forbidden/12.3",
445-
"command": "curl --connect-timeout 60 -m 60 -iskL --max-redirs 10 --path-as-is -A 'Forbidden/12.3' -H 'Host: 127.0.0.1:443' -X 'GET' 'https://example.com:443/admin'",
444+
"user_agent": "Forbidden/12.4",
445+
"command": "curl --connect-timeout 60 -m 60 -iskL --max-redirs 10 --path-as-is -A 'Forbidden/12.4' -H 'Host: 127.0.0.1:443' -X 'GET' 'https://example.com:443/admin'",
446446
"code": 200,
447447
"length": 255408
448448
}
@@ -452,7 +452,7 @@ Inject at the end of the URL path only if it does not end with forward slash.
452452
## Usage
453453

454454
```fundamental
455-
Forbidden v12.3 ( github.com/ivan-sincek/forbidden )
455+
Forbidden v12.4 ( github.com/ivan-sincek/forbidden )
456456
457457
Usage: forbidden -u url -t tests [-f force] [-v values ] [-p path ] [-o out ]
458458
Example: forbidden -u https://example.com/admin -t all [-f POST ] [-v values.txt] [-p /home] [-o results.json]
@@ -527,7 +527,7 @@ SLEEP
527527
-s, --sleep = 500 | etc.
528528
USER AGENT
529529
User agent to use
530-
Default: Forbidden/12.3
530+
Default: Forbidden/12.4
531531
-a, --user-agent = curl/3.30.1 | random[-all] | etc.
532532
PROXY
533533
Web proxy to use
@@ -553,7 +553,7 @@ DEBUG
553553
```
554554

555555
```fundamental
556-
Stresser v12.3 ( github.com/ivan-sincek/forbidden )
556+
Stresser v12.4 ( github.com/ivan-sincek/forbidden )
557557
558558
Usage: stresser -u url -dir directory -r repeat -th threads [-f force] [-o out ]
559559
Example: stresser -u https://example.com/secret -dir results -r 1000 -th 200 [-f GET ] [-o results.json]
@@ -603,7 +603,7 @@ THREADS
603603
-th, --threads = 20 | etc.
604604
USER AGENT
605605
User agent to use
606-
Default: Stresser/12.3
606+
Default: Stresser/12.4
607607
-a, --user-agent = curl/3.30.1 | random[-all] | etc.
608608
PROXY
609609
Web proxy to use

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "forbidden"
7-
version = "12.3"
7+
version = "12.4"
88
authors = [{ name = "Ivan Sincek" }]
99
description = "Bypass 4xx HTTP response status codes and more. Based on PycURL and Python Requests."
1010
readme = "README.md"

src/forbidden/forbidden.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import alive_progress, argparse, base64, colorama, concurrent.futures, copy, datetime, io, json, jwt, os, pycurl, random, regex as re, requests, socket, subprocess, sys, tabulate, tempfile, termcolor, threading, urllib.parse
3+
import alive_progress, argparse, base64, colorama, concurrent.futures, copy, datetime, io, json, jwt, os, pycurl, random, regex as re, requests, socket, sys, tabulate, tempfile, termcolor, threading, time, urllib.parse
44

55
colorama.init(autoreset = True)
66

@@ -334,7 +334,7 @@ def write_file(data, out):
334334

335335
# ----------------------------------------
336336

337-
default_user_agent = "Forbidden/12.3"
337+
default_user_agent = "Forbidden/12.4"
338338

339339
def get_all_user_agents():
340340
tmp = []
@@ -345,7 +345,7 @@ def get_all_user_agents():
345345
line = line.strip()
346346
if line:
347347
tmp.append(line)
348-
return tmp if tmp else [default_agent]
348+
return tmp if tmp else [default_user_agent]
349349

350350
def get_random_user_agent():
351351
tmp = get_all_user_agents()
@@ -708,7 +708,7 @@ def __inspect_cookies(self, cookies = None):
708708
return tmp
709709

710710
def __get_user_agent(self):
711-
return self.__user_agents[random.randint(0, self.__user_agents_len - 1)] if self.__user_agents_len > 1 else self.__user_agents[0]
711+
return self.__user_agents[random.randint(0, self.__user_agents_len - 1)]
712712

713713
def __build_command(self, record):
714714
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"]
@@ -1695,7 +1695,7 @@ def show_results(self):
16951695
class MyArgParser(argparse.ArgumentParser):
16961696

16971697
def print_help(self):
1698-
print("Forbidden v12.3 ( github.com/ivan-sincek/forbidden )")
1698+
print("Forbidden v12.4 ( github.com/ivan-sincek/forbidden )")
16991699
print("")
17001700
print("Usage: forbidden -u url -t tests [-f force] [-v values ] [-p path ] [-o out ]")
17011701
print("Example: forbidden -u https://example.com/admin -t all [-f POST ] [-v values.txt] [-p /home] [-o results.json]")
@@ -2038,7 +2038,7 @@ def main():
20382038
if validate.run():
20392039
print("###########################################################################")
20402040
print("# #")
2041-
print("# Forbidden v12.3 #")
2041+
print("# Forbidden v12.4 #")
20422042
print("# by Ivan Sincek #")
20432043
print("# #")
20442044
print("# Bypass 4xx HTTP response status codes and more. #")

src/stresser/stresser.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

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
44

55
colorama.init(autoreset = True)
66

@@ -201,7 +201,7 @@ def write_file(data, out):
201201

202202
# ----------------------------------------
203203

204-
default_user_agent = "Stresser/12.3"
204+
default_user_agent = "Stresser/12.4"
205205

206206
def get_all_user_agents():
207207
tmp = []
@@ -212,7 +212,7 @@ def get_all_user_agents():
212212
line = line.strip()
213213
if line:
214214
tmp.append(line)
215-
return tmp if tmp else [default_agent]
215+
return tmp if tmp else [default_user_agent]
216216

217217
def get_random_user_agent():
218218
tmp = get_all_user_agents()
@@ -238,7 +238,7 @@ def __init__(self, url, ignore_qsf, ignore_requests, force, headers, cookies, ig
238238
self.__repeat = repeat
239239
self.__threads = threads
240240
self.__user_agents = user_agents
241-
self.__user_agents_len = len(self.__user_agents)
241+
self.__user_agents_len = len(self.__user_agents)
242242
self.__proxy = proxy
243243
self.__status_codes = status_codes
244244
self.__show_table = show_table
@@ -537,7 +537,7 @@ def __inspect_cookies(self, cookies = None):
537537
return tmp
538538

539539
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)]
541541

542542
def __build_command(self, record):
543543
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):
909909
class MyArgParser(argparse.ArgumentParser):
910910

911911
def print_help(self):
912-
print("Stresser v12.3 ( github.com/ivan-sincek/forbidden )")
912+
print("Stresser v12.4 ( github.com/ivan-sincek/forbidden )")
913913
print("")
914914
print("Usage: stresser -u url -dir directory -r repeat -th threads [-f force] [-o out ]")
915915
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):
932932
print("HEADER")
933933
print(" Specify any number of extra HTTP request headers")
934934
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")
936936
print(" -H, --header = \"Authorization: Bearer ey...\" | Content-Type; | etc.")
937937
print("COOKIE")
938938
print(" Specify any number of extra HTTP cookies")
@@ -1187,7 +1187,7 @@ def main():
11871187
if validate.run():
11881188
print("##########################################################################")
11891189
print("# #")
1190-
print("# Stresser v12.3 #")
1190+
print("# Stresser v12.4 #")
11911191
print("# by Ivan Sincek #")
11921192
print("# #")
11931193
print("# Bypass 4xx HTTP response status codes with stress testing. #")

0 commit comments

Comments
 (0)