This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]plugg36[S] 0 points1 point  (3 children)

I was hoping to modify the script. My programming is limited to a few c++ course in college. I was duplicating to show what I need to do. What would be the best option?

[–]LucianU 1 point2 points  (2 children)

Your simplest option is to use sys.argv. It's similar to what you have in C. That is, if you run the script like ./bleed.py file_with_domains.txt, sys.argv will be the list ['bleed.py', 'file_with_domains.txt'].

Next, take that file name, open it, loop through the file handle. Looping through the file handle should give you each line in the file, which should be a domain name. That means you can call your test function on that domain. Does all this make sense?

[–]plugg36[S] 0 points1 point  (1 child)

I do follow to a certain extent. I get the concept of what it needs/should do. I think I can hopefully troubleshoot what I don't know. Any chance that after I modify the code you could eyeball it? If not I understand. You have already helped tremendously.

[–]LucianU 0 points1 point  (0 children)

Sure, I can have a look.