Sh1Yo / x8

Hidden parameters discovery suite
GNU General Public License v3.0
1.68k stars 152 forks source link

wordlist from stdin #20

Closed amiremohamadi closed 2 years ago

amiremohamadi commented 2 years ago

beside reading wordlist from file, making x8 to read it from stdin would make it easier to pipe with other tools (like when you pipe commands to create a bug-bounty automation script). we can have it by checking --wordlist flag, if filename provided after the flag, x8 would read the file and consider it as the wordlist file. otherwise it'll read words from stdin. sth like this:

$ x8 -u "https://example.com/" --wordlist <wordlist file>
$ echo 'word1\nword2\nword3' | x8 -u "https://example.com/" --wordlist

If you agree with it, I would be really happy to work on it and send a PR.

Sh1Yo commented 2 years ago

Hi! Usually it's possible to use /dev/stdin as a wordlist: cat ~/.words/params | x8 -u "https://example.com/" -w /dev/stdin is equal to x8 -u "https://example.com/" -w ~/.words/params. Let me know if there're any problems with such an approach.

amiremohamadi commented 2 years ago

thank you for response. honestly that's not protable. is there any equivalent in windows? I mean without creating a file or named pipe.

Sh1Yo commented 2 years ago

I will reopen it and implement sometime then. I don't have much time on developing the tool right now so your PR may help implement the feature faster.

Sh1Yo commented 2 years ago

Thanks again for the PR, I've tested and merged it to the main branch, so I am closing the issue. I will make a new release containing this feature within a few weeks.