-
Notifications
You must be signed in to change notification settings - Fork 8
/
ScriptShellServer.py
55 lines (47 loc) · 1.59 KB
/
ScriptShellServer.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#! /usr/bin/env python
"""
CANVAS Scripting shell server for Scripting languages like PHP and Python and whatnot
"""
#Proprietary CANVAS source code - use only under the license agreement
#specified in LICENSE.txt in your CANVAS distribution
#Copyright Immunity, Inc, 2002-2006
#http://www.immunityinc.com/CANVAS/ for more information
from shellserver import shellserver
from exploitutils import *
import time
import os
import socket
from phplistener import phplistener
class phpshellserver( phplistener):
"""
PHP Shell Listener
"""
def __init__(self,connection,node,logfunction=None):
#shellserver.__init__(self,connection,node,type="Active",logfunction=logfunction)
self.arch="x86"
self.order=intel_order
self.unorder=istr2int
self.connection=connection
self.node=node
self.node.shell=self
self.started= 0
self.logfunction = logfunction
self.engine=node.engine
return
def startup(self):
"""
Start this process...
"""
if self.started:
return
self.log("Startup PHP Script Shell Server...")
self.started=1
phplistener.__init__(self,self.connection,logfunction=self.logfunction)
phplistener.startup(self)
print self.node.shell
self.log("Set up shell listener")
#ok, now our mainloop code is running over on the other side
self.log("Set up PHP shell server")
#self.sendrequest(mainloop)
self.node.getInfo()
return 1