TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 11-08-2009, 07:22 PM   #1 (permalink)
The Frequenter
 
ReSpawN's Avatar
 
Join Date: Nov 2007
Location: Netherlands
Posts: 460
Thanks: 49
ReSpawN is on a distinguished road
Default fsockopen query to server

Hey guys, long time no see!

I've recently got into getting data from servers. For example, from a CoD 4 server. Simple enough eh?

Now the following, a script I can query the server for status. Meaning, the server's settings (maps, title) and the players with their scores. Now the question is, using a handshake in the fwrite function, what do these mean and how can I, if there is any, get more info out of it?

I am using "\xFF\xFF\xFF\xFFgetstatus\x00" to handshake with a CoD 4 server, but I am only getting the player's name, score and ping. What I need is the score, kills, deaths and assists. The point is, are these options/data available and up for grabs or not? I tried many things but I cant seem to get it to work in any other way.

The current script, rescripted from an other class:
PHP Code:
set_time_limit(5);
    
$socket fsockopen('udp://ip:port''port'$error$errorStr3);

    
fwrite($socket"\xFF\xFF\xFF\xFFgetstatus\x00");
    
$data fread($socket4096);
    
fclose($socket); 
This gets me a lot of data, but not enough. My idea is to query a Left 4 Dead server, but I can't even seem to get any data out if it. I do get a resource stream when printed out the $socket.

Help?
__________________
"Life is a bitch, take that bitch on a ride"
Send a message via MSN to ReSpawN
ReSpawN is offline  
Reply With Quote
Old 11-09-2009, 11:38 AM   #2 (permalink)
The Prestige
Advanced Programmer Top Contributor Good Samaritan 
 
sketchMedia's Avatar
 
Join Date: Oct 2007
Location: Manchester, UK
Posts: 836
Thanks: 31
sketchMedia is on a distinguished road
Default

Dont you have to send an RCON password through aswell?
If i can dig out my RCON tool I wrote about 3 years ago, I'll have a look as currently I can't remember how the quake3 engine accepts RCON commands.
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
sketchMedia is offline  
Reply With Quote
Old 11-09-2009, 12:49 PM   #3 (permalink)
The Frequenter
 
ReSpawN's Avatar
 
Join Date: Nov 2007
Location: Netherlands
Posts: 460
Thanks: 49
ReSpawN is on a distinguished road
Default

Well, the idea is to query the server and get the data without the client giving me anything in return. So only by IP:Port
__________________
"Life is a bitch, take that bitch on a ride"
Send a message via MSN to ReSpawN
ReSpawN is offline  
Reply With Quote
Old 11-10-2009, 07:10 PM   #4 (permalink)
The Frequenter
 
ReSpawN's Avatar
 
Join Date: Nov 2007
Location: Netherlands
Posts: 460
Thanks: 49
ReSpawN is on a distinguished road
Default

Already found something sketchMedia? (small bump)
__________________
"Life is a bitch, take that bitch on a ride"
Send a message via MSN to ReSpawN
ReSpawN is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem executing MSSQL query in PHP trmbne2000 MySQL & Databases 2 06-30-2009 02:52 PM
Query With a C# Variable?‏ StevenF The Lounge 5 12-08-2008 04:32 AM
ldap server Gibou Advanced PHP Programming 4 07-10-2008 10:38 AM
query question Evulness Absolute Beginners 4 04-21-2008 07:46 PM


All times are GMT. The time now is 09:36 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design