script detection
cyclotron
cyclotron at gmx.net
Mon Jan 28 08:01:23 EST 2002
> > Is it possible to bypass this detection? How do they detect my script?
>
> There are probably many ways to detect a script. The common approach
> will be that scripts have minimal usage of protocol features, whereas
> full browsers use lots of them.
>
> For example, the typical browser will identify itself to the server,
> so that the server can respond differently depending on whether it is
> Netcrap or the Internet Exploder. If the client does not identify
> itself, it is probably a script.
>
> So unless you do already, you should add browser identification,
> faking to be one of the common browsers. If this still doesn't help,
> you should trace the conversation that the browser has, adding things
> list Host:, Accept:, Connection:, etc.
Ok thanx,
I'm fairly new to Python and I don't know anything about browser
identification. Do I add it with .putheader() ?
my code looks something like that:
------
h = httplib.HTTP('www.domain.com')
h.putrequest('GET', url)
h.putheader('Cookie', 'username=myname%123456789')
h.endheaders()
errcode, errmsg, headers = h.getreply()
f = h.getfile()
print( f.read() )
------
I get a page where it says something about that my login was
successful (so I think the cookie part works) but it also says "We
don't support scripts" in the html code.
How can I fake the browser identification? I couldn't find useful
information about it on the net.
More information about the Python-list
mailing list