Raised This Month: $ Target: $400
 0% 

[sockets] login to site


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Author Message
Empowers
BANNED
Join Date: Feb 2009
Location: Ukraine
Old 06-27-2010 , 14:52   [sockets] login to site
#1

I want to login(enter email & password) to this site http://cp.gaming-service.com via sokets.

I have this link it enters email and password:
Code:
http://cp.gaming-service.com/login.php?email=test%40gmail.com&password=mypassword123
But how can i press enter key?
Empowers is offline
Send a message via ICQ to Empowers
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 06-27-2010 , 14:57   Re: [sockets] login to site
#2

Quote:
Originally Posted by Empowers View Post
I want to login(enter email & password) to this site http://cp.gaming-service.com via sokets.

I have this link it enters email and password:
Code:
http://cp.gaming-service.com/login.php?email=test%40gmail.com&password=mypassword123
But how can i press enter key?
Check this out, may it helps you

http://forums.alliedmods.net/showthread.php?t=117744

http://forums.alliedmods.net/showthread.php?t=117748

http://forums.alliedmods.net/showthread.php?t=116095
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
Empowers
BANNED
Join Date: Feb 2009
Location: Ukraine
Old 06-27-2010 , 15:27   Re: [sockets] login to site
#3

Nice tuts man But for me steel doesn't work ;( help me pls

PHP Code:
        socket5 socket_open("cp.gaming-service.com"80SOCKET_TCPerror)
        if(
socket5 0)
        {
            
formatex(plaincharsmax(plain), "[email protected]:mypassword123")
            
encode64(plainencodedcharsmax(encoded))
            
            
formatex(requestcharsmax(request), "GET /servermanage.php?task=restart&serverid=24 HTTP/1.0^n")
            
formatex(request2charsmax(request2), "%sHost: cp.gaming-service.com^n"request)
            
formatex(requestcharsmax(request), "%sAuthorization: Basic %s^n"request2encoded)
            
formatex(request2charsmax(request2), "%sUser-Agent: %s - %s - %s^n^n"requestPLUGIN_NAMEPLUGIN_AUTHORPLUGIN_VERSION)
            
socket_send(socket5request2charsmax(request2))
            
server_print("%s",request2)
        } 
Empowers is offline
Send a message via ICQ to Empowers
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 06-27-2010 , 15:29   Re: [sockets] login to site
#4

But you're not sending your email/password in your code
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 06-27-2010 , 15:38   Re: [sockets] login to site
#5

you gotta send POST headers
__________________
xPaw is offline
Empowers
BANNED
Join Date: Feb 2009
Location: Ukraine
Old 06-27-2010 , 15:46   Re: [sockets] login to site
#6

Quote:
Originally Posted by joropito View Post
But you're not sending your email/password in your code
PHP Code:
// i encode it
formatex(plaincharsmax(plain), "[email protected]:mypassword123"
encode64(plainencodedcharsmax(encoded)) 
             
            
//and then parse on this line
            
formatex(requestcharsmax(request), "%sAuthorization: Basic %s^n"request2encoded
Whats wrong with that?
Empowers is offline
Send a message via ICQ to Empowers
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 06-27-2010 , 15:52   Re: [sockets] login to site
#7

Quote:
Originally Posted by Empowers View Post
PHP Code:
// i encode it
formatex(plaincharsmax(plain), "[email protected]:mypassword123"
encode64(plainencodedcharsmax(encoded)) 
             
            
//and then parse on this line
            
formatex(requestcharsmax(request), "%sAuthorization: Basic %s^n"request2encoded
Whats wrong with that?
Right but in your example (first post) you show user/pass as parameters and not as http authorization challenge.
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
Empowers
BANNED
Join Date: Feb 2009
Location: Ukraine
Old 06-27-2010 , 15:55   Re: [sockets] login to site
#8

Quote:
Originally Posted by joropito View Post
Right but in your example (first post) you show user/pass as parameters and not as http authorization challenge.
ahh my English, can u give a little example how to do it correct please

Last edited by Empowers; 06-27-2010 at 16:03.
Empowers is offline
Send a message via ICQ to Empowers
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 06-27-2010 , 15:59   Re: [sockets] login to site
#9

You should use POST as method and the correct url is /process.php
Then add the parameters as POST variables.

Try to read an http protocol tutorial to understand how to do it

http://www.jmarshall.com/easy/http/#othermethods


EDIT:

You need to edit you HTTP REQUEST (POST blahblah HTTP/1.0^nHost: blabla^n^nvariable=dasd&variable2=value2^n^n)
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.

Last edited by joropito; 06-27-2010 at 16:02.
joropito is offline
Send a message via MSN to joropito
Empowers
BANNED
Join Date: Feb 2009
Location: Ukraine
Old 06-27-2010 , 16:02   Re: [sockets] login to site
#10

Code:
http://cp.gaming-service.com/[email protected]&password=password123&task=login
if i enter that to my browser it says wrong password or email even if its ok. Why is that so?

Quote:
Originally Posted by joropito View Post
You should use POST as method and the correct url is /process.php
Then add the parameters as POST variables.

Try to read an http protocol tutorial to understand how to do it

http://www.jmarshall.com/easy/http/#othermethods
Oh god ;( my english is very pour i understand only part of words there, can you please give me a small example how should I do that. pleasseee man

Last edited by Empowers; 06-27-2010 at 16:08.
Empowers is offline
Send a message via ICQ to Empowers
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:25.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode