Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kerrigan29a/idapython_virtualenv
Enable Virtualenv or Conda in IDAPython
https://github.com/kerrigan29a/idapython_virtualenv
conda idapython python virtualenv
Last synced: 3 months ago
JSON representation
Enable Virtualenv or Conda in IDAPython
- Host: GitHub
- URL: https://github.com/kerrigan29a/idapython_virtualenv
- Owner: Kerrigan29a
- Created: 2014-11-25T09:56:29.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2020-11-11T23:53:32.000Z (about 4 years ago)
- Last Synced: 2024-02-12T15:18:07.931Z (9 months ago)
- Topics: conda, idapython, python, virtualenv
- Language: Python
- Homepage:
- Size: 5.86 KB
- Stars: 39
- Watchers: 4
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Multiples virtual envs support for IDAPython
by Javier Escalada Gómez## How to install in IDA
Open IDA and paste the folloging code:
```python
import urllib2,os,hashlib
urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler()))
original_hash = "d7c05737619aa0ef86e962832d7812338b39465b088fd55f2c8d996e8e6d72b8"
env_code = urllib2.urlopen('https://raw.githubusercontent.com/Kerrigan29a/idapython_virtualenv/master/envs.py').read()
calculated_hash = hashlib.sha256(env_code).hexdigest()
idadir = get_user_idadir()
idapythonrc_code = "from envs import detect_env; detect_env()"
if calculated_hash == original_hash:
open(os.path.join(idadir,'envs.py'),'wb').write(env_code)
open(os.path.join(idadir,'idapythonrc.py'),'ab').write(idapythonrc_code)
Warning('Please restart IDA to finish installation')
else:
Warning('Error validating download (got {} instead of {}), please try manual install'.format(calculated_hash, original_hash))
```then restart.
## Supported envs
- [Virtualenv](http://virtualenv.pypa.io/en/latest/)
- [Conda](http://conda.io/)## How it works
This script try to detect automatically if the environment variables are defined. In this case it uses them to activate the Python virtual environment. If the variable is not defined you can call this functions manually:
- [activate_virtual_env](envs.py#L34)
- [activate_conda_env](envs.py#L56)