Sign in to follow this  
Followers 0
JBtje

login protection for program

3 posts in this topic

Hello,

A while ago i created a script that is capable to let you login, before you can use the script itself.

A login box apears, the script opens a hidden internet window and sends the username + password (as md5 coded) via GET to the webpage. The webpage, a php file, shall "read" the data and compaires with a MySQL database on the server if this account exicts, ifso, it checkts if the person has the right to use the program.

As feedback it will display something like the next on the webpage:

[1]some secured code[/1]

[2]some secured code[/2]

[3]some secured code[/3]

[4]some secured code[/4]

[c]what to do code[/c] (for example: 1 = allowed, 2 = denied, 3 = not registered, etc.)

Depending on the secure codes, the programm will than do what was told him to do...

Now i gave this secured program to someone, who told me that the internet browser was opened visible(!), showing the correct code, but nothing else :| the program wasn't able to read the content of the webpage... (on my, and some other ppls PC's it all works fine thought...) (this person has just like me IE 7)

My code is:

It does work on my and other pc's... but for some reason not on that persons PC... (im using <IE.au3>)

$code1 = Round(Random(1,12345), 0)&"a"
    $code2 = Round(Random(100,12345), 0)&"b"
    $code3 = Round(Random(1000,12345), 0)&"c"
    $user = GUICtrlRead($username)
    $pass = GUICtrlRead($password)

    $oIE = _IECreate($IEconnectlink&"?user="&$user&"&pass="&$pass&"&code1="&$code1&"&code2="&$code2&"&code3="&$code3, 0, 0, 1, 0)
    _IELoadWait($oIE)

    $buffer = _IEBodyReadHTML ($oIE)
    _IEQuit ($oIE)

    $IEerror = _StringBetween($buffer, '[1]', '[/1]')
    $IEcode1 = _StringBetween($buffer, '[2]', '[/2]')
    $IEcode2 = _StringBetween($buffer, '[3]', '[/3]')
    $IEcode3 = _StringBetween($buffer, '[4]', '[/4]')
    $IEUserId = _StringBetween($buffer, '[c]', '[/c]')

Now i was wondering what other ways of communication i could use? there i dont think this will work.... (and its kinda complicated to use PHP too >_<)

I already tried to make a simple chat program, and on my LAN it did work correctly, thought when i wanted to use it over the internet i gain problems (not being able to see eachother)

This chat program used TCP, would opening a port on my modem solve this problem, does anyone know that?

are there even other options beside these two?

and finally: I was wondering how a sever has to be scripted, to handle more clients at the same time. for example a game. There are more than one ppl connected to the server, and they all do requests to the server. How many sockets does this server has to open?(just one and one listening? or 100 directly?) How does the server has to catch these requests (for example if its bizzy already)? how should the server respond (if its bizzy already)? would this server be able to handle more than just one request at the same time?

If someone knows, i love to hear it. In plain text or a script :(

Greetings,

JBtje

Share this post


Link to post
Share on other sites



XProTec.au3 is one I wrote, it is very descriptive. Maybe you can use some ideas from that...

http://www.autoitscript.com/forum/index.php?showtopic=31020&view=findpost&p=222095

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

XProTec.au3 is one I wrote, it is very descriptive. Maybe you can use some ideas from that...

http://www.autoitscript.com/forum/index.php?showtopic=31020&view=findpost&p=222095

8)

Hey, thanx for your reply.

I already found this script, thought it was a non encrypted version >_< (version 1.0.0)

as far as i could figure out from the code, its a good script, in case you want to distribute a program, without having to know anything about the users.

what i need is a script that allows ppl to register. After they are registered they would be able to try it for a few times, but in case they want to use it more, they need to buy credits. each time they run the program (the program does something for a credit, like clicking a link or whatever), it will countdown the credits after doing the handling. when there are no credits left, the program should stop running. The server needs to store the credits with the account info, so the person can run the client from anywhere. Thought the communication via IE doesn't seem to work for everyone :( so i guess i need to create a serverside script. Then the problem with not being able to see the server came, so i was wondering if there are other ways to communicate between 2 PC's

Greetings,

JBtje

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