waymore 4.4__tar.gz → 4.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: waymore
3
- Version: 4.4
3
+ Version: 4.5
4
4
  Summary: Find way more from the Wayback Machine, Common Crawl, Alien Vault OTX, URLScan & VirusTotal!
5
5
  Home-page: https://github.com/xnl-h4ck3r/waymore
6
6
  Author: @xnl-h4ck3r
@@ -15,7 +15,7 @@ Requires-Dist: tldextract
15
15
 
16
16
  <center><img src="https://github.com/xnl-h4ck3r/waymore/blob/main/waymore/images/title.png"></center>
17
17
 
18
- ## About - v4.4
18
+ ## About - v4.5
19
19
 
20
20
  The idea behind **waymore** is to find even more links from the Wayback Machine than other existing tools.
21
21
 
@@ -1,6 +1,6 @@
1
1
  <center><img src="https://github.com/xnl-h4ck3r/waymore/blob/main/waymore/images/title.png"></center>
2
2
 
3
- ## About - v4.4
3
+ ## About - v4.5
4
4
 
5
5
  The idea behind **waymore** is to find even more links from the Wayback Machine than other existing tools.
6
6
 
@@ -0,0 +1 @@
1
+ __version__="4.5"
@@ -1384,11 +1384,15 @@ def getAlienVaultUrls():
1384
1384
  # Carry on if something was found
1385
1385
  if resp.text.lower().find('"error": "') < 0:
1386
1386
 
1387
- # Get the JSON response
1388
- jsonResp = json.loads(resp.text.strip())
1389
-
1390
- # Try to get the number of results
1391
- totalUrls = jsonResp['full_size']
1387
+ try:
1388
+ # Get the JSON response
1389
+ jsonResp = json.loads(resp.text.strip())
1390
+
1391
+ # Try to get the number of results
1392
+ totalUrls = int(jsonResp['full_size'])
1393
+ except:
1394
+ writerr(colored(getSPACER('[ ERR ] There was an unexpected response from the Alien Vault API'),'red'))
1395
+ totalUrls = 0
1392
1396
 
1393
1397
  # If there are results, carry on
1394
1398
  if totalUrls > 0 or args.check_only:
@@ -1588,19 +1592,28 @@ def getURLScanUrls():
1588
1592
  writerr(colored(getSPACER('[ ' + str(resp.status_code) + ' ] Unable to get links from urlscan.io'),'red'))
1589
1593
  return
1590
1594
 
1591
- # Get the JSON response
1592
- jsonResp = json.loads(resp.text.strip())
1595
+ try:
1596
+ # Get the JSON response
1597
+ jsonResp = json.loads(resp.text.strip())
1593
1598
 
1594
- # Get the number of results
1595
- totalUrls = jsonResp['total']
1599
+ # Get the number of results
1600
+ totalUrls = int(jsonResp['total'])
1601
+ except:
1602
+ writerr(colored(getSPACER('[ ERR ] There was an unexpected response from the URLScan API'),'red'))
1603
+ totalUrls = 0
1596
1604
 
1605
+ # Carry on if something was found
1597
1606
  if args.check_only:
1598
- hasMore = jsonResp['has_more']
1599
- if hasMore:
1600
- write(colored('Get URLs from URLScan: ','cyan')+colored('UNKNOWN requests','white'))
1601
- else:
1602
- write(colored('Get URLs from URLScan: ','cyan')+colored('1 request','white'))
1607
+ try:
1608
+ hasMore = jsonResp['has_more']
1609
+ if hasMore:
1610
+ write(colored('Get URLs from URLScan: ','cyan')+colored('UNKNOWN requests','white'))
1611
+ else:
1612
+ write(colored('Get URLs from URLScan: ','cyan')+colored('1 request','white'))
1613
+ except:
1614
+ pass
1603
1615
  checkURLScan = 1
1616
+
1604
1617
  else:
1605
1618
  # Carry on if something was found
1606
1619
  if int(totalUrls) > 0:
@@ -1746,6 +1759,7 @@ def processWayBackPage(url):
1746
1759
  if not stopSource:
1747
1760
  try:
1748
1761
  # Choose a random user agent string to use for any requests
