Permalink
Browse files

There is no need to edit idapythonrc under IDA 7.0

Thank you Igor from Hex-Rays for telling us about it!
  • Loading branch information...
NeatMonster committed Sep 23, 2018
1 parent e95dc36 commit 808c56550ffcb8f97112c5267f19c3e14dea9ef4
Showing with 33 additions and 77 deletions.
  1. +21 −26 README.md
  2. +12 −50 easy_install.py
  3. +0 −1 idarling/core/events.py
@@ -10,11 +10,18 @@ allows to synchronize in real-time the changes made to a database by multiple
users, by connecting together different instances of IDA Pro.

The main features of IDArling are:
* live recording and replaying of all user interactions;
* loading and saving of IDA databases to a central server;
* interactive IDA status bar widget and custom dialogs;
* Python plugin and server with no extra dependencies;
* and even more to come...
* hooking general user events
* structure and enumeration support
* Hex-Rays decompiler syncing
* replay engine and auto-saving
* database loading and saving
* interactive status bar widget
* user cursors (instructions, functions, navbar)
* invite and following an user moves
* dedicated server using Qt5
* integrated server within IDA
* LAN servers discovery
* following an user moves in real time

If you have any questions not worthy of a bug report, feel free to ping us at
[#idarling on freenode](https://kiwiirc.com/client/irc.freenode.net/idarling)
@@ -33,16 +40,16 @@ release of the project!**
Install the IDArling client into the IDA plugins folder.

- Copy `idarling_plugin.py` and the `idarling` folder to the IDA plugins folder.
- On Windows, the folder is at `C:\Program Files\IDA 7.0\plugins`
- On macOS, the folder is at `/Applications/IDA\ Pro\ 7.0/idaq.app/Contents/MacOS/plugins`
- On Linux, the folder may be at `/opt/IDA/plugins/`
- On Windows, the folder is at `C:\Program Files\IDA 7.x\plugins`
- On macOS, the folder is at `/Applications/IDA\ Pro\ 7.x/idabin/plugins`
- On Linux, the folder may be at `~/ida-7.x/plugins/`
- Alternatively, you can use the "easy install" method by copying the following
line into the console:
```
import urllib2; exec(urllib2.urlopen('https://raw.githubusercontent.com/IDArlingTeam/IDArling/master/easy_install.py')).read()
```

**Warning:** The plugin is only compatible with IDA Pro 7.0 on Windows, macOS,
**Warning:** The plugin is only compatible with IDA Pro 7.x on Windows, macOS,
and Linux.

The dedicated server requires PyQt5, which is integrated into IDA. If you're
@@ -51,29 +58,17 @@ a pre-built package that can be installed with a simple `pip install PyQt5`.

## Usage

IDArling loads automatically when IDA is opened, installing new elements into
the user interface.

First use the widget in the status bar to add the server of your choice in the
*Network Settings*. Then connect to the server using the widget again. Finally,
you should be able to access the following menus:
Open the *Settings* dialog accessible from the right-clicking the widget located
in the status bar. Show the servers list by clicking on the *Network Settings*
tabs and add your server to it. Connect to the server by clicking on it after
right-clicking the widget again. Finally, you should be able to access the
following menus to upload or download a database:

```
- File --> Open from server
- File --> Save to server
```

## FAQ

* Where is my old servers?

In commit `08eca13d4ecd51cd518cb54546f971e3b43edf04`, the config file name was
changed from `state.json` to `config.json` to enhance the config file storage.
Thus, your old servers won't be displayed in your server list. But don't worry,
you can still find them in your previous config file. The path of your config
file depends your platform. For example, under Linux, the path should be
`$HOME/.idapro/idarling/files/state.json`.

# Thanks

This project is inspired by [Sol[IDA]rity](https://solidarity.re/). It started
@@ -12,7 +12,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import os
import shutil
import sys
import urllib2
import zipfile

@@ -24,42 +23,36 @@
URL = "https://github.com/IDArlingTeam/IDArling/archive/master.zip"

print("[*] Installing IDArling...")
if os.name == "nt":
# Install into the user directory on Windows
user_dir = ida_diskio.get_user_idadir()
if not os.path.exists(user_dir):
os.makedirs(user_dir, 493) # 0755
dest_dir = os.path.join(user_dir, "idarling")
if not os.path.exists(dest_dir):
os.makedirs(dest_dir, 493) # 0755
else:
# Install into the plugins directory on Linux/macOS
dest_dir = os.path.join(ida_diskio.idadir(None), "plugins")
# Install into the user directory on all platforms
user_dir = ida_diskio.get_user_idadir()
plug_dir = os.path.join(user_dir, "plugins")
if not os.path.exists(plug_dir):
os.makedirs(plug_dir, 493) # 0755

print("[*] Downloading master.zip archive...")
archive_path = os.path.join(dest_dir, "master.zip")
archive_path = os.path.join(plug_dir, "master.zip")
if os.path.exists(archive_path):
os.remove(archive_path)
with open(archive_path, "wb") as f:
f.write(urllib2.urlopen(URL).read())

print("[*] Unzipping master.zip archive...")
archive_dir = os.path.join(dest_dir, "IDArling-master")
archive_dir = os.path.join(plug_dir, "IDArling-master")
if os.path.exists(archive_dir):
shutil.rmtree(archive_dir)
with zipfile.ZipFile(archive_path, "r") as zip:
for zip_file in zip.namelist():
if zip_file.startswith(os.path.basename(archive_dir)):
zip.extract(zip_file, dest_dir)
zip.extract(zip_file, plug_dir)

print("[*] Moving the IDArling files...")
src_path = os.path.join(archive_dir, "idarling_plugin.py")
dst_path = os.path.join(dest_dir, os.path.basename(src_path))
dst_path = os.path.join(plug_dir, os.path.basename(src_path))
if os.path.exists(dst_path):
os.remove(dst_path)
shutil.move(src_path, dst_path)
src_dir = os.path.join(archive_dir, "idarling")
dst_dir = os.path.join(dest_dir, os.path.basename(src_dir))
dst_dir = os.path.join(plug_dir, os.path.basename(src_dir))
if os.path.exists(dst_dir):
shutil.rmtree(dst_dir)
shutil.move(src_dir, dst_dir)
@@ -71,38 +64,7 @@
shutil.rmtree(archive_dir)

print("[*] Loading IDArling into IDA Pro...")
if os.name == "nt":
content = """
#-----BEGIN IDARLING-----
import os
import ida_diskio
import ida_kernwin
import ida_loader
def load():
user_dir = ida_diskio.get_user_idadir()
plugin_dir = os.path.join(user_dir, 'idarling')
plugin_path = os.path.join(plugin_dir, 'idarling_plugin.py')
ida_loader.load_plugin(plugin_path)
ida_kernwin.register_timer(0, load)
#-----END IDARLING-----
"""
sys.path.append(dest_dir)
exec(content)

print("[*] Editing idapythonrc.py file...")
user_dir = ida_diskio.get_user_idadir()
idapyrc_path = os.path.join(user_dir, "idapythonrc.py")
idapyrc_content = ""
if os.path.exists(idapyrc_path):
with open(idapyrc_path, "r") as f:
idapyrc_content = f.read()

if content.split("\n")[1] not in idapyrc_content:
with open(idapyrc_path, "a") as f:
f.write(content)
else:
plugin_path = os.path.join(dest_dir, "idarling_plugin.py")
ida_loader.load_plugin(plugin_path)
plugin_path = os.path.join(plug_dir, "idarling_plugin.py")
ida_loader.load_plugin(plugin_path)

print("[*] IDArling installed successfully!")
@@ -14,7 +14,6 @@

import ida_bytes
import ida_enum
import ida_frame
import ida_funcs
import ida_hexrays
import ida_kernwin

0 comments on commit 808c565

Please sign in to comment.