Skip to content

Instantly share code, notes, and snippets.

@j105rob
Created June 25, 2013 20:08
Show Gist options
  • Save j105rob/5861907 to your computer and use it in GitHub Desktop.
Save j105rob/5861907 to your computer and use it in GitHub Desktop.
update
import time
from random import randint
import os
import sys
from subprocess import call
#os.system('curl')
def accessDocs(proxy):
temp = ["manual.pdf", "altamira.docx", "ajpresentation.pptx"]
tempIdx = randint(0,2)
req = "curl -m 4 -x "+ proxy + " 64.128.162.157/docs/"+temp[tempIdx]
os.system(req)
def accessImages(proxy):
temp = ["somePic.jpg", "logo.jpg", "banner.png"]
tempIdx = randint(0, 2)
req = "curl -m 4 -x "+ proxy + " 64.128.162.157/images/"+temp[tempIdx]
os.system(req)
def accessMisc(proxy):
req = "curl -m 4 -x "+ proxy + " 64.128.162.157/misc/presentation.zip"
os.system(req)
def accessMusic(proxy):
temp = ["backmusic.mp3", "click.wav", "sidebar.wav", "transition.mp3", "welcome.mp3"]
tempIdx = randint(0, 4)
req = "curl -m 4 -x "+ proxy + " 64.128.162.157/music/"+temp[tempIdx]
os.system(req)
def accessStyle(proxy):
os.system("curl -m 4 -x 202.43.188.5:8080 64.128.162.157/stylesheet.css")
counter = 0
try:
while (counter == 0):
#os.system('sleep 0.2')
proxyArray = ['218.108.169.2:82', '202.43.188.5:8080',
'118.97.95.174:80', '218.108.168.170:80', '218.108.168.73:80',
'218.108.168.68:80', '82.128.124.174:8080', '109.207.61.167:8090']
proxyInt = randint(0,7)
proxy = proxyArray[proxyInt]
num = randint(0, 4)
if (num == 0):
accessDocs(proxy)
elif (num == 1):
accessImages(proxy)
elif (num == 2):
accessMisc(proxy)
elif (num == 3):
accessMusic(proxy)
elif (num == 4):
accessStyle(proxy)
except KeyboardInterrupt:
print "Done."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment