Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

burp.url.getTokens() returns a dictionary

  • Loading branch information...
commit 002224c0e4fd97544732c4050b5fd3a0bedd0120 1 parent 053014f
@mkaziz mkaziz authored
Showing with 6 additions and 8 deletions.
  1. +3 −2 burp/url/tokenizer.py
  2. +3 −6 process_urls.py
View
5 burp/url/tokenizer.py
@@ -35,5 +35,6 @@ def getTokens(url):
raise ValueError("Domain not in global list of TLDs")
subdomain = path_and_port[0].replace(domain, "").strip('.')
- return (subdomain, domain, parsed.port, parsed.path)
-
+ return {"subdomain" : subdomain, "domain" : domain, "port" : parsed.port, "path" : parsed.path}
+
+
View
9 process_urls.py
@@ -80,12 +80,9 @@ def run(self):
domain = ""
try: # tokenizer
- tokens = burp.url.getTokens(url)
- info['subdomain'] = tokens[0]
- info['domain'] = tokens[1]
- domain = tokens[1]
- info['port'] = tokens[2]
- info['path'] = tokens[3]
+ info = burp.url.getTokens(url)
@eromba Owner
eromba added a note

Won't this line replace the entire info dictionary?

Consider using info.update( burp.url.getTokens(url) ) instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ domain = info['domain']
+
except Exception as e:
logFile.write('tokenizer, %s, %s\n' % (url, str(e)))
@eromba

Won't this line replace the entire info dictionary?

Consider using info.update( burp.url.getTokens(url) ) instead.

Please sign in to comment.
Something went wrong with that request. Please try again.