Could somebody please advise me on how I could write a Python script to do these things?
- Change my IP address to some random proxy address.
- Download and display the captcha image and show me the prompt where I can write captcha characters.
- Download the main file.
The script should have one input parameter (the address is similar to one of these):
http://www.filesonic.com/file/212720521/Ubuntu.11.04.part1.rar
http://www.filesonic.com/file/212720541/Ubuntu.11.04.part2.rar
It would be called twice as follows:
python dlsonic.py http://www.filesonic.com/file/212720521/Ubuntu.11.04.part1.rar
python dlsonic.py http://www.filesonic.com/file/212720541/Ubuntu.11.04.part2.rar
Here’s some basic Python to get you started:
To change your IP address, you can use some Linux commands to accomplish this (assuming you’re using ethernet here):
And with Python, you can run these with
os.system():And to handle command line arguments, like
python foo.py bar foo bar bar:As for dealing with the CAPTCHA, that will be tough. Are you sure you can’t just do this manually?