Skip to content

Commit 43b6a70

Browse files
committed
[WIP] add automatic multiple gui-less idb upload
Signed-off-by: Nir Izraeli <nirizr@gmail.com>
1 parent 5839908 commit 43b6a70

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

idaplugin/rematch/autoupload.py

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import idc
2+
import idaapi
3+
4+
from . import network
5+
from . import actions
6+
7+
8+
class AddFileSilentUI:
9+
pass
10+
11+
12+
def main():
13+
# add file
14+
actions.project.AddFileAction(AddFileSilentUI)
15+
description = "Automatically collected / uploaded by autoupload.py"
16+
##############
17+
data = {'project': None, 'name': idc.GetInputFile(),
18+
'md5hash': idc.GetInputMD5(), 'description': description,
19+
'instances': []}
20+
21+
response = network.query("POST", "collab/files/", params=data, json=True)
22+
# TODO: validate response
23+
24+
# upload data
25+
26+
27+
if __name__ == "__main__":
28+
# action = str(idc.ARGV[1])
29+
# task_id = int(idc.ARGV[2])
30+
# owner_id = int(idc.ARGV[3])
31+
32+
# wait until autoanalysis is done, if needed
33+
idaapi.autoWait()
34+
35+
main()
36+
37+
# and exit the IDA instance
38+
idaapi.qexit(0)

0 commit comments

Comments
 (0)