Skip to content

Commit a639830

Browse files
committed
Advancemant of functional autoupload.py
Signed-off-by: Nir Izraeli <[email protected]>
1 parent 9d7a1b1 commit a639830

File tree

1 file changed

+28
-8
lines changed

1 file changed

+28
-8
lines changed

idaplugin/rematch/autoupload.py

+28-8
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,39 @@
11
import idaapi
22

3-
from . import actions
4-
from . import dialogs
3+
try:
4+
import rematch.actions as actions
5+
import rematch.dialogs as dialogs
6+
except ImportError:
7+
from . import actions
8+
from . import dialogs
59

610

711
def main():
812
# add file
9-
add_file_silent = dialogs.silent.SilentDialog([['submit', {}],
10-
['response', {}]])
11-
actions.project.AddFileAction(add_file_silent).activate(None)
1213
description = "Automatically collected / uploaded by autoupload.py"
13-
##############
14+
calls = [['submit', {'project': -1, 'name': "filename", 'md5hash': "hash",
15+
'description': description, 'shareidb': True}],
16+
# ['response', {'response': ""}]]
17+
]
18+
add_file_silent = dialogs.silent.SilentDialog(calls)
19+
actions.project.AddFileAction(add_file_silent).activate(None)
1420

15-
# upload data
16-
# actions.match.MatchAction(MatchSilentUI)
21+
##############
22+
# skipped: add a project for file
23+
calls = [['submit', {'name': "proj_name", 'description': description,
24+
'private': False, 'bind_current': True}],
25+
# ['response', {}]]
26+
]
27+
add_file_silent = dialogs.silent.SilentDialog(calls)
28+
29+
# upload data and start matching
30+
calls = [['submit': {'source': 'idb', 'source_single': None,
31+
'source_range': None, 'target': 'db',
32+
'target_project': None, 'target_file': None,
33+
'matchers': None}],
34+
]
35+
match_silent = dialogs.silent.SilentDialog(calls)
36+
actions.match.MatchAction(match_silent).activate(None)
1737

1838

1939
if __name__ == "__main__":

0 commit comments

Comments
 (0)