File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change
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 )
You can’t perform that action at this time.
0 commit comments