Over a million developers have joined DZone.

Fertilizer - Helps In Growing Counters

·
This simple program helps in growing many different counters, often seen on webpages, when started it access the webpage, changing proxies.



import urllib2
import socket
import sys
import os
import string


timeout = 30
socket.setdefaulttimeout(timeout)
ladres=[]

for arg in sys.argv[1:]:
        if  arg == '-u':
                f =urllib2.urlopen('http://proxy-list.org/downloadproxylist.php?
sp=-1&pp=any&pt=any&pc=any&ps=any')
                if os.path.exists('proxy-list.txt'):
                        os.remove('proxy-list.txt')
                writefile = file('proxy-list.txt','w')
                writefile.write(f.read())
                writefile.close()
        else:
                ladres.append(arg)


timeout = 15
socket.setdefaulttimeout(timeout)

if len(ladres)==0:
        ladres.append(raw_input('Podaj adres do zbombardowania:'))


for adres in ladres:
        file = open('proxy-list.txt')
        while 1:
                line=file.readline()
                line.replace("\n","")
                if not line:
                        break
                proxyurl='http://'+line+'/'
                proxy_handler = urllib2.ProxyHandler({'http': proxyurl})
                opener = urllib2.build_opener(proxy_handler)
                try:
                        print line
                        opener.open(adres)
                except urllib2.URLError,e:
                        print e
                except Exception,e1:
                        print e1

Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}