Forum Moderators: phranque

Message Too Old, No Replies

Python-urllib/1.10

Hyphenational difference or new Version?

         

pendanticist

7:04 pm on Dec 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Either way, this Comcast customer managed to get thru.

[2]68.41.31.*** - - [12/Dec/2003:22:40:34 -0800] "GET / HTTP/1.0" 200 20402 "-" "Python[red]-[/red]urllib/1.10"[/2]

[2]# Block libwww-perl except from AltaVista, Inktomi, and IA Archiver 
RewriteCond %{HTTP_USER_AGENT} libwww-perl/[0-9] [NC]
RewriteCond %{REMOTE_ADDR}!^209\.73\.(1[6-8][0-9]¦19[01])\.
RewriteCond %{REMOTE_ADDR}!^209\.131\.(3[2-9]¦[45][0-9]¦6[0-3])\.
RewriteCond %{REMOTE_ADDR}!^209\.237\.23[2-5]\.
RewriteRule!^(403.*\.html¦robots\.txt)$ - [F]
#
# Block Java and Python URLlib except from Google
RewriteCond %{HTTP_USER_AGENT} ^(Python\.urllib¦Java/?[1-9]\.[0-9]) [NC]
RewriteCond %{REMOTE_ADDR}!^216\.239\.(3[2-9]¦[45][0-9]¦6[0-3])\.
RewriteRule!^(403.*\.html¦robots\.txt)$ - [F][/2]

In
libwww-perl/5.53archive.org
[webmasterworld.com] (Deprecated - Search Engine Spider Identification), Jim posted a block:

[2]<snip> 
#
# Block Java and Python URLlib except from Google
RewriteCond %{HTTP_USER_AGENT} ^(Python.urllib¦Java/?[1-9]\.[0-9]) [NC]
RewriteCond %{REMOTE_ADDR}!^216\.239\.(3[2-9]¦[45][0-9]¦6[0-3])\.
RewriteRule!^403.*\.html$ - [F] [/2]

Note that my Python has a "Hyphen" between Python-urllib rather than a "Dot" Python.urllib.

If this is a new version/variant what would one need to do in order to permit it access to my 403 file?

Does the 'cased' Python URLlib - Python urllib have anything to do with it?

I'm not well versed on this stuff. Since Python has been covered extensively, I thought prudent to ban this one by IP Number for now and ask in case this particular user turns out to be abusive.

Thanks.

Pendanticist.

jdMorgan

10:08 pm on Dec 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The case should make no difference, because of the [NC] flag.

The problem is that your code has "Python\.urllib", and the code I posted has "Python.urllib". Therefore, your code only matches a literal "." and the code I posted matches any character between Python and Urllib.

Solution: Drop the "\" in front of the dot.

Jim

pendanticist

7:10 am on Dec 20, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks, Jim. That's just what Laura thought it was.

The recent adjustments took care of this one.

Pendanticist.