Skip to content

Commit

Permalink
v5.1 - see CHANGELOG.md
Browse files Browse the repository at this point in the history
  • Loading branch information
xnl-h4ck3r committed Mar 9, 2024
1 parent 59dda9e commit 7a17d21
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

- Changed

- If there is a connection error, only show `(Consider passing --scope-prefix argument)` in the error if scope prefix wasn't provided.
- If there is a connection error, only show `(Consider passing --scope-prefix argument)` in the error if scope prefix wasn't provided and it's not the first URL.
- If the passed `-sp`/`--scope-prefix` has any trailing `/` then remove them. This will be taken care of, and will prevent `//` appearing in output links.

- v5.0
Expand Down
8 changes: 5 additions & 3 deletions xnLinkFinder/xnLinkFinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
terminalWidth = 120
waymoreMode = False
waymoreFiles = set()
currentDepth = 1

import re
import os
Expand Down Expand Up @@ -935,7 +936,7 @@ def shouldMakeRequest(url):

def processUrl(url):

global burpFile, zapFile, caidoFile, totalRequests, skippedRequests, failedRequests, userAgent, requestHeaders, tooManyRequests, tooManyForbidden, tooManyTimeouts, tooManyConnectionErrors, stopProgram, waymoreMode, stopProgram, failedPrefixLinks
global burpFile, zapFile, caidoFile, totalRequests, skippedRequests, failedRequests, userAgent, requestHeaders, tooManyRequests, tooManyForbidden, tooManyTimeouts, tooManyConnectionErrors, stopProgram, waymoreMode, stopProgram, failedPrefixLinks, currentDepth

# Choose a random user agent string to use from the current group
userAgent = random.choice(userAgents[currentUAGroup])
Expand Down Expand Up @@ -1096,7 +1097,7 @@ def processUrl(url):
if url.find("://") > 0:
writerr(colored("Connection Error: " + url + " (Please check this is a valid URL)","red"))
else:
if args.scope_prefix == '':
if args.scope_prefix == '' and currentDepth > 1:
writerr(colored("Connection Error: " + url + " (Consider passing --scope-prefix argument)","red"))
else:
writerr(colored("Connection Error: " + url,"red"))
Expand Down Expand Up @@ -1842,12 +1843,13 @@ def printProgressBar(


def processDepth():
global stopProgram, failedPrefixLinks
global stopProgram, failedPrefixLinks, currentDepth
try:
# If the -d (--depth) argument was passed then do another search
# This is only used for URL, std file of URLs, or multiple URLs passed in STDIN
if (urlPassed or stdFile or stdinFile) and args.depth > 1:
for d in range(args.depth - 1):
currentDepth = d
if stopProgram is not None:
break

Expand Down

0 comments on commit 7a17d21

Please sign in to comment.