Jump to content

Script Protection


Recommended Posts

Hello.

I've almost finished my script and I want to protect it a simple way.

I don't want users pay it for or something else.

Let's give an example.

I have an application that makes a login to a website (with username and password)

I want that the script, when user insert user and pass, read a serverside file (logins.txt) and check if inputed user is there.

If so, the app continues, if not, shows a MSGBox and exit.

The txt file with usernames should be this way:

user1

user2

user3

Can someone help me how to get this?

This seems to be the easiest mode to protect my app.

Link to comment
Share on other sites

I have an application that makes a login to a website (with username and password)

I want that the script, when user insert user and pass, read a serverside file (logins.txt) and check if inputed user is there.

If so, the app continues, if not, shows a MSGBox and exit.

The txt file with usernames should be this way:

user1

user2

user3

Can someone help me how to get this?

This seems to be the easiest mode to protect my app.

Maybe below code could help you to accomplish your goal:

$sUser="userX" ;Or whatever method you are using to get the user name
$sLoginText="http://yourdomain.tld/logins.txt"
$sInetRead=BinaryToString(InetRead($sLoginText,1))
$iChecking=StringRegExp($sInetRead,"\Q" & $sUser & "\E")
If $iChecking=0 Then
    MsgBox(16,"Sorry but...","The user " & $sUser & " is not authorized to use this application")
    Exit
EndIf
;If user matches then continue...

Cheers,

sahsanu

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