-2

So I found this tool: https://github.com/elceef/dnstwist and I want to pass a list of domains into that tool then take the output and visualize it. It operates through the command line, but how do I automate entering each domain and process the output automatically as well? By the way I am using colab, so I would need a solution using jupyter notebooks!

Thanks!

5
  • Use the subprocess module to run a program from Python. Commented Feb 18, 2021 at 9:02
  • Thanks for the answer! But how do I pass the output back into python, especially with that banner? Commented Feb 18, 2021 at 9:06
  • The library is written in Python; probably simply import it and call its functions, instead of detouring via the shell. Commented Feb 18, 2021 at 9:10
  • subprocess.Popen() allows you to read the output of the command. Commented Feb 18, 2021 at 9:10
  • Though for simple things you should always prefer subprocess.run() or one of the legacy convenience functions like subprocess.check_output() Commented Feb 18, 2021 at 9:10

1 Answer 1

0

If you want to do this programmatically I would not use the provided cli – although this would also be possible.

Instead you can create a small python script to do this. Import dwintwist in your script and have a look at the main function in dwintwist.py to see how you call this.

Doesn't look to hard, but I don't know your programming skill level of course.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.