Skip to content

Commit

Permalink
Stresser Required Arguments Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-sincek committed Dec 29, 2023
1 parent d5188de commit 7b5acd5
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 21 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ python3 -m pip install --upgrade build

python3 -m build

python3 -m pip install dist/forbidden-10.4-py3-none-any.whl
python3 -m pip install dist/forbidden-10.5-py3-none-any.whl
```

## Automation
Expand Down Expand Up @@ -354,8 +354,8 @@ Inject at the end of the URL path only if it does not end with forward slash.
"Host: 127.0.0.1"
],
"body": null,
"user_agent": "Forbidden/10.4",
"command": "curl --connect-timeout 60 -m 90 -iskL --max-redirs 10 --path-as-is -A 'Forbidden/10.4' -H 'Host: 127.0.0.1' -X 'GET' 'https://example.com:443/admin'",
"user_agent": "Forbidden/10.5",
"command": "curl --connect-timeout 60 -m 90 -iskL --max-redirs 10 --path-as-is -A 'Forbidden/10.5' -H 'Host: 127.0.0.1' -X 'GET' 'https://example.com:443/admin'",
"code": 200,
"length": 255408
},
Expand All @@ -367,8 +367,8 @@ Inject at the end of the URL path only if it does not end with forward slash.
"Host: 127.0.0.1:443"
],
"body": null,
"user_agent": "Forbidden/10.4",
"command": "curl --connect-timeout 60 -m 90 -iskL --max-redirs 10 --path-as-is -A 'Forbidden/10.4' -H 'Host: 127.0.0.1:443' -X 'GET' 'https://example.com:443/admin'",
"user_agent": "Forbidden/10.5",
"command": "curl --connect-timeout 60 -m 90 -iskL --max-redirs 10 --path-as-is -A 'Forbidden/10.5' -H 'Host: 127.0.0.1:443' -X 'GET' 'https://example.com:443/admin'",
"code": 200,
"length": 255408
}
Expand All @@ -378,7 +378,7 @@ Inject at the end of the URL path only if it does not end with forward slash.
## Usage

```fundamental
Forbidden v10.4 ( github.com/ivan-sincek/forbidden )
Forbidden v10.5 ( github.com/ivan-sincek/forbidden )
Usage: forbidden -u url -t tests [-f force] [-v values ] [-p path ] [-o out ]
Example: forbidden -u https://example.com/admin -t all [-f POST ] [-v values.txt] [-p /home] [-o results.json]
Expand Down Expand Up @@ -438,7 +438,7 @@ SLEEP
-s, --sleep = 500 | etc.
USER AGENT
User agent to use
Default: Forbidden/10.4
Default: Forbidden/10.5
-a, --user-agent = curl/3.30.1 | random[-all] | etc.
PROXY
Web proxy to use
Expand All @@ -452,7 +452,7 @@ DEBUG
```

```fundamental
Stresser v10.4 ( github.com/ivan-sincek/forbidden )
Stresser v10.5 ( github.com/ivan-sincek/forbidden )
Usage: stresser -u url -dir directory -r repeat -th threads [-f force] [-o out ]
Example: stresser -u https://example.com/secret -dir results -r 1000 -th 200 [-f GET ] [-o results.json]
Expand Down Expand Up @@ -488,7 +488,7 @@ THREADS
-th, --threads = 20 | etc.
USER AGENT
User agent to use
Default: Stresser/10.4
Default: Stresser/10.5
-a, --user-agent = curl/3.30.1 | random[-all] | etc.
PROXY
Web proxy to use
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ build-backend = "setuptools.build_meta"

[project]
name = "forbidden"
version = "10.4"
version = "10.5"
authors = [{ name = "Ivan Sincek" }]
description = "Bypass 4xx HTTP response status codes and more. Based on PycURL and Python Requests."
readme = "README.md"
requires-python = ">=3.7"
requires-python = ">=3.6"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
Expand Down
7 changes: 3 additions & 4 deletions src/forbidden/forbidden.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,6 @@ def read_file(file):
line = line.strip()
if line:
tmp.append(line)
stream.close()
return unique(tmp)

