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
#!/usr/bin/env python | |
from twisted.conch import error, manhole, manhole_ssh, ssh | |
from twisted.conch.ssh import keys, factory, common | |
from twisted.cred import checkers, portal, credentials | |
from twisted.python import failure, log | |
from zope.interface import implements | |
from twisted.cred.error import UnauthorizedLogin, UnhandledCredentials | |
import os.path |
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
from Core.ZalgoBase.BaseModule import BaseModule | |
from twisted.web.client import getPage | |
from twisted.internet.defer import inlineCallbacks | |
from Core.ZalgoUtil.CmdWraps import command, timeout, needsArg, stripColors | |
from Core.ZalgoUtil.ModUtil import utf8 | |
from urllib import urlencode | |
from xml.etree.cElementTree import fromstring | |
from Core import version | |
from Core.ZalgoUtil.DeferredCache import deferred_lfu_cache |
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
from urllib import urlencode, urlopen | |
from xml.etree.cElementTree import fromstring | |
appId = 'appid' | |
def search(query, format=('plaintext', )): | |
return parseWolframAlphaResponse(urllib.urlopen('http://api.wolframalpha.com/v2/query?%s' % ( | |
urlencode( | |
{ | |
'appid': appId, |
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
e@e-desktop:~/proxybot/bench$ ab -c 50 -n 5000 http://localhost:8000/ | |
This is ApacheBench, Version 2.3 <$Revision: 655654 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking localhost (be patient) | |
Completed 500 requests | |
Completed 1000 requests | |
Completed 1500 requests | |
Completed 2000 requests |
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
proxies = [] | |
from collections import deque | |
class rotate(deque): | |
def get(self): | |
item = self.pop() | |
self.appendleft(item) | |
return item | |
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
def parseWolframAlphaResponse(self, response, redirected = False, results = None): | |
results = results if results is not None else [] | |
xmlTree = fromstring(response) | |
recalculate = xmlTree.get('recalculate') | |
success = xmlTree.get('success') | |
if success == 'true': | |
for pod in xmlTree.findall('pod'): | |
title = pod.get('title') | |
plaintext = pod.find('subpod/plaintext') | |
if plaintext is not None and plaintext.text: |
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 sys | |
import socket | |
import string | |
import os | |
VERBOSE = True | |
class AstonixIRCBot(object): | |
socket = None | |
connected = False |
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
""" | |
Omegle twisted client | |
""" | |
DISCONNECTED = 0 | |
CONNECTING = 1 | |
WAITING = 2 | |
CONNECTED = 3 | |
from random import choice |
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
""" | |
Omegle Twisted Client version 1.0 | |
""" | |
__author__ = "e" | |
__version___ = "1.0" | |
DISCONNECTED = 0 | |
CONNECTING = 1 | |
WAITING = 2 |
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
2011-02-18 01:17:00+0000 [-] .5 secs passed | |
2011-02-18 01:17:00+0000 [Core.ZalgoUtil.SSHManhole.ZalgoSSHFactory] disabling diffie-hellman-group-exchange because we cannot find moduli file | |
2011-02-18 01:17:00+0000 [-] .5 secs passed | |
2011-02-18 01:17:01+0000 [SSHServerTransport,0,127.0.0.1] kex alg, key alg: diffie-hellman-group1-sha1 ssh-rsa | |
2011-02-18 01:17:01+0000 [SSHServerTransport,0,127.0.0.1] outgoing: aes128-ctr hmac-md5 none | |
2011-02-18 01:17:01+0000 [SSHServerTransport,0,127.0.0.1] incoming: aes128-ctr hmac-md5 none | |
2011-02-18 01:17:03+0000 [-] .5 secs passed | |
2011-02-18 01:17:03+0000 [SSHServerTransport,0,127.0.0.1] NEW KEYS | |
2011-02-18 01:17:03+0000 [-] .5 secs passed |