Skip to content

Commit 562bd5b

Browse files
committed
Advancemant of functional autoupload.py
Signed-off-by: Nir Izraeli <nirizr@gmail.com>
1 parent 2fb6d09 commit 562bd5b

File tree

1 file changed

+23
-8
lines changed

1 file changed

+23
-8
lines changed

idaplugin/rematch/autoupload.py

+23-8
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,34 @@
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+
add_file_silent = dialogs.silent.SilentDialog(calls)
17+
actions.project.AddFileAction(add_file_silent).activate(None)
1418

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

1833

1934
if __name__ == "__main__":

0 commit comments

Comments
 (0)