Jump to content

htaccess issue with autoit code help


Champak
 Share

Recommended Posts

I have the following in my htaccess file

1/

# block http 1.0 and no language
RewriteCond %{THE_REQUEST} HTTP/1\.0
RewriteCond %{HTTP:Accept-language} ^$ [NC]
RewriteRule ^(.*)$ /void.php [END]

is causing this to fail.

        $Crawler_URL = GUICtrlRead($GUI_Crawler_URLI)
        $CrawlerContent = BinaryToString(InetRead($Crawler_URL,4), 4)

and

2

# block mozilla 4.0 and no language
RewriteCond %{HTTP_USER_AGENT} Mozilla/4\.0 [NC]
RewriteCond %{HTTP:Accept-language} ^$ [NC]
RewriteRule ^(.*)$ /void.php [END]

 

is causing this to fail with a 404 error.

            Global $oHTTP = ObjCreate("winhttp.winhttprequest.5.1") ;
            $oHTTP.Open("GET", $Crawler_URL, False)
            $oHTTP.Send()
            ConsoleWrite("! HTTP status: " & $oHTTP.status)

 

What can I do so those pieces of code wont get shut down by my bot security.

 

 

Link to comment
Share on other sites

  • 2 weeks later...

>is causing this to fail with a 404 error.

this indicates that the rewrite to /void.php was executed because the User-Agent or Accept-Language headers were not set properly.

Try to set these headers as follows.

$oHTTP.Open("GET", $Crawler_URL, False)
$oHTTP.setRequestHeader('User-Agent', 'Mozilla/5.0 AU3 Script')
$oHTTP.setRequestHeader('Accept-Language', 'en-US')
$oHTTP.Send()

Br
Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

  • 3 months later...

Thanks, I missed your response. I really use the ObjCreate just to see what happened. What I really need is to set the user agent and language for the inetread. I found to set the user agent with inetread I need to use HttpSetUserAgent, but I can't find how to set the language. Is there a way (and possibly other headers)?

Edited by Champak
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...