Threaded HTTP load generator:
Could add “”.join(random.sample(string.letters+string.digits, 16)) to the url to hit random urls.
import socket, time, random, string
import threading
class httpf(threading.Thread):
def __init__(self,host,port,url,count):
self.host=host
self.port=port
self.url=url
self.count=int(count) #int(4321)
threading.Thread.__init__(self)
def run(self):
for x in range(self.count):
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.sock.connect((self.host, self.port))
print (“attempt to “+self.host+” “+self.url+” “+str(x)+”“)
self.sock.send(“GET “+self.url+” HTTP/1.1\n”)
time.sleep(0.1)
self.sock.close()
if __name__==”__main__”:
for z in range(32): #number of threads
httpf(“host”,80,”url”,”num_of_requests”).start()
Who stole msmq?
netstat -a -n -o | find /i “1801”
List all connections and the PID of the process listening on that socket.
Only look for something listening on 1801 (MSMQ TCP port). The PID will be displayed in the last column.
Take the PID from the first command (last column) and put it after eq e.g. “PID eq 1234”
tasklist /svc /FI “PID eq %PIDHERE%”
So for example:
netstat -a -n -o | find /i “1801”
TCP ip.add.re.ss:1801 ip.add.re.ss:8194 ESTABLISHED 3060
tasklist /svc /FI “PID eq 3060”
Image Name PID Services
========================================
RouterNT.exe 3060 Sophos Message Router
fucking sophos!
Very dirty way to get a list of required patches for a server using patchlink:
<?PHP
$conn = odbc_connect(‘patchlink’,’patchlink_odbc’,”);
function lookupvulnid($id){
$conn = odbc_connect(‘patchlink’,’patchlink_odbc’,”);
$sql=”SELECT VulnerabilityName, VulnerabilityDescription, Impact FROM rpt_Vulnerabilities WHERE VulnerabilityID = ‘”.$id.”’ AND Impact IN (‘Critical’,’Critical - 01’) AND VendorName LIKE ‘Microsoft%’”;
$res=odbc_exec($conn, $sql);
while(odbc_fetch_row($res)){
$vulnName=odbc_result($res, 1);
$vulnDesc=odbc_result($res, 2);
$vulnImpact=odbc_result($res, 3);
print (“”.$vulnName.”<br>”.$vulnDesc.”<br>”.$vulnImpact.”<br>”);
print(“”.$vulnName.” - “.$vulnImpact.”<br></hr>”);}
}
if ($conn){
$sql=”SELECT AgentID FROM dbo.rpt_Agents WHERE AgentName LIKE ‘%HOSTNAME’”;
$res=odbc_exec($conn, $sql);
$devID=odbc_result($res,1);
print($devID.”<br>”);
$sql=”SELECT VulnerabilityID FROM dbo.rpt_VulnerabilityResults WHERE AgentID=’”.$devID.”’ AND Result=’Not Patched’”;
$res=odbc_exec($conn, $sql);
while(odbc_fetch_row($res)){
$vulnID = odbc_result($res, 1);
lookupvulnid($vulnID);
}
}else{
die(“unable to connect”);
}
?>
w00t
#n::
InputBox, patchesn, x, ,
if ErrorLevel
{
ExitApp
}else{
FileRead, kbref, C:\patches.txt
if not ErrorLevel
{
Loop %patchesn%
{
WinWait, Untitled - Notepad,
IfWinNotActive, Untitled - Notepad, , WinActivate, Untitled - Notepad,
WinWaitActive, Untitled - Notepad,
Sleep, 100
Send, %kbref%
break
}
}
}
you love how I bring the pain
got them rug burns stinging and you saying my name
say my name, uh
thats right im high post
Get the champagne love, word up we gonna toast
I’ve noticed that on some VPS’s your nameservers get reset to the default ones every time you reboot. Heres a fix:
Edit /etc/rc.local and add:
echo “nameserver 208.67.222.222” > /etc/resolv.conf
echo “nameserver 208.67.220.220” » /etc/resolv.conf
“I didn’t go to college, and now…I’m twenty-six years old, and…I’ve got my own van!”