def write_file(data, out):
Expand All @@ -289,7 +288,7 @@ def write_file(data, out):
except FileNotFoundError:
print(("Cannot save results to '{0}'").format(out))

default_user_agent = "Forbidden/10.4"
default_user_agent = "Forbidden/10.5"

def get_all_user_agents():
tmp = []
Expand Down Expand Up @@ -1490,7 +1489,7 @@ def show(self):
class MyArgParser(argparse.ArgumentParser):

def print_help(self):
print("Forbidden v10.4 ( github.com/ivan-sincek/forbidden )")
print("Forbidden v10.5 ( github.com/ivan-sincek/forbidden )")
print("")
print("Usage: forbidden -u url -t tests [-f force] [-v values ] [-p path ] [-o out ]")
print("Example: forbidden -u https://example.com/admin -t all [-f POST ] [-v values.txt] [-p /home] [-o results.json]")
Expand Down Expand Up @@ -1749,7 +1748,7 @@ def main():
if validate.run():
print("###########################################################################")
print("# #")
print("# Forbidden v10.4 #")
print("# Forbidden v10.5 #")
print("# by Ivan Sincek #")
print("# #")
print("# Bypass 4xx HTTP response status codes and more. #")
Expand Down
12 changes: 6 additions & 6 deletions src/stresser/stresser.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def write_file(data, out):
except FileNotFoundError:
print(("Cannot save results to '{0}'").format(out))

default_user_agent = "Stresser/10.4"
default_user_agent = "Stresser/10.5"

def get_all_user_agents():
tmp = []
Expand Down Expand Up @@ -731,7 +731,7 @@ def show(self):
class MyArgParser(argparse.ArgumentParser):

def print_help(self):
print("Stresser v10.4 ( github.com/ivan-sincek/forbidden )")
print("Stresser v10.5 ( github.com/ivan-sincek/forbidden )")
print("")
print("Usage: stresser -u url -dir directory -r repeat -th threads [-f force] [-o out ]")
print("Example: stresser -u https://example.com/secret -dir results -r 1000 -th 200 [-f GET ] [-o results.json]")
Expand Down Expand Up @@ -802,12 +802,12 @@ def __init__(self):
self.__parser.add_argument("-f" , "--force" , required = False, type = str.upper , default = "" )
self.__parser.add_argument("-i" , "--ignore" , required = False, type = str , default = "" )
self.__parser.add_argument("-l" , "--content-lengths" , required = False, type = str.lower , default = "" )
self.__parser.add_argument("-r" , "--repeat" , required = False, type = str , default = "" )
self.__parser.add_argument("-th" , "--threads" , required = False, type = str , default = "" )
self.__parser.add_argument("-r" , "--repeat" , required = True , type = str , default = "" )
self.__parser.add_argument("-th" , "--threads" , required = True , type = str , default = "" )
self.__parser.add_argument("-a" , "--user-agent" , required = False, type = str , default = "" )
self.__parser.add_argument("-x" , "--proxy" , required = False, type = str , default = "" )
self.__parser.add_argument("-o" , "--out" , required = False, type = str , default = "" )
self.__parser.add_argument("-dir" , "--directory" , required = False, type = str , default = "" )
self.__parser.add_argument("-dir" , "--directory" , required = True , type = str , default = "" )
self.__parser.add_argument("-dbg" , "--debug" , required = False, action = "store_true", default = False)

def run(self):
Expand Down Expand Up @@ -926,7 +926,7 @@ def main():
if validate.run():
print("##########################################################################")
print("# #")
print("# Stresser v10.4 #")
print("# Stresser v10.5 #")
print("# by Ivan Sincek #")
print("# #")
print("# Bypass 4xx HTTP response status codes with stress testing. #")
Expand Down

0 comments on commit 7b5acd5

Please sign in to comment.