Jump to content

getip problem


Recommended Posts

Hey guys

I'm kinda new to the whole autoit thing (3 days) so sorry if this has been posted, i looked but couldn't find it.

I'm making a script to help me at work But i would like to stop it being used at other places. The idea i have is to get it to check the ip its being used from. But _Getip is adding </body></html> to the end of the ip. Anyone know how to get round this?

Here is my script:

#include <getip.au3>

$ip = _Getip ()

$ips = InetGetSize ( "http://www.worksurl.com/"& $ip )

If $ips < 48 Then

MsgBox(4096, "Error", "Unable to continue. You are not authorized to run this program", 5)

Exit

EndIf

If $ips > 48 Then

MsgBox(4096, "Error", "Unable to continue. You are not authorized to run this program", 5)

Exit

EndIf

Thanks in advance for any help.

Link to comment
Share on other sites

Hi,

there are several other ways to protect your script being started from unauthorized people I guess, but nevertheless. Your include should be #include <Inet.au3>.

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

Huge thanks for your VERY quick reply. I been working on it for 4 hours!

As to answer your protecting from unauthorized people, i thought of this way as i can enable it for others if needed.

My other thought was use SQL DB for it. little ott tho.

Thanks again!

Link to comment
Share on other sites

U r Welcome!

Your decision. You can use a password or ...

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

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...