Skip to content

Commit

Permalink
Advancemant of functional autoupload.py
Browse files Browse the repository at this point in the history
Signed-off-by: Nir Izraeli <[email protected]>
  • Loading branch information
nirizr committed Jun 18, 2017
1 parent 179adbc commit 31dc18f
Showing 1 changed file with 23 additions and 8 deletions.
31 changes: 23 additions & 8 deletions idaplugin/rematch/autoupload.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,34 @@
import idaapi

from . import actions
from . import dialogs
try:
import rematch.actions as actions
import rematch.dialogs as dialogs
except ImportError:
from . import actions
from . import dialogs


def main():
# add file
add_file_silent = dialogs.silent.SilentDialog([['submit', {}],
['response', {}]])
actions.project.AddFileAction(add_file_silent).activate(None)
description = "Automatically collected / uploaded by autoupload.py"
##############
calls = [('submit', {'project': -1, 'name': "filename", 'md5hash': "hash",
'description': description, 'shareidb': True})]
add_file_silent = dialogs.silent.SilentDialog(calls)
actions.project.AddFileAction(add_file_silent).activate(None)

# upload data
# actions.match.MatchAction(MatchSilentUI)
##############
# skipped: add a project for file
calls = [('submit', {'name': "proj_name", 'description': description,
'private': False, 'bind_current': True})]
add_file_silent = dialogs.silent.SilentDialog(calls)

# upload data and start matching
calls = [('submit', {'source': 'idb', 'source_single': None,
'source_range': None, 'target': 'db',
'target_project': None, 'target_file': None,
'matchers': None})]
match_silent = dialogs.silent.SilentDialog(calls)
actions.match.MatchAction(match_silent).activate(None)


if __name__ == "__main__":
Expand Down

0 comments on commit 31dc18f

Please sign in to comment.