Jump to content

Recommended Posts

I have a simple txt file on my server. The exact address is http://craftarr.com/Blacklist

I have been trying to troubleshoot why XProTect does not read it, so I wrote a little program to see if I could get it to read, and I cant. I don't know why. I don't know if I need specific server settings or what, but it definitely isnt reading. I can open it in a browser, not sure if that is the same or not.

Global $Name = "bill_michelle@live.com"
Global $pwn = 0
Global $Temp = 0

If INetGet("http://craftarr.com/blacklist.txt", $Temp, 1) = 1 Then
   Local $Str = fileread($Temp)
   filedelete($Temp)
   If StringInStr($Str, $Name) Then
      msgbox(0,"a","Yes")
   Else
      msgbox(0,"a","no")
   EndIf
Else
   msgbox(0, "Bad", "Did not read at all")
EndIf

Maybe someone can point out what I am doing wrong or what settings I need to add so it works?

Link to post
Share on other sites
  • Developers

You have a couple of issues in your script:

1. The var $temp should contain a filename

2. The url is wrong in your script since your webserver is case sensitive.

3. The If is wrong as InetGet returns the bytes received.

Global $Name = "bill_michelle@live.com"
Global $pwn = 0
Global $Temp = "blacklist.txt"

If INetGet("http://craftarr.com/Blacklist.txt", $Temp, 1) Then

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to post
Share on other sites

Thanks Jos, that fixed it :). I was going according to the original script on XProTect.au3

If InetGet($D_Link & "Blacklist.txt", $rtemp, 1) = 1 Then
  $itemp = FileRead($rtemp)
  FileDelete($rtemp)
  If StringInStr($itemp, $X_read003) Or StringInStr($itemp, $ND_Mail) Then mError("This program has been abused and will now close    ", 6, 1)
 EndIf

Once I changed it to 

If InetGet($D_Link & "Blacklist.txt", $rtemp, 1) Then

It worked fine :).

THANK YOU SO MUCH!

Link to post
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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...