SRL Archive - Outdated / Broken

Function OnlineAuth( UserName, PassWord, URL : String): String;


Dark_Sniper

2007-03-19 19:19:21

Yes its a auth system … connects to your site and looks at a php file.
(do not know if SCARLOG already has one but hey :p)


var
Verify : String;

Function OnlineAuth( UserName, PassWord, URL : String): String;
Var AuthClient : Integer; Auth : String;
begin
AuthClient := InitializeHTTPClient (False, False);
Sleep (100);

ClearPostData (AuthClient);

AddPostVariable (AuthClient, 'Auth', Auth);
AddPostVariable (AuthClient, 'UserName', UserName);
AddPostVariable (AuthClient, 'PassWord', PassWord);

Verify:= PostHTTPPageEx(AuthClient, URL);
Result:= Verify;

Writeln(result);

FreeHTTPClient(AuthClient);

end;


php file needed on your site:

[PHP]<?php
if(isset($_POST['Auth'])){
$Auth = Trim($_POST['Auth']);
$UserName = Trim($_POST['UserName']);
$PassWord = Trim($_POST['PassWord']);
if($UserName == 'Dude' and $PassWord == 'Pass'){
echo('RETURN VALUE FOR CORRECT AUTH');
}
else{
echo('RETURN VALUE HERE FOR INCORRECT AUTH');
}
}
?>[/PHP]

Credits go to TheRealJDB for the php file fix up.
{and to scarlogs php file for refrence}


TUTORIAL!!!!!

1. Change the return values in the php script to be somthing no one would guesse.

2. upload the php file to your sever…

3. Put the OnlineAuth in your script.

4. Also use Verify for a var (or anything u wish)

5. now do not say if verify = ' your code' then…
you need to use the lenght of the text and like random chars of the text to see…

EXAMPLE:
if Verify[15] = 'L' then so on…

or

If ( Length ( Verify ) = 22 ) then so on…

any other way as far as i know is not affective.

6. usage:

UserName … the users username for auth.

PassWord … The pass for the auth.

URL … the location of the php file on your server…


7. it would be good if the script checked vars internally for verification aswell…






any questions?

Wizzup?

2007-03-20 03:20:15

Nice, I've been things with it this too,
not that I ever plan on selling scripts though. :)

Dark_Sniper

2007-03-20 07:17:51

i do not plan on it ether really i made it fo kicks.. and i guesse you can use it for fun.

TOB

2007-03-29 02:07:52

SCARlog works by checking the account status and type in the phpBB database(in addition to a table I made for scripts + accounts).

Though apart from the SCARlog code I have a very structured auth system that I could go and revamp up that deals with IP's, user system, etc.