Giter Site home page Giter Site logo

sourcelib's People

Contributors

czbak3r avatar frostschutz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

sourcelib's Issues

UID maximum length is not enough

Hi, I was encountering an odd error where most of the log lines were not being properly parsed, when I discovered that my server (which is quite popular and doesn't crash much) had been logging UIDs higher than 999--with 4 characters. I discovered that the regex for player uids does not take this situation into account and the maximum UID one can have is 999.

Changing all the UIDs regex's, such as "<attacker_uid>[0-9]{1,3}" to "<attacker_uid>[0-9]{1,4}" fixed this issue.

Having trouble getting UDP log stream

Hey there, I'm trying out a simplified version of record.py to test out getting a log from my game server. I changed the IPs to reflect the game server:

rcon = SourceLib.SourceRcon.SourceRcon('66.221.253.125', 27017, 'rcongoeshere')
query = SourceLib.SourceQuery.SourceQuery('66.221.253.125', 27017)
...
and then below
...
server = SourceLib.SourceLog.SourceLogListener(('mylocalip', 7130), ('66.221.253.125', 27017), MyLogParser())

I modified the code to just print to the terminal to test the log (and then later modified SourceLog to test if anything was coming in, and don't seem to be getting any data from the gameserver. Rcon commands work, and the response works, and I'm able to run the command logaddress_add myip:7130 to add myself to the UDP list.

I'm also able to get the player list if I type status. Also, the gameserver is logging to UDP, as reported by the log command.

I'm running in Linux, and wondering if a port needs to be opened in order to get the stream, or if some other trick is necessary in order to get the log. HLSW works fine for me when I use Windows...

Thanks for the help. Your project looks very neat.

Overridden value in result dict

In SourceQuery.info() line 226 and 239:

result['version'] = packet.getByte()

result['version'] = packet.getString()

Maybe you name the first one "protocol_version" or the second "game_version".

server tags corrupt

Example: FuG's tf2 server: 72.9.144.108:27015
tag: �p
�?�@�ctf,increased_maxplayers

or another: \xFD\xAC\x08@\x01

My own servers work fine, but a vast majority of tf2 servers query this way.

License?

What is this software licensed under?

I am using it for my non-profit website (project), but I want to make sure I don't run afoul with using your software.

Bug when querying some servers

I initially picked your lib because it worked a lot better than other libs for l4d, unfortunately it seems to have some bugs of its own on certain games.

import SourceQuery
server = SourceQuery.SourceQuery('81.93.240.69', 27105)
server_info = server.info()

File "xxxxxxxxxx/SourceQuery.py", line 237, in info
edf = packet.getByte()
File "xxxxxxxxxx/SourceQuery.py", line 70, in getByte
return struct.unpack('<B', self.read(1))[0]
struct.error: unpack requires a string argument of length 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.