Skip to content
Open
Show file tree
Hide file tree
Changes from 16 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
revsync
=======

Realtime IDA Pro and Binary Ninja sync plugin
Realtime sync plugin for IDA Pro, Binary Ninja and Vivisect

Syncs:

Expand Down Expand Up @@ -49,3 +49,17 @@ Then:
- Load your binary, wait for analysis to finish
- Use the Tools Menu, Right-Click or command-palette (CMD/CTL-P) to trigger revsync/Load
-Done!


Vivisect Installation
---------------------

- Clone to [a plugin folder in your VIV_EXT_PATH (or ~/.viv/plugins/)](https://github.com/vivisect/vivisect/#extending-vivisect--vdb).

Then:

- Restart Vivisect
- Fill in config when prompted.
- Load your binary, wait for analysis to finish
- Use the Plugins -> revsync -> Load option to trigger revsync/Load
-Done!
74 changes: 55 additions & 19 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,57 @@ def write_config(host, port, nick, password):

try:
import binaryninja
import binaryninja.interaction as bi
try:
import config
except ImportError:
host_f = bi.TextLineField("host")
port_f = bi.IntegerField("port")
nick_f = bi.TextLineField("nick")
password_f = bi.TextLineField("password")
success = bi.get_form_input([None, host_f, port_f, nick_f, password_f], "Configure Revsync")
if not success:
binaryninja.interaction.show_message_box(title="Revsync error", text="Failed to configure revsync")
raise

write_config(host_f.result, port_f.result, nick_f.result, password_f.result)
import config
import binja_frontend
#import binja_coverage
good = True
# check if running in BinaryNinja:
if binaryninja.core_ui_enabled():
import binaryninja.interaction as bi
try:
import config
except ImportError:
host_f = bi.TextLineField("host")
port_f = bi.IntegerField("port")
nick_f = bi.TextLineField("nick")
password_f = bi.TextLineField("password")
success = bi.get_form_input([None, host_f, port_f, nick_f, password_f], "Configure Revsync")
if not success:
binaryninja.interaction.show_message_box(title="Revsync error", text="Failed to configure revsync")
raise

write_config(host_f.result, port_f.result, nick_f.result, password_f.result)
import config
import binja_frontend
#import binja_coverage
good = True
except ImportError:
pass

# check if running in Vivisect:
if 'vw' in globals():
try:
import vivisect
try:
import config
except ImportError:
import vqt.common as vcmn
dynd = vcmn.DynamicDialog('RevSync Config')
dynd.addTextField("host")
dynd.addIntHexField("port", dflt=6379)
dynd.addTextField("nick")
dynd.addTextField("password")
res = dynd.prompt()
if not len(res):
vcmn.warning("Revsync error", "Failed to configure revsync")
raise

write_config(res.get('host'), res.get('port'), res.get('nick'), res.get('password'))
import config

import viv_frontend
good = True
except ImportError:
pass


# if idaapi loads, go with it.
try:
import idaapi
import ida_frontend
Expand All @@ -47,5 +77,11 @@ def write_config(host, port, nick, password):
pass

if not good:
print('Warning: both IDA and Binary Ninja plugin API imports failed')
print('Warning: Could not find an appropriate plugin environment: IDA, Binary Ninja, and Vivisect plugin API imports failed')
raise ImportError

# Vivisect looks for this in a plugin
def vivExtension(vw, vwgui):
import viv_frontend
viv_frontend.vivExtension(vw, vwgui)

1 change: 0 additions & 1 deletion binja_coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import logging
import random

logging.disable(logging.WARNING)
COVERAGE_FIRST_LOAD = True
SHOW_VISITS = True
SHOW_LENGTH = True
Expand Down
2 changes: 1 addition & 1 deletion ida_frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def onmsg(key, data, replay=False):
print('revsync: <%s> %s %s %s' % (user, cmd, data['range'], data['text']))
elif cmd == 'rename':
print('revsync: <%s> %s %#x %s' % (user, cmd, ea, data['text']))
set_name(ea, str(data['text']))
set_name(ea, str(data['text']).replace(' ', '_'))
elif cmd == 'join':
print('revsync: <%s> joined' % (user))
elif cmd in ['stackvar_renamed', 'struc_created', 'struc_deleted',
Expand Down
Loading