xnl-h4ck3r/xnLinkFinder

Input file specified two times

fkoussa opened this issue · 7 comments

Hi!

Can't quite figure out what's going on here.
Potential links are 0, and the "Input file specified two times" comes up.

image

A more verbose output

image


When I specify the root domain manually, It still says "Input file specified two times" but yields couple of results.
image

Any idea?

HI @fkoussa
Are you running this on Windows? What version? Are you running in cmd.exe?
If I'm honest, I've only tested on WSL on Windows but I'dd try to look into this issue if I can get a bit more info about your setup and I can reproduce.
Many thanks
Xnl

Also, are you using python 3?

Hi!

Yup, running on a 64bit Windows 11 - Python3.
Tried on both PowerShell and CMD.

  1. Followed the standard python setup.py install
  2. python xnlinkfinder.py <args>

I can confirm it works like a charm on WSL however.

Hi @fkoussa
It's great that it at least works in WSL, so hopefully you can still use it on there for now!
I'll leave this open for now as I'll try to look in a bit more detail at some point.
Thanks for taking the time to report the issue
Xnl

I'll take some time off when I can to look into it and let you know if there is any possible fix.
Thanks

Issue is that the "sort" command being used is Linux specific on line 2092, added a check to do that depending on the OS.

 if args.output != "cli":
            try:
                filePath = os.path.abspath(args.output).replace(" ", "\ ")

                # Fixes the "Input file specified 2 times" error message.
                if os.name != 'nt':
                    cmd = "sort -u -o " + args.output + " " + args.output
                else:
                    cmd = "sort /unique /o " + args.output + " " + args.output
                sort = subprocess.run(
                    cmd, shell=True, text=True, stdout=subprocess.PIPE, check=True
                )

            except Exception as e:
                if vverbose():
                    print(colored("ERROR main 2: " + str(e), "red"))