![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programming Guru
![]() ![]() |
www.1v7.com/drsane/WEB%20COUNTER.zip
Preferred OS: Windows 1) Unzip 2) Open arguments.ini: -- url: this will be the page to be refreshed -- counter: once the program is finished, the page will have been accessed >this times the multiplier< many times -- multiplier: compensates CPU memory for speed, I recommend choosing 10 3) Double click start.pyw 4) At any time if you want to end, double click stop.pyw It's basically just to raise counter and such. It works very well. For me about 1000 page views a minute, or 17 a second. That's FREAKING fast. Proof: http://forums.hackthissite.org/index.php?showforum=14 "A Simple Challenge"'s view count is ridiculous. BWAHAHAEnjoy.
__________________
Looking for tough programming challenges? Try participating in Sane's Monthly Algorithms Challenges! Composing Techno is a little side hobby of mine. Techno by DJ Sane. All free for download. |
|
|
|
|
|
#2 |
|
Hobbyist Programmer
Join Date: Jun 2005
Location: MA, US
Posts: 204
Rep Power: 4
![]() |
Be careful doing that to hosts that aren't yours, they might come at you for attempting to DOS their server. (I know you would need several hundred times this amount of traffic to actually do anything, but it still might piss off some people).
__________________
"A stupid man's report of what a clever man says can never be accurate, because he unconciously translates what he hears into something he can understand." - B. Russell http://web.bryant.edu/~srk2 |
|
|
|
|
|
#3 |
|
Professional Programmer
Join Date: Apr 2005
Location: London, England
Posts: 459
Rep Power: 4
![]() |
Agreed. Kinda like a naughty bot that doesn't sleep between requests.
Bear in mind you should probably change the User-agent header sent by the urllib request (by setting urllib._urlopener your own FancyURLopener subclass that changes the version member variable) because if you get seen as flooding the server with a user-agent of "Python-urllib" then they'll block all access from that. Quite annoying when others want to write quick little web scrapers and access has to the server has been denied. |
|
|
|
|
|
#4 |
|
Programming Guru
![]() ![]() |
Yep! That exact thing just happened to my brother. But instead they just blocked our IP address.
Now I'm trying to make it alter the proxy settings so that it shows up as several different IP addresses. So far I've had no success, because the documentation is scarce and I don't get half the code in the actual urllib2 module. Help please? print 'Importing Modules'
import urllib2 ; from random import choice
print 'Uploading Proxies'
exec urllib2.build_opener().open('http://www.1v7.com/drsane/proxies.dat').read()
print 'Initializing Opener\n'
authinfo = urllib2.HTTPBasicAuthHandler()
authinfo.add_password('realm', 'host', 'username', 'password')
for a in range(0):
proxy = choice(proxies)
url = 'http://whatismyip.com/'
print 'Trying %s at %s'%(proxy, url)
CustomProxy = urllib2.CustomProxy(proxy,proxy,proxy)
proxy_support = urllib2.CustomProxyHandler(CustomProxy)
opener = urllib2.build_opener(proxy_support)
opener.open(url)
__________________
Looking for tough programming challenges? Try participating in Sane's Monthly Algorithms Challenges! Composing Techno is a little side hobby of mine. Techno by DJ Sane. All free for download. |
|
|
|
|
|
#5 |
|
Professional Programmer
Join Date: Apr 2005
Location: London, England
Posts: 459
Rep Power: 4
![]() |
Well, maybe you shouldn't be trying to mask your actions if the hosts are finding that what you're doing is unreasonable. Maybe you should just be a little more patient, and sleep for a couple of seconds in between each hit of the server.
|
|
|
|
|
|
#6 |
|
Programming Guru
![]() ![]() |
I still want to try to figure this out.
![]() It's for my brother. I won't let him carry it out too far.
__________________
Looking for tough programming challenges? Try participating in Sane's Monthly Algorithms Challenges! Composing Techno is a little side hobby of mine. Techno by DJ Sane. All free for download. |
|
|
|
|
|
#7 |
|
Programming Guru
![]() ![]() |
Sorry for ze double post. This is a modified version to see if I can get it to switch to a different IP. It tells you what IP and Port it will try to use, and what it ended up using (which is your IP because it doesn't work...).
import urllib2
from random import choice
def stripIP(page):
x = page.readlines()[3]
x = x.replace('<TITLE>Your IP Is ','');x = x.replace(' WhatIsMyIP.com</TITLE>','');x = x.replace('<TITLE>Your IP - ','');x = x.replace('\n','')
return x
exec urllib2.build_opener().open('http://www.1v7.com/drsane/proxies.dat').read()
proxy = list(choice(proxies).items()[0])
print 'Attempting To Access The URL By\n IP: %s\n Port: %s\n'%(proxy[0],proxy[1])
proxy_support = urllib2.CustomProxyHandler({'http:':'%s:%s'%(proxy[0],proxy[1])})
http_support = urllib2.HTTPHandler()
opener = urllib2.build_opener(proxy_support, http_support)
opener.addheaders = [('User-agent', 'Mozilla/5.0')]
urllib2.install_opener(opener)
newIP = stripIP( urllib2.urlopen('http://whatismyip.com') )
print str(proxy[0] == newIP) + ', The URL Was Accessed By\n IP: ' + newIPI've done all the googling and resourcing I could do, and that's all I can come up with. I hope someone can help. P.S. This is just so my brother can raise a forum view counter on a topic of his without IP blockage.
__________________
Looking for tough programming challenges? Try participating in Sane's Monthly Algorithms Challenges! Composing Techno is a little side hobby of mine. Techno by DJ Sane. All free for download. |
|
|
|
|
|
#8 | |
|
Professional Programmer
Join Date: Apr 2005
Location: London, England
Posts: 459
Rep Power: 4
![]() |
Quote:
That's terribly misleading.. |
|
|
|
|
|
|
#9 |
|
Programming Guru
![]() ![]() |
Okay it works, and it's worked this whole time too. I just needed a valid proxy from Canada, because the ISP sympatico.ca doesn't go past Canada.
Wow all that extra work for nothing. ![]()
__________________
Looking for tough programming challenges? Try participating in Sane's Monthly Algorithms Challenges! Composing Techno is a little side hobby of mine. Techno by DJ Sane. All free for download. |
|
|
|
|
|
#10 |
|
Professional Programmer
Join Date: Apr 2005
Location: London, England
Posts: 459
Rep Power: 4
![]() |
Congrats, and nice sample there
. Just beware of using exec liberally. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|