Sign in to follow this  
Followers 0
XRS

Script Protection

4 posts in this topic

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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Checkout the hash and encryption functions available : SHA1_MD5_RC4_BASE64_CRC32

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Thanks for help me.

I'll try it now = )

Edit : It works like a charm!

Thanks :mellow:

Edited by XRS

Share this post


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
Sign in to follow this  
Followers 0