-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5a67872
commit ff69363
Showing
43 changed files
with
375 additions
and
64 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"build": { | ||
"version": "v1.0.0-rc.1" | ||
"version": "v1.0.0-rc.2" | ||
}, | ||
"defaults": { | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Metadata-Version: 2.1 | ||
Name: heimdall | ||
Version: 1.0.0rc1 | ||
Summary: Heimdall is an advanced and modular smart-contract toolkit which aims to make dealing with smart contracts on EVM based chains easier. | ||
Home-page: https://github.com/Jon-Becker/heimdall | ||
Author: Jonathan Becker (jon-becker) | ||
Author-email: [email protected] | ||
License: MIT | ||
Keywords: ethereum,evm,decompiler,evm decompiler,smart contract,smart contract decompiler,evm smart contract decompiler,eth contract decompiler | ||
License-File: LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
LICENSE | ||
README.md | ||
setup.py | ||
heimdall/__main__.py | ||
heimdall.egg-info/PKG-INFO | ||
heimdall.egg-info/SOURCES.txt | ||
heimdall.egg-info/dependency_links.txt | ||
heimdall.egg-info/entry_points.txt | ||
heimdall.egg-info/requires.txt | ||
heimdall.egg-info/top_level.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[console_scripts] | ||
heimdall = heimdall.__main__:main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
requests | ||
web3 | ||
numpy | ||
bidict | ||
alive-progress | ||
argparse | ||
argcomplete | ||
eth_abi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
heimdall |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
import argparse | ||
import datetime | ||
from inspect import trace | ||
import os | ||
import sys | ||
import importlib | ||
import traceback | ||
|
||
from lib.modules.modules import getModules | ||
|
||
from timeit import default_timer as timer | ||
|
||
from lib.utils.colors import colorLib | ||
from lib.menus.header import getHeader | ||
from lib.menus.help import getHelp | ||
from lib.utils.logger import log | ||
from lib.utils.version import getLocalVersion, getRemoteVersion | ||
|
||
def main(argv=None): | ||
command = 'clear' | ||
if os.name in ('nt', 'dos'): | ||
command = 'cls' | ||
os.system(command) | ||
print(getHeader()) | ||
if getLocalVersion() != getRemoteVersion() and getRemoteVersion() != False: | ||
log('alert', f'This version of Heimdall is outdated!') | ||
log('alert', f'Version {colorLib.GREEN}{getRemoteVersion()}{colorLib.RESET} is available at {colorLib.GREEN}https://github.com/Jon-Becker/heimdall/releases/tag/{getRemoteVersion()}{colorLib.RESET}') | ||
|
||
heimdall = argparse.ArgumentParser(prog='heimdall', usage='heimdall [options]', add_help=False) | ||
|
||
heimdall.add_argument('-m', '--module', help="Operation module") | ||
heimdall.add_argument('-t', '--target', help="Operation target") | ||
heimdall.add_argument('-o', '--output', help="Path to write output to") | ||
heimdall.add_argument('-c', '--chain', help="Chain ID of target network") | ||
heimdall.add_argument('-p', '--provider', help="Custom provider URL") | ||
heimdall.add_argument('--redeploy', help="Redeploy contract") | ||
|
||
heimdall.add_argument('-v', '--verbose', help="Use verbose mode", action="store_true") | ||
heimdall.add_argument('-h', '--help', help="Show the help menu", action="store_true") | ||
heimdall.add_argument('--version', help="Display version information", action="store_true") | ||
heimdall.add_argument('--update', help="Update heimdall to latest release", action="store_true") | ||
heimdall.add_argument('--beautify', help="Beautify contract, using statistical renaming", action="store_true") | ||
heimdall.add_argument('--default', help="Always use defaults when prompted for input", action="store_true") | ||
heimdall.add_argument('--flush', help="Flushes the cache", action="store_true") | ||
heimdall.add_argument('--ignore-cache', help="Ignores the cache (SLOWER!)", action="store_true") | ||
|
||
args = heimdall.parse_args(argv[1:]) | ||
try: | ||
if args.help: | ||
print(getHelp()) | ||
|
||
else: | ||
if args.module: | ||
handled = False | ||
startTime = timer() | ||
|
||
available_modules = getModules(args) | ||
if args.module.lower().isdigit() and (int(args.module) <= len(available_modules[0])-1): | ||
selected_module = importlib.import_module(available_modules[0][int(args.module)]['import']) | ||
handled = True | ||
try: | ||
selected_module.main(args) | ||
except Exception as e: | ||
traceback.print_exc() | ||
log('critical', f'Execution failed! Advanced logs available.') | ||
else: | ||
for module in available_modules[0]: | ||
if args.module.lower() == module["title"].lower(): | ||
selected_module = importlib.import_module(module['import']) | ||
handled = True | ||
try: | ||
selected_module.main(args) | ||
except Exception as e: | ||
traceback.print_exc() | ||
log('critical', f'Execution failed! Advanced logs available.') | ||
|
||
if not handled: | ||
print(f'heimdall: error: Module {colorLib.YELLOW}{args.module}{colorLib.RESET} not found. Use -h to show the help menu.\n') | ||
|
||
endTime = timer() | ||
log('info', f'Operation completed in {datetime.timedelta(seconds=(endTime-startTime))}.\n') | ||
else: | ||
print('heimdall: error: Missing a mandatory option (-m or --module). Use -h to show the help menu.\n') | ||
except KeyboardInterrupt: | ||
endTime = timer() | ||
log('critical', f'Operation aborted after {datetime.timedelta(seconds=(endTime-startTime))}.\n') | ||
sys.exit(0) | ||
|
||
if __name__ == '__main__': | ||
sys.exit(main(sys.argv)) |
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.