-
Launcher UPDATES Section
Hey guys. Yesterday I started working on a launcher for personal use and well I have pretty much got it nailed. All I really need now is a logo and the updates section. What I mean by the updates section is like a slideshow with all the latest updates like the League of Legends launcher.
http://puu.sh/1IPWJ
My launcher was based off of a very old League of Legends launcher. I pretty much just used everything from that but meh here it is
http://puu.sh/1IPY8
If anyone could help me get the slideshow like the league of legends launcher I would greatly appreciate it. I was up late trying many things and some things worked but they were not as professional as I wanted it to be and it didn't look very good.
EDIT: I used iStu's launcher creator to make this. That thing is beast once you get to know all the features. Great application and without this wouldn't have been possible. Huge thanks. :)
-
Re: Launcher UPDATES Section
38 views no replies? D: Is everyone clue less or is it that you don't want to help me. :(
I was expecting some of the more active people to reply within the first hour of this post lol. I've been let down greatly. :/
-
Re: Launcher UPDATES Section
Write it in html, add a design and put it on your webhost then add a WebBrowser control to your form and make it connect to the URL where the html document is located. That's one way to do it. I think there's a WebBrowser control in Stu's Launcher Creator.
-
Re: Launcher UPDATES Section
Tried that. It kinda worked I guess. But I don't know I guess I was missing something. It just didn't look right? I guess I will have to look more deeply into that solution since it seems to work.
-
Re: Launcher UPDATES Section
I hope you know, the Launcher Creator doesn't support the new Odin files, just sayin.
But it looks good~
-
Re: Launcher UPDATES Section
Yeah I just realised. Ah that sucks. D:
I tried learning on my own how to use and make the new launcher for the new odin files like I did with this Launcher Creator (Rather Simple. Anyone could get it really) but I had no luck. :(
Tried searching for guides, tutorials and I only found a couple of hints by myself and someone also posted something here:
Quote:
Originally Posted by
NextIdea
Your getting it a bit wrong!
Launcher isn't going to generate the tokens, the Web server is going to.
Launcher asks, for User/Pass and sends it to Web server, which then validates it and generates the token and then saves it to DB, after that it sends token back to the launcher and it starts the Client with it.
When Client is started up it connects to the Login server which validates the token by asking the Web server (REST Server acts like it as default) and when its valid/notExpired it sends correct response back.
Still no luck though. I have no experience in Visual Basics. That kind of sucks. I would like to learn via a tutorial or something or on my own through trial and error but I can't since I am not running the server myself and I just want to make the launcher for the future if I ever do start a server.
So yeah any tips or hints or guides would definately be appreciated. I've tried many things. I first managed to find out that you have to enter the sql data into the Login.php and the Login.asp. I then continued to make a small login panel for the username and pass (just edited the example) and in the coding after the welcome message I did a bit of research and tried to make it open the client if it was correct (that failed). Did a bit more digging around the in examples coding but found nothing. So yeah if anyone can help me learn that would be awesome! :)
-
Re: Launcher UPDATES Section
There is enough info to get all the data needed to get it to run. Just some things have to be found out with some different methods.
Quote:
Originally Posted by NextIdea
Your getting it a bit wrong!
Launcher isn't going to generate the tokens, the Web server is going to.
Launcher asks, for User/Pass and sends it to Web server, which then validates it and generates the token and then saves it to DB, after that it sends token back to the launcher and it starts the Client with it.
When Client is started up it connects to the Login server which validates the token by asking the Web server (REST Server acts like it as default) and when its valid/notExpired it sends correct response back.
LPL - Launcher programming language. (VB, C, C++, C#, ...)
WSL - Web Server Language. (PHP, ASP, ...) |
|
| 1. Enter Username/Password to Launcher. |
Launcher asks, for User/Pass ... |
2. Send them to your web server: [LPL -> WSL]
"http://localhost/GetToken.php?username="+username+"&password="+password |
... and sends it to Web server, ... |
3. Web Server checks are they valid? [WSL]
($result = "SELECT [nEMID], [sUserpass] FROM [tAccounts]
WHERE [sUsername] = $username" ) == $password |
... which then validates it ... |
4. Generate a token: [WSL]
"$token = GenerateRandomToken();" |
... and generates the token ... |
5. Save it to Database: [WSL]
"INSERT INTO [tTokens]([nEMID],[sToken])
VALUES ($result[0],$token)" |
... then saves it to DB, ... |
6. Return it Launcher: [WSL -> LPL]
"echo $token." |
... after that it sends token back to the launcher ... |
7. And start the Client with correct parameters: [LPL]
Process.Start("Client.exe", "-osk_server 127.0.0.1 -osk_token "+tokenfromhttppage+" -osk_store YourGameStore") |
... and it starts the Client with it. |
| 8. Wait for Client Load. |
|
| 9. Client sends data to LoginService. |
When Client is started up it connects to the Login server ... |
10. LoginService sends data to Web Server: [C++ -> WSL]
"http://stubedore.t/user/v1/getInfo?realm=fiesta&token="+tokenfromlauncher+"&sig=LongHexString" Remap "stubedore.t" in hosts file. |
... which validates the token by asking the Web server (REST Server acts like it as default) ... |
11. Web Server validates token: [WSL]
($result = "SELECT [tAccounts].[nEMID], [tAccounts].[sUsername] FROM [tAccounts], [tTokens] WHERE [tAccounts].[nEMID] = [tTokens].[nEMID] and [tTokens].[sToken] = '$token';) == true |
... which validates the token by asking the Web server (REST Server acts like it as default) ... |
12. And sends result back: [WSL -> C++]
"echo '{"token_age":0,"user_id":'.$result[0].',"login":"'.$result[1].'","user_role":"user","blocked":false}';" |
... and when its valid/notExpired it sends correct response back. |
| 13. LoginService does whats necessary to get Client in game. |
|
If you don't know how to do specific step, Google it, as it is differs depending on the programming language.
-
Re: Launcher UPDATES Section
Quote:
Originally Posted by
NextIdea
There is enough info to get all the data needed to get it to run. Just some things have to be found out with some different methods.
LPL - Launcher programming language. (VB, C, C++, C#, ...)
WSL - Web Server Language. (PHP, ASP, ...) |
|
| 1. Enter Username/Password to Launcher. |
Launcher asks, for User/Pass ... |
2. Send them to your web server: [LPL -> WSL]
"http://localhost/GetToken.php?username="+username+"&password="+password |
... and sends it to Web server, ... |
3. Web Server checks are they valid? [WSL]
($result = "SELECT [nEMID], [sUserpass] FROM [tAccounts]
WHERE [sUsername] = $username" ) == $password |
... which then validates it ... |
4. Generate a token: [WSL]
"$token = GenerateRandomToken();" |
... and generates the token ... |
5. Save it to Database: [WSL]
"INSERT INTO [tTokens]([nEMID],[sToken])
VALUES ($result[0],$token)" |
... then saves it to DB, ... |
6. Return it Launcher: [WSL -> LPL]
"echo $token." |
... after that it sends token back to the launcher ... |
7. And start the Client with correct parameters: [LPL]
Process.Start("Client.exe", "-osk_server 127.0.0.1 -osk_token "+tokenfromhttppage+" -osk_store YourGameStore") |
... and it starts the Client with it. |
| 8. Wait for Client Load. |
|
| 9. Client sends data to LoginService. |
When Client is started up it connects to the Login server ... |
10. LoginService sends data to Web Server: [C++ -> WSL]
"http://stubedore.t/user/v1/getInfo?realm=fiesta&token="+tokenfromlauncher+"&sig=LongHexString" Remap "stubedore.t" in hosts file. |
... which validates the token by asking the Web server (REST Server acts like it as default) ... |
11. Web Server validates token: [WSL]
($result = "SELECT [tAccounts].[nEMID], [tAccounts].[sUsername] FROM [tAccounts], [tTokens] WHERE [tAccounts].[nEMID] = [tTokens].[nEMID] and [tTokens].[sToken] = '$token';) == true |
... which validates the token by asking the Web server (REST Server acts like it as default) ... |
12. And sends result back: [WSL -> C++]
"echo '{"token_age":0,"user_id":'.$result[0].',"login":"'.$result[1].'","user_role":"user","blocked":false}';" |
... and when its valid/notExpired it sends correct response back. |
| 13. LoginService does whats necessary to get Client in game. |
|
If you don't know how to do specific step, Google it, as it is differs depending on the programming language.
This brings back memorys from 2 years ago, haha
-
Re: Launcher UPDATES Section
^^ Wow everything is pretty much there! Thank you very much. I will see where I can get with this although it will be a struggle since I don't know php coding or visual basics but this will definitely help! Pretty much done it for me really. Just got to add it in now.
EDIT: Does the php script that Stu has provided in his utility have all the webserver part coded when I checked it and looked at what you've written nextidea it seemed like it was missing stuff like generating the random token and from there onwards.
-
Re: Launcher UPDATES Section
Quote:
Originally Posted by
Dragonluck4
^^ Wow everything is pretty much there! Thank you very much. I will see where I can get with this although it will be a struggle since I don't know php coding or visual basics but this will definitely help! Pretty much done it for me really. Just got to add it in now.
EDIT: Does the php script that Stu has provided in his utility have all the webserver part coded when I checked it and looked at what you've written nextidea it seemed like it was missing stuff like generating the random token and from there onwards.
probably since I think nothing was changed when it was released.
-
Re: Launcher UPDATES Section
Hmm okay but, I still can't seem to get any where. I was wondering. Why do the username and password Terra/Rocks work without it checking with the server?
EDIT: Oh, is it because it connects to his website or something?
http://eslc.stubedore.com/login.php
EDIT2: In the Login.php provided by iStu it says "mssql_connect" shouldn't it be "mysql_connect"?
EDIT3: It should be mysql because I would not be using mssql
EDIT4: What does this mean?
Code:
$search=array("\\","\0","\n","\r","\x1a","'",'"');
$replace=array("","","","","","","");
return str_replace($search,$replace,$str);
EDIT5: Okay this is what I have for the launcher can you guys check it. Also I wasn't sure how to declare the "tokenfromhttppage" variable (not sure if it's a variable?) I also changed that to GetToken because I thought it was cleaner like that. :)
Code:
Imports ExtrinsicStudioLauncherUtility
Public Class Form1
Dim ES_ErrorHandle As New ESLUErrorHandler
Dim WithEvents ESWebUtil As New ES_WebUtility
Dim ESLoginUtil As New ES_LoginUtility("") //url for the login.php which is on your web server
Dim WithEvents ESRARUtil As New ES_RARUtility
Dim LoginResponse As String = ""
Dim iTotalFiles As Integer = 0
' ---------------- BEGIN LOGIN UTILITY EXAMPLE ----------------
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
LoginResponse = ESLoginUtil.Login(TextBox2.Text, TextBox3.Text, 1)
If ES_ErrorHandle.Fail Then MsgBox(ES_ErrorHandle.WhyFail)
If LoginResponse <> "OK" Then
MsgBox("ERROR: " & LoginResponse)
Else
MsgBox("Welcome!")
Process.Start("Client.exe", "-osk_server 127.0.0.1 -osk_token " + GetToken() + " -osk_store YourGameStore")
End If
End Sub
' ---------------- END LOGIN UTILITY EXAMPLE ----------------
Private Function GetToken() As String
Throw New NotImplementedException
End Function
End Class
And this is what I have for my Login.php file.
Code:
<?php
$conf['db_host'] = ".\SQLEXPRESS";
$conf['db_user'] = "";
$conf['db_pass'] = "";
$conf['db_name'] = "Account";
$user = sql_clean($_GET['Username']);
$passhash = sql_clean($_GET['Password']);
$con = mysql_connect($conf['db_host'],$conf['db_user'],$conf['db_pass']) or die('Database connect Fail.');
$db = mysql_select_db($conf['db_name'], $con) or die('Database Init Fail.');
$exec = mysql_query("SELECT sUserPW FROM tUser where sUserID = '$user'");
if($exec)
{
if(mysql_num_rows($exec) != 1)
{
die('Account Not Found.');
}
$AccountData = mysql_fetch_assoc($exec);
$PlaintxtPass = $AccountData['sUserPW'];
if (MD5($PlaintxtPass) == $passhash)
{
die('OK');
$token = GenerateRandomToken();
INSERT INTO [tTokens]([nEMID],[sToken])
VALUES ($result[0],$token)
echo $token.
($result = "SELECT [tAccounts].[nEMID], [tAccounts].[sUsername] FROM [tAccounts], [tTokens] WHERE [tAccounts].[nEMID] = [tTokens].[nEMID] and [tTokens].[sToken] = '$token';) == true
"echo '{"token_age":0,"user_id":'.$result[0].',"login":"'.$result[1].'","user_role":"user","blocked":false}';"
}
else
{
die('Wrong Password.');
}
}
else
{
die('Query Failed');
}
mysql_close();
function sql_clean($str)
{
$search=array("\\","\0","\n","\r","\x1a","'",'"');
$replace=array("","","","","","","");
return str_replace($search,$replace,$str);
}
?>
-
Re: Launcher UPDATES Section
@Dragonluck4 EDIT 0,1:
If they use old version of the files then they don't have the token system and the username/password are passed directly to client which then checks them.
@Dragonluck4 EDIT 2,3:
Why you want to use MySQL rather than MSSQL, your Database is MSSQL why you want to use 2 different Databases?
@Dragonluck4 EDIT 4:
It replaces in $str, each substring found from $search array, with corresponding element from $replace.
@Dragonluck4 EDIT 5:
It was very rough code, you can't directly copy most of the things from there, it just gives the basic idea and some basic code needed. (Do you need more explaining, why? I hope not.)
Variable names are meant to be as close as to the data they hold, you can always change them as necessary.
@CODE:
VB: I'm not very good in VB, but the basic idea seems to be correct, except that when you login, server returns the token there, you don't ask it later with the "GetToken()". In your code the LoginResponse variable should get the token.
PHP: The code after "die('OK');" needs to be recoded. Read comment on "EDIT 5" again.
-
Re: Launcher UPDATES Section
Okay I think I got the launcher pretty much spot on unless there is a problem after I fix this problem, but for the life of me I can't figure out why I am getting this error on the login.php
Fatal error: Call to undefined function mssql_connect() in ..... line 11
I understand that it is an undefined function and that you need to define it but I thought it would be fine if the Login.php is placed on the webserver and then changing the
ES_LoginUtility("http://127.0.0.1/Login.php")
to your webserver where the Login.php is.
Did I place the Login.php file in the wrong place or is the php file code un-complete?
Thanks for all your help NextIdea and everyone else. I intend to put what I learn back into the community. :)
-
Re: Launcher UPDATES Section
Code:
Fatal error: Call to undefined function mssql_connect()
Nothing wrong with the script, your server doesn't have mssql_() installed. Bring it up with your host / install the module in PHP.
-
Re: Launcher UPDATES Section
Ah okay! That explained why it worked with mysql but gave me a different error lol. Thanks. Something so simple yet so hard. :|
-
Re: Launcher UPDATES Section
Hey guys, I just setup my server to test my launcher and I got wamp installed with mssql extensions and all but when I press the play now button nothing happens. Also when I go to the login.php (127.0.0.1:9090/login.php) I get this error:
Code:
Notice: Undefined index: Username in C:\Users\Farbod\Desktop\WAMP\www\Login.php on line 8
Notice: Undefined index: Password in C:\Users\Farbod\Desktop\WAMP\www\Login.php on line 9
Warning: mssql_query() [function.mssql-query]: message: Invalid object name 'tUser'. (severity 16) in C:\Users\Farbod\Desktop\WAMP\www\Login.php on line 14
Warning: mssql_query() [function.mssql-query]: Query failed in C:\Users\Farbod\Desktop\WAMP\www\Login.php on line 14
Query Failed
I think this is the thing causing the problem. I don't think there is a tUser table? Is it just me or is it the login.php?
This is the code for login.php:
Code:
<?php
$conf['db_host'] = "FARBOD-PC\SQLEXPRESS";
$conf['db_user'] = "raye";
$conf['db_pass'] = "...";
$conf['db_name'] = "OdinAccounts";
$user = sql_clean($_GET['Username']);
$passhash = sql_clean($_GET['Password']);
$con = mssql_connect($conf['db_host'],$conf['db_user'],$conf['db_pass']) or die('Database connect Fail.');
$db = mssql_select_db($conf['db_name'], $con) or die('Database Init Fail.');
$exec = mssql_query("SELECT sUserPW FROM tUser where sUserID = '$user'");
if($exec)
{
if(mssql_num_rows($exec) != 1)
{
die('Account Not Found.');
}
$AccountData = mssql_fetch_assoc($exec);
$PlaintxtPass = $AccountData['sUserPW'];
if (MD5($PlaintxtPass) == $passhash)
{
die('OK');
}
else
{
die('Wrong Password.');
}
}
else
{
die('Query Failed');
}
mssql_close();
function sql_clean($str)
{
$search=array("\\","\0","\n","\r","\x1a","'",'"');
$replace=array("","","","","","","");
return str_replace($search,$replace,$str);
}
?>
Thanks for any help in advance :)
EDIT: Would it been tAccounts instead of tUser?
EDIT2: Okay I managed to sort out the invalid object name and query fail by changing it to this:
Code:
$exec = mssql_query("SELECT sUserPass FROM tAccounts where sUsername = '$user'");
But I still get the undefined username and password problem. How can I define them?
-
Re: Launcher UPDATES Section
login.php?Username=user&Password=pass
-
Re: Launcher UPDATES Section
I don't understand? i still get the undefined error.
-
Re: Launcher UPDATES Section
Then read more about "php GET".
-
Re: Launcher UPDATES Section
Holy mother of lord, it works! IT WORKS! YES :DDDD
Thank you very much. :)
Now onto updating, registering, ui and other stuff.
-
Re: Launcher UPDATES Section
-
Re: Launcher UPDATES Section
Thank you Myth ^^
I read up on it.
PHP $_GET Variable
EDIT: Never mind what I said before. After I click play the client loads and all but it says authentication failed? I don't know where to go with this.
EDIT2: I think it is because I am using this code to start the client.exe
Code:
Client.exe", "-osk_server 127.0.0.1 -osk_token -osk_store Google
But the problem is it doesn't make the token. :S and insert it into the above code.
EDIT3:
I have a code which generates the token now in the Login.php and I have changed the launcher to start as follows:
Code:
Client.exe", "-osk_server 127.0.0.1 -osk_token +RandomToken+ -osk_store Google
But the problem is that when I click play I get this error:
http://puu.sh/1NijL
I've looked at it and apparently it says undefined variable: PlaintxtnEMID
Then it has the token at the bottom.
This is the part where it generates the token:
Code:
$Token = RandomToken(25);
$setToken = null;
if (mssql_num_rows(mssql_query("SELECT * FROM tTokens WHERE nEMID = '".$PlaintxtnEMID."'")) >= 1)
{
mssql_query("DELETE FROM tTokens WHERE nEMID = '".$PlaintxtnEMID."'");
$setToken = mssql_query("INSERT INTO tTokens (nEMID, sToken) VALUES('".$PlaintxtnEMID."', '".$Token."')");
}
else
$setToken = mssql_query("INSERT INTO tTokens (nEMID, sToken) VALUES('".$PlaintxtnEMID."', '".$Token."')");
if ($setToken)
die('OK'.$Token);
else
die('SetToken Error');
-
Re: Launcher UPDATES Section
Error says what's wrong, fix it.
I suggest you to add very important parts to your code:
Error checking!
-
Re: Launcher UPDATES Section
That's the thing T.T I don't know how to fix it else I would. :( Any tips, hints on how I could fix that? Like I have said before I don't know any PHP or VB lol. I've never ran a Fiesta server before.
I found the code in another thread. :D
I think there is already error checking because that's how I found the error?
EDIT: I've looked at this: http://www.w3schools.com/php/php_variables.asp
Yet no fix still comes to mind.
EDIT: I WILL DEFINITELY FIX THIS ONE DAY! IDK WHEN BUT ONE DAY! I WILL! :)
-
Re: Launcher UPDATES Section
And the page has an answer:
Code:
PHP has no command for declaring a variable.
A variable is created the moment you first assign a value to it:
Error Handling would be correct (Not Error Checking).
In your case, you have used nesting:
Code:
mssql_num_rows(mssql_query("..."))
But can you guarantee that 'mssql_query("...")' returns resource?
Code:
mssql_query:
Returns a MS SQL result resource on success, TRUE if no rows were returned, or FALSE on error.
But 'mssql_num_rows' expects resource. But if boolean is given then you get yet another error.
Code:
mssql_num_rows — Gets the number of rows in result
-
Re: Launcher UPDATES Section
Take some advice, code all this from scratch yourself rather than using another persons code/source.
Use it as a guideline at the least, but before going further its best you learn/understand what's happening with the script itself, and what you're intending to do will become much more easier to achieve, thus far, you've lacking knowledge and you're lost with whats happening/the script is doing, just my two cents.
-
Re: Launcher UPDATES Section
Myth thanks for the advice. I would create it myself from the start but I don't want to spend 1/2 years learning php ^^ but I will try my best to make it my original code. I just need to get the basics first then in the future I will start to create my own content hopefully any way.
NextIdea, I understand what you are saying kind of. The code seems to work by generating a random token and inserting it into the tTokens table but the client isn't able to link that token and the account that is being logged in with. That's the problem with this code. Wouldn't it be easier for a token to be created when someone signs up instead of creating a token for when they login and then making the launcher grab the correct token linked to the account being logged in with then using it?
Or is this something different from what I am thinking?
EDIT: Oh never mind what I said before. It's because the launcher doesn't grab the key. How can I make the launcher get the key from the mssql database via visual basics? Or would I have to tell the launcher to look at the login.php to then get the token and return it to the launcher?
EDIT2: Basically the web server generates the token and adds it into the database table but how do I make the web server send the token to the launcher where it will then receive it and put it into the appropriate place? I've tried searching on google but I couldn't find anything.
EDIT3: There was a few things being over looked in my coding before. With more research I was able to fix the error and the login.php should work now. But the only problem I now face is that I need to send make it send the token to the launcher and make something so that the launcher know's that it the token and inserts it into the token part.
I don't know how to do that though. D:
-
Re: Launcher UPDATES Section
You don't directly send it to launcher.
Launcher asks for login.php which does everything to get the token ready and as result it echo-s it.
And in launcher you parse the "html" you got as result.
-
Re: Launcher UPDATES Section
Quote:
Originally Posted by
NextIdea
You don't directly send it to launcher.
Launcher asks for login.php which does everything to get the token ready and as result it echo-s it.
And in launcher you parse the "html" you got as result.
Dunno why you would use HTML. A simple JSON string should be fine.
-
Re: Launcher UPDATES Section
Hmm, I did a bit of searching on HTML parsing and JSON string but I couldn't get anywhere after trying a few different methods. Is it possible for a basic idea of how the code would look or something? That would help me.
First I tried this:
Code:
Dim lonPos As Long, lonEnd As Long
Dim strStart As String, strEnd As String
Dim strEmail As String
'The start string.
strStart = "$Token"
strEnd = "$Token"
'Find the start string.
lonPos = InStr(1, HTML, strStart, vbTextCompare)
If lonPos > 0 Then
'Move to the end of the start string
'which happens to be the beginning of what we're looking for. :)
lonPos = lonPos + Len(strStart)
'Find the end string starting from where we found the start.
lonEnd = InStr(lonPos, HTML, strEnd, vbTextCompare)
If lonEnd > 0 Then
'Now, we have the starting and ending position.
'What we do is extract the information between them.
'The length of data (e-mail address) will be:
'lonEnd - lonPos
strToken = Mid$(HTML, lonPos, lonEnd - lonPos)
End If
End If
Then I tried this:
Else
' MsgBox("Welcome!")
Static launcherparams As String = "-osk_server 127.0.0.1 -osk_token %token% -osk_store Google"
Dim token As String = LoginResponse.Substring(10, LoginResponse.Length - 25)
Dim param As String = launcherparams.Replace("%token%", token)
LaunchOfficial(param)
' Process.Start("Client.exe", "-osk_server 127.0.0.1 -osk_token +token+ -osk_store Google")
' Application.Exit()
End If
End Sub
Private Shared Sub LaunchOfficial(param As String)
Process.Start("Client.exe")
Application.Exit()
End Sub
-
Re: Launcher UPDATES Section
Quote:
Originally Posted by
Dragonluck4
Code:
Private Shared Sub LaunchOfficial(param As String)
Process.Start("Client.exe")
Application.Exit()
End Sub
Using your method LaunchOfficial you start your client. But you forgot to set startup-arguments for Process.Start .
It should look something like
Code:
Process.Start("Client.exe", param)
-
Re: Launcher UPDATES Section
Quote:
Originally Posted by
Bakey
Dunno why you would use HTML. A simple JSON string should be fine.
I didn't say that I use anything at all.
And look closely - HTML is in quotes.
With php you can return anything as result (HTML (normally), File, JSON, Your own data format, ....).
Also we are talking about Launcher not HTML page with Javascript.
-
Re: Launcher UPDATES Section
cieto12345 thanks for your help but that doesn't work :(
NextIdea I guess I will look into it next week unless someone gives me more information or some extra tips, hints to help.
But I think it should be done once I get the launcher to use the token.
-
Re: Launcher UPDATES Section
RESPONSE = WEBCLIENT.DOWNLOADSTRING("LOGIN.PHP?USER=21342&PASS=@#$EDAAFSD")
IF RESPONSE FUCKING EQUALS "FAIL" THEN
MESSAGEBOX.SHOW('WRONG INFO STUPID FUCK')
RETURN
END FUCKING IF
PROCESS.START("CLIENT", "-osk_blahblah 2498wqdfs -osk_token " + RESPONSE + " _osk_blahblah")
HOLY FUCK.
-
Re: Launcher UPDATES Section
Quote:
Originally Posted by
iStu
RESPONSE = WEBCLIENT.DOWNLOADSTRING("LOGIN.PHP?USER=21342&PASS=@#$EDAAFSD")
IF RESPONSE FUCKING EQUALS "FAIL" THEN
MESSAGEBOX.SHOW('WRONG INFO STUPID FUCK')
RETURN
END FUCKING IF
PROCESS.START("CLIENT", "-osk_blahblah 2498wqdfs -osk_token " + RESPONSE + " _osk_blahblah")
HOLY FUCK.
Do you even lift?
-
Re: Launcher UPDATES Section
Haha Stu I was wondering when you would post. Thanks for the help. It should work now unless I mess up.
EDIT: Ah I think I messed up. I don't think it was that bad though.
This is what I did with the code iStu gave me.
Code:
Dim instance As WebClient
' ---------------- BEGIN LOGIN UTILITY ----------------
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
LoginResponse = ESLoginUtil.Login(TextBox1.Text, TextBox2.Text, 1)
If ES_ErrorHandle.Fail Then MsgBox(ES_ErrorHandle.WhyFail)
If LoginResponse <> "OK" Then
' MsgBox(LoginResponse)
Else
LoginResponse = instance.DownloadString("LOGIN.PHP?USER=mssqluser&PASS=mssqlpass")
If LoginResponse = "OK" Then
MsgBox("Incorrect Username or Password")
Return
End If
Process.Start("Client.exe", "-osk_server 127.0.0.1 -osk_token " + LoginResponse + " _osk_store http://store.outspark.com/fiesta")
End If
End Sub
The login response is the randomly generated token.
-
Re: Launcher UPDATES Section
And just when I thought things couldn't get worse than this:
http://esxfer.com/static/rj2.png
-
Re: Launcher UPDATES Section
No but I thought I did it correctly? Oh and I'd consider that to be more worse than this since I know nothing about php, mssql, vb and fiesta private servers in general. Yet I was able to come this far within a few weeks. Any how back to the main topic I would really appreciate it if you tell me where I went wrong. Thanks. :)
EDIT: Oh damn i'm stupid lol. I just had a proper look. Yeah you're right that is one epic fail.
-
Re: Launcher UPDATES Section
It's not about knowing php, mssql, vb. It's about thinking.
Code:
' ---------------- BEGIN LOGIN UTILITY ----------------
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
LoginResponse = ESLoginUtil.Login(TextBox1.Text, TextBox2.Text, 1)
If ES_ErrorHandle.Fail Then MsgBox(ES_ErrorHandle.WhyFail)
If LoginResponse <> "OK" Then
' MsgBox(LoginResponse)
Else
Process.Start("Client.exe", "-osk_server 127.0.0.1 -osk_token " + LoginResponse + " _osk_store http://store.outspark.com/fiesta")
End If
-
Re: Launcher UPDATES Section
Yh I just realised I made a very silly mistake. :/ I edited my post above before you had posted lol. I think it's because it's a messy code i've done so I didn't see it.
Is it just me? Now everything should be right. I've double checked it...
Code:
Imports ExtrinsicStudioLauncherUtility
Public Class Form1
Dim ES_ErrorHandle As New ESLUErrorHandler
Dim WithEvents ESWebUtil As New ES_WebUtility
Dim ESLoginUtil As New ES_LoginUtility("http://127.0.0.1:9090/Login.php") ' url for the login.php which is on your web server
Dim WithEvents ESRARUtil As New ES_RARUtility
Dim LoginResponse As String
Dim iTotalFiles As Integer = 0
' ---------------- BEGIN LOGIN UTILITY ----------------
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
LoginResponse = ESLoginUtil.Login(TextBox1.Text, TextBox2.Text, 1)
If ES_ErrorHandle.Fail Then MsgBox(ES_ErrorHandle.WhyFail)
If LoginResponse <> "OK" Then
' MsgBox(LoginResponse)
Else
Process.Start("Client.exe", "-osk_server 127.0.0.1 -osk_token " + LoginResponse + " _osk_store http://store.outspark.com/fiesta")
Application.Exit()
End If
End Sub
' ---------------- END LOGIN UTILITY ----------------
End Class
This seems to be right as well:
Code:
<?php
$conf['db_host'] = "FARBOD-PC\SQLEXPRESS";
$conf['db_user'] = "user";
$conf['db_pass'] = "pass123";
$conf['db_name'] = "OdinAccounts";
$user = sql_clean($_GET['Username']);
$passhash = sql_clean($_GET['Password']);
$con = mssql_connect($conf['db_host'],$conf['db_user'],$conf['db_pass']) or die('Database connect Fail.');
$db = mssql_select_db($conf['db_name'], $con) or die('Database Init Fail.');
$exec = mssql_query("SELECT nEMID, sUserPass FROM tAccounts where sUsername = '$user'");
if($exec)
{
if(mssql_num_rows($exec) != 1)
{
die('Account Not Found.');
}
$AccountData = mssql_fetch_assoc($exec);
$PlaintxtPass = $AccountData['sUserPass'];
$PlaintxtnEMID = $AccountData['nEMID'];
if (MD5($PlaintxtPass) == $passhash)
{
$Token = RandomToken(15);
$setToken = null;
if (mssql_num_rows(mssql_query("SELECT * FROM tTokens WHERE nEMID = '".$PlaintxtnEMID."'")) >= 1)
{
mssql_query("DELETE FROM tTokens WHERE nEMID = '".$PlaintxtnEMID."'");
$setToken = mssql_query("INSERT INTO tTokens (nEMID, sToken) VALUES('".$PlaintxtnEMID."', '".$Token."')");
}
else
$setToken = mssql_query("INSERT INTO tTokens (nEMID, sToken) VALUES('".$PlaintxtnEMID."', '".$Token."')");
if ($setToken)
die('ERROR: '.$Token);
else
die('SetToken Error');
}
else
{
die('Wrong Password.');
}
}
else
{
die('Query Failed');
}
mssql_close();
function sql_clean($str)
{
$search = array("\\", "\0", "\n", "\r", "\x1a", "'", '"');
$replace = array("", "", "", "", "", "", "");
return str_replace($search, $replace, $str);
}
function RandomToken( $length )
{
$chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
$str = "";
$size = strlen( $chars );
for( $i = 0; $i < $length; $i++ ) {
$str .= $chars[ rand( 0, $size - 1 ) ];
}
return $str;
}
?>
The Login.php should connect to the mssql database with the user and pass. You log in with the launcher. The login.php verifies that all the info is correct and generates a random 15 character token which is then sent back to the launcher and used to login. But it doesn't do that...
-
Re: Launcher UPDATES Section
-
Re: Launcher UPDATES Section
I guess this is your attitude towards people who want to learn Bakey? This is why no one actually learns then you guys all complain about no one contributing and everyone not knowing anything. Half the people who actually want to create a server have no knowledge to begin with.
I'm trying my best to find out what I did wrong, but I can't seem to see that. Still I am I am going to try my best to get this working; I am not planning on giving up anytime soon. :) Though pointing me in the correct direction does help having that type of attitude doesn't. :(
EDIT: I've looked over this many, many times now. I don't think it's a problem like before where I had just mixed things up when iStu gave me the code.
EDIT2: Unless, I am a dumb ass and blind so I can't see it...
-
Re: Launcher UPDATES Section
Why no one learns is 'cause people just give you the answers. Use your common sense and debug your script until you find the part where it breaks off.
-
Re: Launcher UPDATES Section
-
Re: Launcher UPDATES Section
I'll look into it next week but I couldn't find anything last time I looked. Any how I'll see what happens next week. Thanks. I'll get there soon and when I do, it will feel good to have accomplished this. :D Although some of you could make this in a few hours it's taken me weeks. Lol.
-
Re: Launcher UPDATES Section
Code:
Public Class Form3
Public Shared Function GetMD5Hash(ByVal TextToHash As String) As String
If TextToHash = "" Or TextToHash.Length = 0 Then
Return String.Empty
End If
Dim md5 As MD5 = New MD5CryptoServiceProvider()
Dim toHash As Byte() = Encoding.Default.GetBytes(TextToHash)
Dim result As Byte() = md5.ComputeHash(toHash)
Return System.BitConverter.ToString(result)
End Function
Code:
Label3.Text = ""
Dim tempPassToken As String() = GetMD5Hash(TextBox2.Text).Split("-")
Dim passMD5 As String = ""
For i = 0 To tempPassToken.Length - 1
passMD5 = passMD5 & tempPassToken(i)
Next
Dim wc As WebClient = New WebClient()
Dim Login As String() = wc.DownloadString("http://ip:port/test/Login.php?Username=" & TextBox1.Text & "&Password=" & passMD5.ToLower()).Split("#")
wc.Dispose()
If Login(0) = "OK" Then
Process.Start(".exe", "-osk_server ip -osk_token " & Login(1) & " -osk_store www.google.de")
Application.Exit()
ElseIf Login(0) = "Wrong Password." Then
Label3.Text = Login(0)
ElseIf Login(0) = "Account Not Found." Then
Label3.Text = Login(0)
Else
Label3.Text = "Unknow Error"
End If
-
Re: Launcher UPDATES Section
Quote:
label3.text = "unknow error"
Soz. :?:
-
Re: Launcher UPDATES Section
Thanks Black. I'll look into it more once I get time.
-
Re: Launcher UPDATES Section
After trying to debug it, I found out that everything works if I remove the token generator part from the PHP. But Ideally it should also work with it if I just remove the '.$Token' and leave it as 'OK' but it still doesn't work. If it did work without the token part then I think I would just have to separate them and make new variable telling it to just take the token from the web server response and tell the login response variable to just take the OK part.
-
Re: Launcher UPDATES Section
I've managed to finish creating my launcher. woohoo. It creates a token, uses the token to login and verifies that the pass and user is correct. I'd like to thank stu for his utility and nextidea for helping me a lot, as well as everyone else who helped me a long the way. All of your help was very much appreciated.
But now that I have created my launcher I face another problem. I run all the appropriate services:
http://puu.sh/1ZAFE
but whenever I log in and select to join the channel I get one of these two errors:
http://puu.sh/1ZAAS
http://puu.sh/1ZABb
I'm not running OdinRestServer because my webserver acts as a replacement for that but I am missing something and I don't know what. Help would be appreciate. Almost finished it. :)
-
Re: Launcher UPDATES Section
Your "webserver" isn't doing a very good job.
-
Re: Launcher UPDATES Section
-
Re: Launcher UPDATES Section
Quote:
Originally Posted by
Dragonluck4
I've managed to finish creating my launcher. woohoo. It creates a token, uses the token to login and verifies that the pass and user is correct. I'd like to thank stu for his utility and nextidea for helping me a lot, as well as everyone else who helped me a long the way. All of your help was very much appreciated.
But now that I have created my launcher I face another problem. I run all the appropriate services:
*snip*
but whenever I log in and select to join the channel I get one of these two errors:
*snip*
*snip*
I'm not running OdinRestServer because my webserver acts as a replacement for that but I am missing something and I don't know what. Help would be appreciate. Almost finished it. :)
You could just use the script dusk (?) used, and fix the item mall part. But i recommend to use Stu's server. Got no problem with it and it run pretty stable.
And uhm since u use .Net you could manage the token stuff with a simple wcf service D:
This should be like ur php create token?
Heres the class for it:
-
Re: Launcher UPDATES Section
Quote:
Originally Posted by
iStu
Your "webserver" isn't doing a very good job.
I can see that. :(
Apparently the 'easy' fix you were talking about took me 6 hours to fix with help from NexIdea and without any breaks in between so I don't know what you were talking about Stu...
Quote:
Originally Posted by
Versaaa
Shitted on em.
I shat on your face Versaaa gtfo.
Quote:
Originally Posted by
Iocere
You could just use the script dusk (?) used, and fix the item mall part. But i recommend to use Stu's server. Got no problem with it and it run pretty stable.
And uhm since u use .Net you could manage the token stuff with a simple wcf service D:
This should be like ur php create token?
Heres the class for it:
Iocere I really appreciate you helping. Thank you very much. But what's Stu's server? I haven't seen anything on the forums, unless you mean the one he sells, in which case I am not planning on buying anything.
Also Which script dusk are you talking about?
It's disappointing that I still haven't been able to fix to a point where all the basic features work and this is after 40 days.
-
Re: Launcher UPDATES Section
He means my Rest. The Odin one.
Maybe you can't fix it, because you're tying to change everything.
PHP REST Won't work properly, Dusk or not, unless you know how to fix them. As far as I can tell, nobody knows how/nobody cares, because a 100% working/free/easy REST server is released.
-
Re: Launcher UPDATES Section
Oh... Then that means what I have created up until now is all nonsense and not needed? If that's the case then I am a long way from fixing it still.
So how do I make it work without having to replace the Rest server because they keep conflicting with each other...
-
Re: Launcher UPDATES Section
Isn't that be a little easier to ask then try to rebuild everything already made?
IIS: Google
Apache: Google
-
Re: Launcher UPDATES Section
Quote:
Originally Posted by
iStu
He means my Rest. The Odin one.
Maybe you can't fix it, because you're tying to change everything.
PHP REST Won't work properly, Dusk or not, unless you know how to fix them. As far as I can tell, nobody knows how/nobody cares, because a 100% working/free/easy REST server is released.
Uhh, PHP REST works fine, not my old one, but I could have fixed my old one with 4 lines :/, Store and all, my new API is much better though.
-
Re: Launcher UPDATES Section
Is that why Victus paid someone else to make a whole new rest system?
-
Re: Launcher UPDATES Section
Quote:
Originally Posted by
iStu
Is that why Victus paid someone else to make a whole new rest system?
Ouch!! Burn!!
-
Re: Launcher UPDATES Section
That's not even true you fucking idiot?
1. Bakey's choice to recode whatever he pleases, his inability to use my API is merely retardation.
2. Bakey hasn't ever been paid, and if he has, then that's just corrupt as fuck, and I expected better out of people I considered friends.
And I'm doing my own development for myself now, outside of the fiesta scene.
-
Re: Launcher UPDATES Section
Name calling isn't nice :c
-
Re: Launcher UPDATES Section
Quote:
Originally Posted by
Kreain
That's not even true you fucking idiot?
1. Bakey's choice to recode whatever he pleases, his inability to use my API is merely retardation.
2. Bakey hasn't ever been paid, and if he has, then that's just corrupt as fuck, and I expected better out of people I considered friends.
And I'm doing my own development for myself now, outside of the fiesta scene.
5char
-
Re: Launcher UPDATES Section
Back on topic. I don't want any raging here please. If you want to rage go do it else where.
Well I have been asking Stu, but no one ever gave me a decent answer.
Any how. I know what apache is and i'll try the IIS thing later when I get some time, but after I stop it from binding all IP's it should work, or do I still need to do more things after that?
-
Re: Launcher UPDATES Section
Quote:
Originally Posted by
Dragonluck4
Oh... Then that means what I have created up until now is all nonsense and not needed? If that's the case then I am a long way from fixing it still.
So how do I make it work without having to replace the Rest server because they keep conflicting with each other...
IIS binds to all IP addresses on a server when you install IIS 7.0 on Windows Server 2008
That link is good. Delete the bindings in there and add the IP you wish to use. Maybe your WAN ?
After that add a loopback adapter listen on custom IP :)
EDIT: I forgot to mention that u have to change the hosts file to the Loopback IP. In this case 10.0.0.1.
And dont forget the config file in the character server folder :D
-
Re: Launcher UPDATES Section
Thanks very much for you help Iocere. As I am running the server on my home pc at the moment I don't have any dedicated server and I don't have windows Server 2008 as well as IIS
-
Re: Launcher UPDATES Section
Quote:
Originally Posted by
Dragonluck4
Thanks very much for you help Iocere. As I am running the server on my home pc at the moment I don't have any dedicated server and I don't have windows Server 2008 as well as IIS
You can install IIS in any Windows Version :)
Installing IIS 7.5 on Windows 7 Professional, Enterprise, or Ultimate
And the loopback adapter just to keep port 80 free on your normal IP's.
-
Re: Launcher UPDATES Section
I'm not sure if I got this across well. Everyone did understand it was for the Odin Files right?
-
Re: Launcher UPDATES Section
-
Re: Launcher UPDATES Section
Okay just making sure. You ES utility tool works with this right?
-
Re: Launcher UPDATES Section
We went thru this. Yes the DLL could work for this.
-
Re: Launcher UPDATES Section
Who? Id don't remember reading about anything like that on this thread.
-
Re: Launcher UPDATES Section
You might wanna re-read the entire first page.
-
Re: Launcher UPDATES Section
Quote:
Originally Posted by
iStu
I hope you know, the Launcher Creator doesn't support the new Odin files, just sayin.
But it looks good~
That's all I see. No one else stated anything about these working or not working with the Odin files.
Anyhow I guess it does work so I will carry on trying different things with the code I have right now that Next helped me create. Awesome guy he is ^^.
-
Re: Launcher UPDATES Section
You're entire PHP and VB Base are from the DLL Example.
-
Re: Launcher UPDATES Section
Quote:
Originally Posted by
iStu
You're entire PHP and VB Base are from the DLL Example.
Talking about tit.php which is something completely different. But yeah the launcher code if from the example you gave but I have edited it mostly and same with the login.php. I appreciate that thanks. But according to what's in the example everything should now work.
-
Re: Launcher UPDATES Section
Quote:
Originally Posted by
istu
you're entire php and vb base are from the dll example.
whyyyyy whyyyyy.
-
Re: Launcher UPDATES Section
Quote:
Originally Posted by
Bakey
whyyyyy whyyyyy.
Ouch, burn...
-
Re: Launcher UPDATES Section
I have no idea. I'm the only person I know that uses you're when I'm not supposed to.
I guess you're English is better than mine D:
-
Re: Launcher UPDATES Section
Okay lets get back to the main subject. So what I have now:
Launcher Source Code:
http://puu.sh/22zwW
Logn.php:
http://puu.sh/22zzH
tit.php:
http://puu.sh/22zAU
When NextIdea helped we did a lot of stuff to get it working. First I was directed to change the Login Server dll (outspark_vc71.dll) so it redirects to this: &user=..&password=../tit.php?realm=.&token=./store/./getPurchasedItems.
This made it work and now I don't get the authentication. I've tried running wamp on a different port to Rest server and it doesn't work. When I try run wamp on port 80 the authentication works but because Rest Server isn't running it says failed to connect to world server?
I run all the appropriate services:
http://puu.sh/1ZAFE
but whenever I log in and select to join the channel I get one of these two errors:
http://puu.sh/1ZAAS
http://puu.sh/1ZABb
-
Re: Launcher UPDATES Section
You need to stop fucking with everything. Default installation always works. Just uninstall xamp all together.
-
Re: Launcher UPDATES Section
Haha, I didn't 'fuck' with anything, I just tried changing the port on WAMP and then I changed it back. But say I do delete it. Then what?
-
Re: Launcher UPDATES Section
After that PM, you should just stick to coloring books.
-
Re: Launcher UPDATES Section
Quote:
Originally Posted by
iStu
After that PM, you should just stick to coloring books.
this shit just keeps getting better :D!
-
Re: Launcher UPDATES Section
-
Re: Launcher UPDATES Section
Since I have stopped development for a while on these files I am going to release it and if anyone wants to work on them then please do so. It will be worth while contributing back to the community. After I have finished doing server development and I have fixed most bugs I will come back to this.
Launcher.rar
The .dll needs to be with the launcher because it uses the codes which are in the .dll. Rename tit.txt and Login.txt to tit.php and Login.php. These two files (tit.php + Login.php) need to go on your web server so that the launcher can connect with it.
Good luck and have fun!
-
Re: Launcher UPDATES Section
u stopped? dont u "worked" as "dev" for one of these one-day-server ?
Edit:
Crap <- found it !
Isnt that MrFarbodD u ?
-
Re: Launcher UPDATES Section
Quote:
Originally Posted by
Dragonluck4
Since I have stopped development for a while on these files
And yeah I got bored of just fixing bugs and giving it away or as it's called 'spoon feeding' people who know nothing. So I joined this small server.
-
Re: Launcher UPDATES Section
Quote:
Originally Posted by
Iocere
u stopped? dont u "worked" as "dev" for one of these one-day-server ?
Edit:
Crap <- found it !
Isnt that MrFarbodD u ?
So you call a server you know nothing about crap? Go away scum.
-
Re: Launcher UPDATES Section
[09.03.2013 19:33:23] []Chris: what you use to make it?
[09.03.2013 19:33:32] Saschanski: VisualStudio
[09.03.2013 19:33:37] []Chris: Nice :)
[09.03.2013 19:39:09] []Chris: i got into new and I select what?
[09.03.2013 19:39:58] Saschanski: ?
[09.03.2013 19:40:21] []Chris: how would I start to make a launcher?
[09.03.2013 19:40:34] Saschanski: u got visual studio shell version
[09.03.2013 19:40:37] Saschanski: thats not the full
[09.03.2013 19:40:59] Saschanski: and i wont teach u how to code lol
[09.03.2013 19:41:10] []Chris: xD just want to know how to start one not how to code
[09.03.2013 19:41:32] Saschanski: make a new project
[09.03.2013 19:41:34] Saschanski: c# wpf
[09.03.2013 19:41:43] Saschanski: idk if the shell version is able to do that
[09.03.2013 19:41:46] []Chris: nah
[09.03.2013 19:41:48] []Chris: it can’t :C
lololol
-
Re: Launcher UPDATES Section
-
Re: Launcher UPDATES Section
Buy a better chair? :sleep:
-
Re: Launcher UPDATES Section
Sorry I forgot asking questions was bad...