Skip to content

Commit

Permalink
fix README
Browse files Browse the repository at this point in the history
  • Loading branch information
tkmru committed Sep 5, 2020
1 parent db6b90e commit 3d38a1d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ $ idapm init
~/idapm.json already exists...
Do you want to install a plugin written in ~/idapm.json? [Y/n]: y
----------------------
Try: git clone https://github.com/L4ys/LazyIDA.git
Cloning into '/Applications/IDA Pro 7.5/ida.app/Contents/MacOS/plugins/idapm/L4ys/LazyIDA'...
Symbolic link(/Applications/IDA Pro 7.5/ida.app/Contents/MacOS/plugins/LazyIDA.py) has been created
Installed successfully!
Expand All @@ -51,6 +52,7 @@ You can install from the specified GitHub repository.
```
$ idapm install L4ys/LazyIDA
----------------------
Try: git clone https://github.com/L4ys/LazyIDA.git
Cloning into '/Applications/IDA Pro 7.5/ida.app/Contents/MacOS/plugins/idapm/L4ys/LazyIDA'...
Symbolic link(/Applications/IDA Pro 7.5/ida.app/Contents/MacOS/plugins/LazyIDA.py) has been created.
Installed successfully!
Expand Down
20 changes: 14 additions & 6 deletions idapm/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,24 @@ def cmd_init(args):

else:
print('~/idapm.json already exists...')
input_pattern = {'y': True, 'yes': True, 'n': False, 'no': False}
while True:
input_pattern = {'y': True, 'yes': True, 'n': False, 'no': False}
try:
key = input('Do you want to install a plugin written in ~/idapm.json? [Y/n]: ').lower()
if input_pattern[key]:
plugin_repos = c.list_plugins()
for plugin in plugin_repos:
print('----------------------')
try:
repo_url = 'https://github.com/{0}.git'.format(repo_name)
repo_url = 'https://github.com/{0}.git'.format(plugin)
print('Try: git clone {0}'.format(repo_url))
installer.install_from_github(plugin, repo_url)

except:
repo_url = '[email protected]:{0}.git'.format(repo_name)
repo_url = '[email protected]:{0}.git'.format(plugin)
print('Try: git clone {0}'.format(repo_url))
installer.install_from_github(plugin, repo_url)

break

except:
Expand All @@ -60,9 +61,16 @@ def cmd_install(args):
if c.check_duplicate(args.plugin_name):
print(Fore.RED + '{0} already exists in config'.format(args.plugin_name))
input_pattern = {'y': True, 'yes': True, 'n': False, 'no': False}
key = input('Do you want to reinstall {0}? [Y/n]: '.format(args.plugin_name)).lower()
if not input_pattern[key]:
return
while True:
try:
key = input('Do you want to reinstall {0}? [Y/n]: '.format(args.plugin_name)).lower()
if not input_pattern[key]:
return
else:
break

except:
pass

print('----------------------')
repo_https_url = 'https://github.com/{0}.git'.format(args.plugin_name)
Expand Down

0 comments on commit 3d38a1d

Please sign in to comment.