This repository has been archived by the owner on Jan 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 60
/
skelenox.py
84 lines (63 loc) · 1.78 KB
/
skelenox.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
"""
Skelenox: the collaborative IDA Pro Agent
This file is part of Polichombr
(c) ANSSI-FR 2018
"""
import os
import logging
import idaapi
from skelenox_plugin.core import SkelCore
g_logger = logging.getLogger(__name__)
for h in g_logger.handlers:
g_logger.removeHandler(h)
g_logger.setLevel(logging.DEBUG)
handler = logging.StreamHandler()
format_str = '[%(asctime)s] [%(levelname)s] [%(threadName)s]: %(message)s'
formatter = logging.Formatter(format_str, datefmt='%d/%m/%Y %I:%M:%S')
handler.setFormatter(formatter)
g_logger.addHandler(handler)
def launch_skelenox():
"""
Create the instance and launch it
"""
configname = os.path.dirname(__file__) + "/" + "skelsettings.json"
skelenox = SkelCore(configname)
skelenox.run()
return skelenox
def PLUGIN_ENTRY():
"""
IDAPython plugin wrapper
"""
idaapi.auto_wait()
return SkelenoxPlugin()
class SkelenoxPlugin(idaapi.plugin_t):
"""
Classic IDAPython plugin
"""
PLUGIN_NAME = "Skelenox"
flags = idaapi.PLUGIN_UNL
comment = "Skelenox"
help = "Polichombr collaboration agent"
wanted_name = "Skelenox"
wanted_hotkey = "Ctrl-F4"
skel_object = None
def init(self):
"""
IDA plugin init
"""
self.icon_id = 0
self.skel_object = None
return idaapi.PLUGIN_OK
def run(self, arg=0):
self.skel_object = launch_skelenox()
return
def term(self):
if self.skel_object is not None:
self.skel_object.end_skelenox()
if __name__ == '__main__':
# run as a script
idaapi.auto_wait()
if "skel" in globals() and skel is not None:
g_logger.info("Previous instance found, killing it")
skel.end_skelenox()
skel = launch_skelenox()