Open theamanrawat opened 4 years ago
Have you tried using the -o flag and then the out file? That command removes extra formatting as far as I know.
@jr1221 correct, the -o flag can be used to specify an output file.
Yes I know that -o will remove extra formatting but their is a limitation that it will remove the existing domains from the list
@theamanrawat Ah I see what you're saying now. I haven't seen that many people try to sent the output from console vs. the output flag, but I can understand the use case. The only issue I could see would be duplicate lines in your output file if you test the same domain again. But I'm assuming you would be using this to create a subdomain list for multiple domains in the same file?
I created a similar PR (#269 ) before looking at the changes you made, and realized it's pretty similar. The main difference is that I utilized the built in silent
variable, and added an argument to argparse to toggle it. Previously the silent
variable could only be called when calling Sublist3r as a module in another Python program. This makes the output to console completely silent, which works well when using the -o
toggle, but wouldn't be as useful in your case.
Just wanted to make that clarification, as I felt bad after realizing how similar it was to yours! I do like your solution for appending from the command line.
Basically -s
argument is a combination of silent + output because If we use this then console will only show subdomain and can be saved in file using >>
.
I tested silent variable before adding -s
argument but silent variable is not showing any output If we set it to True so I think it would be better to use an argument because everyone won't change silent variable to True.
When we use Sublist3r like this:
python sublist3r.py -d -n >> subdomains.txt
then Sublist3r banner and other print statement will also saved in subdomains.txt so to prevent this behavior I've added a new argument which will only print the subdomains when needed and Now if we use sublist3r with
-s
argument like this:python sublist3r.py -d -n -s >> subdomains.txt
then only subdomain will be saved to subdomains.txt. Banner and other text will be ignored.