Skip to content

Commit

Permalink
validated double encoding, added triple
Browse files Browse the repository at this point in the history
  • Loading branch information
laluka committed Oct 23, 2024
1 parent 8a305bc commit 40a0ad0
Show file tree
Hide file tree
Showing 2 changed files with 3,979 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/bypass_url_parser/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,13 @@ def _generate_curls(self, url_obj: ParseResult):
target_ip=self.url_resolved_ip, debug=self.debug, ext_logger=self.logger)
self.curl_items.add(item)

# New [char_encode] - Triple URL-Encoding by encoding once more
triple_encoded_path = single_encoded_path.replace(f"%{char_urlencoded}", f"%2525{char_urlencoded}")
cmd = [*self.base_curl, triple_encoded_path]
item = CurlItem(url_obj, self.base_curl, cmd, bypass_mode="char_encode_triple", encoding=self.encoding,
target_ip=self.url_resolved_ip, debug=self.debug, ext_logger=self.logger)
self.curl_items.add(item)

# Verbose/debug print
if self.verbose and not self.dump_payloads:
self.logger.info(f"Payloads to test: {len(self.curl_items)}")
Expand Down
Loading

0 comments on commit 40a0ad0

Please sign in to comment.