Skip to content

Commit

Permalink
feat: support disable protocol correction and honeypot checks
Browse files Browse the repository at this point in the history
  • Loading branch information
13ph03nix committed Mar 21, 2023
1 parent ef2282e commit 2ef2bcb
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 1 deletion.
3 changes: 3 additions & 0 deletions manpages/pocsuite.1
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,9 @@ only export request rule
.TP
\fB\-\-rule\-filename\fR RULE_FILENAME
Specify the name of the export rule file
.TP
\fB\-\-no\-check\fR
Disable URL protocol correction and honeypot check
.SS "Poc options:"
.IP
definition options for PoC
Expand Down
2 changes: 2 additions & 0 deletions pocsuite.ini
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ rule = False
rule_req = False
; specify the name of the export rule file
rule_filename =
; Disable URL protocol correction and honeypot check
no_check =

[Poc options]
; show all definition options
Expand Down
1 change: 1 addition & 0 deletions pocsuite3/lib/core/option.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,7 @@ def _set_conf_attributes():
conf.rule = False
conf.rule_req = False
conf.rule_filename = None
conf.no_check = False
conf.show_options = False
conf.enable_tls_listener = False

Expand Down
3 changes: 2 additions & 1 deletion pocsuite3/lib/core/optiondict.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@
'pcap': 'boolean',
'rule': 'boolean',
'rule_req': 'boolean',
'rule_filename': 'string'
'rule_filename': 'string',
'no_check': 'boolean'
},
'Poc options': {
'show_options': 'boolean'
Expand Down
3 changes: 3 additions & 0 deletions pocsuite3/lib/core/poc.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,9 @@ def execute(self, target, headers=None, params=None, mode='verify', verbose=True
return output

def _check(self, dork='', allow_redirects=False, return_obj=False, is_http=True, honeypot_check=True):
if conf.get('no_check', False):
return True

u = urlparse(self.url)
# the port closed
if u.port and not check_port(u.hostname, u.port):
Expand Down
1 change: 1 addition & 0 deletions pocsuite3/lib/core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@
"rule",
"rule-req",
"rule-filename",
"no-check",
"options",

# other
Expand Down
2 changes: 2 additions & 0 deletions pocsuite3/lib/parse/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ def cmd_line_parser(argv=None):
help="only export request rule")
optimization.add_argument("--rule-filename", dest="rule_filename", action="store", default=False,
help="Specify the name of the export rule file")
optimization.add_argument("--no-check", dest="no_check", action="store_true", default=False,
help="Disable URL protocol correction and honeypot check")
# Diy options
diy = parser.add_argument_group("Poc options", "definition options for PoC")
diy.add_argument("--options", dest="show_options", action="store_true", default=False,
Expand Down
2 changes: 2 additions & 0 deletions tests/test_configfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ def test_build_ini(self):
help="only export request rule")
optimization.add_option("--rule-filename", dest="rule_filename", action="store", default=False,
help="Specify the name of the export rule file")
optimization.add_option("--no-check", dest="no_check", action="store_true", default=False,
help="Disable URL protocol correction and honeypot check")

# Diy options
diy_options = OptionGroup(parser, "Poc options", "definition options for PoC")
Expand Down

0 comments on commit 2ef2bcb

Please sign in to comment.