1762
+ resp = None
1749
1763
  userAgent = random.choice(USER_AGENT)
1750
1764
  page = url.split('page=')[1]
1751
1765
  session = requests.Session()
@@ -1817,8 +1831,11 @@ def processWayBackPage(url):
1817
1831
  results = line.decode("utf-8")
1818
1832
  foundUrl = fixArchiveOrgUrl(str(results).split(' ')[1])
1819
1833
 
1820
- # Check the URL exclusions
1821
- match = re.search(r'('+re.escape(FILTER_URL).replace(',','|')+')', foundUrl, flags=re.IGNORECASE)
1834
+ # If --filter-responses-only wasn't used, then check the URL exclusions
1835
+ if args.filter_responses_only:
1836
+ match = None
1837
+ else:
1838
+ match = re.search(r'('+re.escape(FILTER_URL).replace(',','|')+')', foundUrl, flags=re.IGNORECASE)
1822
1839
  if match is None:
1823
1840
  # Only get MIME Types if --verbose option was selected
1824
1841
  if verbose():
@@ -2332,29 +2349,33 @@ def getVirusTotalUrls():
2332
2349
  return
2333
2350
 
2334
2351
  # Get the JSON response
2335
- jsonResp = json.loads(resp.text.strip())
2352
+ try:
2353
+ jsonResp = json.loads(resp.text.strip())
2336
2354
 
2337
- # Get the different URLs
2338
- if args.no_subs:
2339
- subDomains = []
2340
- else:
2355
+ # Get the different URLs
2356
+ if args.no_subs:
2357
+ subDomains = []
2358
+ else:
2359
+ try:
2360
+ subDomains = jsonResp['subdomains']
2361
+ except Exception as e:
2362
+ subDomains = []
2363
+ try:
2364
+ detectedUrls = [entry['url'] for entry in jsonResp.get('detected_urls', [])]
2365
+ except Exception as e:
2366
+ detectedUrls = []
2341
2367
  try:
2342
- subDomains = jsonResp['subdomains']
2368
+ undetectedUrls = [entry[0] for entry in jsonResp.get('undetected_urls', [])]
2343
2369
  except Exception as e:
2344
- subDomains = []
2345
- try:
2346
- detectedUrls = [entry['url'] for entry in jsonResp.get('detected_urls', [])]
2347
- except Exception as e:
2348
- detectedUrls = []
2349
- try:
2350
- undetectedUrls = [entry[0] for entry in jsonResp.get('undetected_urls', [])]
2351
- except Exception as e:
2352
- undetectedUrls = []
2353
- try:
2354
- totalUrls = set(subDomains + detectedUrls + undetectedUrls)
2355
- except Exception as e:
2370
+ undetectedUrls = []
2371
+ try:
2372
+ totalUrls = set(subDomains + detectedUrls + undetectedUrls)
2373
+ except Exception as e:
2374
+ totalUrls = []
2375
+ except:
2376
+ writerr(colored(getSPACER('[ ERR ] There was an unexpected response from the VirusTotal API'),'red'))
2356
2377
  totalUrls = []
2357
-
2378
+
2358
2379
  if args.check_only:
2359
2380
  write(colored('Get URLs from VirusTotal: ','cyan')+colored('1 request','white'))
2360
2381
  checkVirusTotal = 1
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: waymore
3
- Version: 4.4
3
+ Version: 4.5
4
4
  Summary: Find way more from the Wayback Machine, Common Crawl, Alien Vault OTX, URLScan & VirusTotal!
5
5
  Home-page: https://github.com/xnl-h4ck3r/waymore
6
6
  Author: @xnl-h4ck3r
@@ -15,7 +15,7 @@ Requires-Dist: tldextract
15
15
 
16
16
  <center><img src="https://github.com/xnl-h4ck3r/waymore/blob/main/waymore/images/title.png"></center>
17
17
 
18
- ## About - v4.4
18
+ ## About - v4.5
19
19
 
20
20
  The idea behind **waymore** is to find even more links from the Wayback Machine than other existing tools.
21
21
 
@@ -1 +0,0 @@
1
- __version__="4.4"
File without changes
File without changes
File without changes