mirror of https://github.com/ConsenSys/mythril
commit
0b66e0207c
@ -0,0 +1,19 @@ |
||||
# Minimal makefile for Sphinx documentation
|
||||
#
|
||||
|
||||
# You can set these variables from the command line.
|
||||
SPHINXOPTS =
|
||||
SPHINXBUILD = sphinx-build
|
||||
SOURCEDIR = source
|
||||
BUILDDIR = build
|
||||
|
||||
# Put it first so that "make" without argument is like "make help".
|
||||
help: |
||||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||
|
||||
.PHONY: help Makefile |
||||
|
||||
# Catch-all target: route all unknown targets to Sphinx using the new
|
||||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
||||
%: Makefile |
||||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
@ -0,0 +1,35 @@ |
||||
@ECHO OFF |
||||
|
||||
pushd %~dp0 |
||||
|
||||
REM Command file for Sphinx documentation |
||||
|
||||
if "%SPHINXBUILD%" == "" ( |
||||
set SPHINXBUILD=sphinx-build |
||||
) |
||||
set SOURCEDIR=source |
||||
set BUILDDIR=build |
||||
|
||||
if "%1" == "" goto help |
||||
|
||||
%SPHINXBUILD% >NUL 2>NUL |
||||
if errorlevel 9009 ( |
||||
echo. |
||||
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx |
||||
echo.installed, then set the SPHINXBUILD environment variable to point |
||||
echo.to the full path of the 'sphinx-build' executable. Alternatively you |
||||
echo.may add the Sphinx directory to PATH. |
||||
echo. |
||||
echo.If you don't have Sphinx installed, grab it from |
||||
echo.http://sphinx-doc.org/ |
||||
exit /b 1 |
||||
) |
||||
|
||||
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% |
||||
goto end |
||||
|
||||
:help |
||||
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% |
||||
|
||||
:end |
||||
popd |
@ -0,0 +1,190 @@ |
||||
# -*- coding: utf-8 -*- |
||||
# |
||||
# Configuration file for the Sphinx documentation builder. |
||||
# |
||||
# This file does only contain a selection of the most common options. For a |
||||
# full list see the documentation: |
||||
# http://www.sphinx-doc.org/en/master/config |
||||
|
||||
# -- Path setup -------------------------------------------------------------- |
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory, |
||||
# add these directories to sys.path here. If the directory is relative to the |
||||
# documentation root, use os.path.abspath to make it absolute, like shown here. |
||||
|
||||
import os |
||||
import sys |
||||
|
||||
sys.path.insert(0, os.path.abspath("../../")) |
||||
|
||||
|
||||
# -- Project information ----------------------------------------------------- |
||||
|
||||
project = "Mythril Classic" |
||||
copyright = "2018, Bernhard Mueller" |
||||
author = "Bernhard Mueller" |
||||
|
||||
# The short X.Y version |
||||
version = "" |
||||
# The full version, including alpha/beta/rc tags |
||||
from mythril.version import VERSION |
||||
|
||||
release = VERSION |
||||
|
||||
|
||||
# -- General configuration --------------------------------------------------- |
||||
|
||||
# If your documentation needs a minimal Sphinx version, state it here. |
||||
# |
||||
# needs_sphinx = '1.0' |
||||
|
||||
# Add any Sphinx extension module names here, as strings. They can be |
||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
||||
# ones. |
||||
extensions = [ |
||||
"sphinx.ext.autodoc", |
||||
"sphinx.ext.coverage", |
||||
"sphinx.ext.mathjax", |
||||
"sphinx.ext.viewcode", |
||||
] |
||||
|
||||
# Add any paths that contain templates here, relative to this directory. |
||||
templates_path = ["_templates"] |
||||
|
||||
# The suffix(es) of source filenames. |
||||
# You can specify multiple suffix as a list of string: |
||||
# |
||||
# source_suffix = ['.rst', '.md'] |
||||
source_suffix = ".rst" |
||||
|
||||
# The master toctree document. |
||||
master_doc = "index" |
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation |
||||
# for a list of supported languages. |
||||
# |
||||
# This is also used if you do content translation via gettext catalogs. |
||||
# Usually you set "language" from the command line for these cases. |
||||
language = None |
||||
|
||||
# List of patterns, relative to source directory, that match files and |
||||
# directories to ignore when looking for source files. |
||||
# This pattern also affects html_static_path and html_extra_path. |
||||
exclude_patterns = [] |
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use. |
||||
pygments_style = None |
||||
|
||||
|
||||
# -- Options for HTML output ------------------------------------------------- |
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for |
||||
# a list of builtin themes. |
||||
# |
||||
html_theme = "alabaster" |
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme |
||||
# further. For a list of options available for each theme, see the |
||||
# documentation. |
||||
# |
||||
# html_theme_options = {} |
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here, |
||||
# relative to this directory. They are copied after the builtin static files, |
||||
# so a file named "default.css" will overwrite the builtin "default.css". |
||||
html_static_path = ["_static"] |
||||
|
||||
# Custom sidebar templates, must be a dictionary that maps document names |
||||
# to template names. |
||||
# |
||||
# The default sidebars (for documents that don't match any pattern) are |
||||
# defined by theme itself. Builtin themes are using these templates by |
||||
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html', |
||||
# 'searchbox.html']``. |
||||
# |
||||
# html_sidebars = {} |
||||
|
||||
|
||||
# -- Options for HTMLHelp output --------------------------------------------- |
||||
|
||||
# Output file base name for HTML help builder. |
||||
htmlhelp_basename = "MythrilClassicdoc" |
||||
|
||||
|
||||
# -- Options for LaTeX output ------------------------------------------------ |
||||
|
||||
latex_elements = { |
||||
# The paper size ('letterpaper' or 'a4paper'). |
||||
# |
||||
# 'papersize': 'letterpaper', |
||||
# The font size ('10pt', '11pt' or '12pt'). |
||||
# |
||||
# 'pointsize': '10pt', |
||||
# Additional stuff for the LaTeX preamble. |
||||
# |
||||
# 'preamble': '', |
||||
# Latex figure (float) alignment |
||||
# |
||||
# 'figure_align': 'htbp', |
||||
} |
||||
|
||||
# Grouping the document tree into LaTeX files. List of tuples |
||||
# (source start file, target name, title, |
||||
# author, documentclass [howto, manual, or own class]). |
||||
latex_documents = [ |
||||
( |
||||
master_doc, |
||||
"MythrilClassic.tex", |
||||
"Mythril Classic Documentation", |
||||
"Bernhard Mueller", |
||||
"manual", |
||||
) |
||||
] |
||||
|
||||
|
||||
# -- Options for manual page output ------------------------------------------ |
||||
|
||||
# One entry per manual page. List of tuples |
||||
# (source start file, name, description, authors, manual section). |
||||
man_pages = [ |
||||
(master_doc, "mythrilclassic", "Mythril Classic Documentation", [author], 1) |
||||
] |
||||
|
||||
|
||||
# -- Options for Texinfo output ---------------------------------------------- |
||||
|
||||
# Grouping the document tree into Texinfo files. List of tuples |
||||
# (source start file, target name, title, author, |
||||
# dir menu entry, description, category) |
||||
texinfo_documents = [ |
||||
( |
||||
master_doc, |
||||
"MythrilClassic", |
||||
"Mythril Classic Documentation", |
||||
author, |
||||
"MythrilClassic", |
||||
"One line description of project.", |
||||
"Miscellaneous", |
||||
) |
||||
] |
||||
|
||||
|
||||
# -- Options for Epub output ------------------------------------------------- |
||||
|
||||
# Bibliographic Dublin Core info. |
||||
epub_title = project |
||||
|
||||
# The unique identifier of the text. This can be a ISBN number |
||||
# or the project homepage. |
||||
# |
||||
# epub_identifier = '' |
||||
|
||||
# A unique identification for the text. |
||||
# |
||||
# epub_uid = '' |
||||
|
||||
# A list of files that should not be packed into the epub file. |
||||
epub_exclude_files = ["search.html"] |
||||
|
||||
|
||||
# -- Extension configuration ------------------------------------------------- |
@ -0,0 +1,17 @@ |
||||
Welcome to Mythril Classic's documentation! |
||||
=========================================== |
||||
|
||||
.. toctree:: |
||||
:maxdepth: 3 |
||||
:caption: Package Contents: |
||||
|
||||
mythril |
||||
|
||||
|
||||
|
||||
Indices and tables |
||||
================== |
||||
|
||||
* :ref:`genindex` |
||||
* :ref:`modindex` |
||||
* :ref:`search` |
@ -0,0 +1,7 @@ |
||||
mythril |
||||
======= |
||||
|
||||
.. toctree:: |
||||
:maxdepth: 4 |
||||
|
||||
mythril |
@ -0,0 +1,110 @@ |
||||
mythril.analysis.modules package |
||||
================================ |
||||
|
||||
Submodules |
||||
---------- |
||||
|
||||
mythril.analysis.modules.base module |
||||
------------------------------------ |
||||
|
||||
.. automodule:: mythril.analysis.modules.base |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.analysis.modules.delegatecall module |
||||
-------------------------------------------- |
||||
|
||||
.. automodule:: mythril.analysis.modules.delegatecall |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.analysis.modules.dependence\_on\_predictable\_vars module |
||||
----------------------------------------------------------------- |
||||
|
||||
.. automodule:: mythril.analysis.modules.dependence_on_predictable_vars |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.analysis.modules.deprecated\_ops module |
||||
----------------------------------------------- |
||||
|
||||
.. automodule:: mythril.analysis.modules.deprecated_ops |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.analysis.modules.ether\_thief module |
||||
-------------------------------------------- |
||||
|
||||
.. automodule:: mythril.analysis.modules.ether_thief |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.analysis.modules.exceptions module |
||||
------------------------------------------ |
||||
|
||||
.. automodule:: mythril.analysis.modules.exceptions |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.analysis.modules.external\_calls module |
||||
----------------------------------------------- |
||||
|
||||
.. automodule:: mythril.analysis.modules.external_calls |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.analysis.modules.integer module |
||||
--------------------------------------- |
||||
|
||||
.. automodule:: mythril.analysis.modules.integer |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.analysis.modules.multiple\_sends module |
||||
----------------------------------------------- |
||||
|
||||
.. automodule:: mythril.analysis.modules.multiple_sends |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.analysis.modules.suicide module |
||||
--------------------------------------- |
||||
|
||||
.. automodule:: mythril.analysis.modules.suicide |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.analysis.modules.transaction\_order\_dependence module |
||||
-------------------------------------------------------------- |
||||
|
||||
.. automodule:: mythril.analysis.modules.transaction_order_dependence |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.analysis.modules.unchecked\_retval module |
||||
------------------------------------------------- |
||||
|
||||
.. automodule:: mythril.analysis.modules.unchecked_retval |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
|
||||
Module contents |
||||
--------------- |
||||
|
||||
.. automodule:: mythril.analysis.modules |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
@ -0,0 +1,85 @@ |
||||
mythril.analysis package |
||||
======================== |
||||
|
||||
Subpackages |
||||
----------- |
||||
|
||||
.. toctree:: |
||||
|
||||
mythril.analysis.modules |
||||
|
||||
Submodules |
||||
---------- |
||||
|
||||
mythril.analysis.callgraph module |
||||
--------------------------------- |
||||
|
||||
.. automodule:: mythril.analysis.callgraph |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.analysis.ops module |
||||
--------------------------- |
||||
|
||||
.. automodule:: mythril.analysis.ops |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.analysis.report module |
||||
------------------------------ |
||||
|
||||
.. automodule:: mythril.analysis.report |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.analysis.security module |
||||
-------------------------------- |
||||
|
||||
.. automodule:: mythril.analysis.security |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.analysis.solver module |
||||
------------------------------ |
||||
|
||||
.. automodule:: mythril.analysis.solver |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.analysis.swc\_data module |
||||
--------------------------------- |
||||
|
||||
.. automodule:: mythril.analysis.swc_data |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.analysis.symbolic module |
||||
-------------------------------- |
||||
|
||||
.. automodule:: mythril.analysis.symbolic |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.analysis.traceexplore module |
||||
------------------------------------ |
||||
|
||||
.. automodule:: mythril.analysis.traceexplore |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
|
||||
Module contents |
||||
--------------- |
||||
|
||||
.. automodule:: mythril.analysis |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
@ -0,0 +1,30 @@ |
||||
mythril.disassembler package |
||||
============================ |
||||
|
||||
Submodules |
||||
---------- |
||||
|
||||
mythril.disassembler.asm module |
||||
------------------------------- |
||||
|
||||
.. automodule:: mythril.disassembler.asm |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.disassembler.disassembly module |
||||
--------------------------------------- |
||||
|
||||
.. automodule:: mythril.disassembler.disassembly |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
|
||||
Module contents |
||||
--------------- |
||||
|
||||
.. automodule:: mythril.disassembler |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
@ -0,0 +1,46 @@ |
||||
mythril.ethereum.interface.leveldb package |
||||
========================================== |
||||
|
||||
Submodules |
||||
---------- |
||||
|
||||
mythril.ethereum.interface.leveldb.accountindexing module |
||||
--------------------------------------------------------- |
||||
|
||||
.. automodule:: mythril.ethereum.interface.leveldb.accountindexing |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.ethereum.interface.leveldb.client module |
||||
------------------------------------------------ |
||||
|
||||
.. automodule:: mythril.ethereum.interface.leveldb.client |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.ethereum.interface.leveldb.eth\_db module |
||||
------------------------------------------------- |
||||
|
||||
.. automodule:: mythril.ethereum.interface.leveldb.eth_db |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.ethereum.interface.leveldb.state module |
||||
----------------------------------------------- |
||||
|
||||
.. automodule:: mythril.ethereum.interface.leveldb.state |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
|
||||
Module contents |
||||
--------------- |
||||
|
||||
.. automodule:: mythril.ethereum.interface.leveldb |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
@ -0,0 +1,54 @@ |
||||
mythril.ethereum.interface.rpc package |
||||
====================================== |
||||
|
||||
Submodules |
||||
---------- |
||||
|
||||
mythril.ethereum.interface.rpc.base\_client module |
||||
-------------------------------------------------- |
||||
|
||||
.. automodule:: mythril.ethereum.interface.rpc.base_client |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.ethereum.interface.rpc.client module |
||||
-------------------------------------------- |
||||
|
||||
.. automodule:: mythril.ethereum.interface.rpc.client |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.ethereum.interface.rpc.constants module |
||||
----------------------------------------------- |
||||
|
||||
.. automodule:: mythril.ethereum.interface.rpc.constants |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.ethereum.interface.rpc.exceptions module |
||||
------------------------------------------------ |
||||
|
||||
.. automodule:: mythril.ethereum.interface.rpc.exceptions |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.ethereum.interface.rpc.utils module |
||||
------------------------------------------- |
||||
|
||||
.. automodule:: mythril.ethereum.interface.rpc.utils |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
|
||||
Module contents |
||||
--------------- |
||||
|
||||
.. automodule:: mythril.ethereum.interface.rpc |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
@ -0,0 +1,18 @@ |
||||
mythril.ethereum.interface package |
||||
================================== |
||||
|
||||
Subpackages |
||||
----------- |
||||
|
||||
.. toctree:: |
||||
|
||||
mythril.ethereum.interface.leveldb |
||||
mythril.ethereum.interface.rpc |
||||
|
||||
Module contents |
||||
--------------- |
||||
|
||||
.. automodule:: mythril.ethereum.interface |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
@ -0,0 +1,37 @@ |
||||
mythril.ethereum package |
||||
======================== |
||||
|
||||
Subpackages |
||||
----------- |
||||
|
||||
.. toctree:: |
||||
|
||||
mythril.ethereum.interface |
||||
|
||||
Submodules |
||||
---------- |
||||
|
||||
mythril.ethereum.evmcontract module |
||||
----------------------------------- |
||||
|
||||
.. automodule:: mythril.ethereum.evmcontract |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.ethereum.util module |
||||
---------------------------- |
||||
|
||||
.. automodule:: mythril.ethereum.util |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
|
||||
Module contents |
||||
--------------- |
||||
|
||||
.. automodule:: mythril.ethereum |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
@ -0,0 +1,30 @@ |
||||
mythril.interfaces package |
||||
========================== |
||||
|
||||
Submodules |
||||
---------- |
||||
|
||||
mythril.interfaces.cli module |
||||
----------------------------- |
||||
|
||||
.. automodule:: mythril.interfaces.cli |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.interfaces.epic module |
||||
------------------------------ |
||||
|
||||
.. automodule:: mythril.interfaces.epic |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
|
||||
Module contents |
||||
--------------- |
||||
|
||||
.. automodule:: mythril.interfaces |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
@ -0,0 +1,103 @@ |
||||
mythril.laser.ethereum package |
||||
============================== |
||||
|
||||
Subpackages |
||||
----------- |
||||
|
||||
.. toctree:: |
||||
|
||||
mythril.laser.ethereum.state |
||||
mythril.laser.ethereum.strategy |
||||
mythril.laser.ethereum.transaction |
||||
|
||||
Submodules |
||||
---------- |
||||
|
||||
mythril.laser.ethereum.call module |
||||
---------------------------------- |
||||
|
||||
.. automodule:: mythril.laser.ethereum.call |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.laser.ethereum.cfg module |
||||
--------------------------------- |
||||
|
||||
.. automodule:: mythril.laser.ethereum.cfg |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.laser.ethereum.evm\_exceptions module |
||||
--------------------------------------------- |
||||
|
||||
.. automodule:: mythril.laser.ethereum.evm_exceptions |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.laser.ethereum.gas module |
||||
--------------------------------- |
||||
|
||||
.. automodule:: mythril.laser.ethereum.gas |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.laser.ethereum.instructions module |
||||
------------------------------------------ |
||||
|
||||
.. automodule:: mythril.laser.ethereum.instructions |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.laser.ethereum.keccak module |
||||
------------------------------------ |
||||
|
||||
.. automodule:: mythril.laser.ethereum.keccak |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.laser.ethereum.natives module |
||||
------------------------------------- |
||||
|
||||
.. automodule:: mythril.laser.ethereum.natives |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.laser.ethereum.svm module |
||||
--------------------------------- |
||||
|
||||
.. automodule:: mythril.laser.ethereum.svm |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.laser.ethereum.taint\_analysis module |
||||
--------------------------------------------- |
||||
|
||||
.. automodule:: mythril.laser.ethereum.taint_analysis |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.laser.ethereum.util module |
||||
---------------------------------- |
||||
|
||||
.. automodule:: mythril.laser.ethereum.util |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
|
||||
Module contents |
||||
--------------- |
||||
|
||||
.. automodule:: mythril.laser.ethereum |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
@ -0,0 +1,86 @@ |
||||
mythril.laser.ethereum.state package |
||||
==================================== |
||||
|
||||
Submodules |
||||
---------- |
||||
|
||||
mythril.laser.ethereum.state.account module |
||||
------------------------------------------- |
||||
|
||||
.. automodule:: mythril.laser.ethereum.state.account |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.laser.ethereum.state.annotation module |
||||
---------------------------------------------- |
||||
|
||||
.. automodule:: mythril.laser.ethereum.state.annotation |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.laser.ethereum.state.calldata module |
||||
-------------------------------------------- |
||||
|
||||
.. automodule:: mythril.laser.ethereum.state.calldata |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.laser.ethereum.state.constraints module |
||||
----------------------------------------------- |
||||
|
||||
.. automodule:: mythril.laser.ethereum.state.constraints |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.laser.ethereum.state.environment module |
||||
----------------------------------------------- |
||||
|
||||
.. automodule:: mythril.laser.ethereum.state.environment |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.laser.ethereum.state.global\_state module |
||||
------------------------------------------------- |
||||
|
||||
.. automodule:: mythril.laser.ethereum.state.global_state |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.laser.ethereum.state.machine\_state module |
||||
-------------------------------------------------- |
||||
|
||||
.. automodule:: mythril.laser.ethereum.state.machine_state |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.laser.ethereum.state.memory module |
||||
------------------------------------------ |
||||
|
||||
.. automodule:: mythril.laser.ethereum.state.memory |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.laser.ethereum.state.world\_state module |
||||
------------------------------------------------ |
||||
|
||||
.. automodule:: mythril.laser.ethereum.state.world_state |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
|
||||
Module contents |
||||
--------------- |
||||
|
||||
.. automodule:: mythril.laser.ethereum.state |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
@ -0,0 +1,22 @@ |
||||
mythril.laser.ethereum.strategy package |
||||
======================================= |
||||
|
||||
Submodules |
||||
---------- |
||||
|
||||
mythril.laser.ethereum.strategy.basic module |
||||
-------------------------------------------- |
||||
|
||||
.. automodule:: mythril.laser.ethereum.strategy.basic |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
|
||||
Module contents |
||||
--------------- |
||||
|
||||
.. automodule:: mythril.laser.ethereum.strategy |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
@ -0,0 +1,38 @@ |
||||
mythril.laser.ethereum.transaction package |
||||
========================================== |
||||
|
||||
Submodules |
||||
---------- |
||||
|
||||
mythril.laser.ethereum.transaction.concolic module |
||||
-------------------------------------------------- |
||||
|
||||
.. automodule:: mythril.laser.ethereum.transaction.concolic |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.laser.ethereum.transaction.symbolic module |
||||
-------------------------------------------------- |
||||
|
||||
.. automodule:: mythril.laser.ethereum.transaction.symbolic |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.laser.ethereum.transaction.transaction\_models module |
||||
------------------------------------------------------------- |
||||
|
||||
.. automodule:: mythril.laser.ethereum.transaction.transaction_models |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
|
||||
Module contents |
||||
--------------- |
||||
|
||||
.. automodule:: mythril.laser.ethereum.transaction |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
@ -0,0 +1,18 @@ |
||||
mythril.laser package |
||||
===================== |
||||
|
||||
Subpackages |
||||
----------- |
||||
|
||||
.. toctree:: |
||||
|
||||
mythril.laser.ethereum |
||||
mythril.laser.smt |
||||
|
||||
Module contents |
||||
--------------- |
||||
|
||||
.. automodule:: mythril.laser |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
@ -0,0 +1,38 @@ |
||||
mythril.laser.smt package |
||||
========================= |
||||
|
||||
Submodules |
||||
---------- |
||||
|
||||
mythril.laser.smt.bitvec module |
||||
------------------------------- |
||||
|
||||
.. automodule:: mythril.laser.smt.bitvec |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.laser.smt.bool module |
||||
----------------------------- |
||||
|
||||
.. automodule:: mythril.laser.smt.bool |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.laser.smt.expression module |
||||
----------------------------------- |
||||
|
||||
.. automodule:: mythril.laser.smt.expression |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
|
||||
Module contents |
||||
--------------- |
||||
|
||||
.. automodule:: mythril.laser.smt |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
@ -0,0 +1,51 @@ |
||||
mythril package |
||||
=============== |
||||
|
||||
Subpackages |
||||
----------- |
||||
|
||||
.. toctree:: |
||||
|
||||
mythril.analysis |
||||
mythril.disassembler |
||||
mythril.ethereum |
||||
mythril.interfaces |
||||
mythril.laser |
||||
mythril.solidity |
||||
mythril.support |
||||
|
||||
Submodules |
||||
---------- |
||||
|
||||
mythril.exceptions module |
||||
------------------------- |
||||
|
||||
.. automodule:: mythril.exceptions |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.mythril module |
||||
---------------------- |
||||
|
||||
.. automodule:: mythril.mythril |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.version module |
||||
---------------------- |
||||
|
||||
.. automodule:: mythril.version |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
|
||||
Module contents |
||||
--------------- |
||||
|
||||
.. automodule:: mythril |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
@ -0,0 +1,22 @@ |
||||
mythril.solidity package |
||||
======================== |
||||
|
||||
Submodules |
||||
---------- |
||||
|
||||
mythril.solidity.soliditycontract module |
||||
---------------------------------------- |
||||
|
||||
.. automodule:: mythril.solidity.soliditycontract |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
|
||||
Module contents |
||||
--------------- |
||||
|
||||
.. automodule:: mythril.solidity |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
@ -0,0 +1,46 @@ |
||||
mythril.support package |
||||
======================= |
||||
|
||||
Submodules |
||||
---------- |
||||
|
||||
mythril.support.loader module |
||||
----------------------------- |
||||
|
||||
.. automodule:: mythril.support.loader |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.support.signatures module |
||||
--------------------------------- |
||||
|
||||
.. automodule:: mythril.support.signatures |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.support.support\_utils module |
||||
------------------------------------- |
||||
|
||||
.. automodule:: mythril.support.support_utils |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
mythril.support.truffle module |
||||
------------------------------ |
||||
|
||||
.. automodule:: mythril.support.truffle |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
||||
|
||||
|
||||
Module contents |
||||
--------------- |
||||
|
||||
.. automodule:: mythril.support |
||||
:members: |
||||
:undoc-members: |
||||
:show-inheritance: |
@ -0,0 +1,25 @@ |
||||
import signal |
||||
from types import FrameType |
||||
from mythril.exceptions import OutOfTimeError |
||||
|
||||
|
||||
def sigalrm_handler(signum: int, frame: FrameType) -> None: |
||||
raise OutOfTimeError |
||||
|
||||
|
||||
def start_timeout(timeout: int) -> None: |
||||
""" |
||||
Starts a timeout |
||||
:param timeout: Time in seconds to set the timeout for |
||||
:return: None |
||||
""" |
||||
signal.signal(signal.SIGALRM, sigalrm_handler) |
||||
signal.alarm(timeout) |
||||
|
||||
|
||||
def disable_timeout() -> None: |
||||
""" |
||||
Ensures that the timeout is disabled |
||||
:return: None |
||||
""" |
||||
signal.alarm(0) |
@ -1,29 +1,23 @@ |
||||
"""This module contains the ETH_DB class, which the base database used by |
||||
pyethereum.""" |
||||
import plyvel |
||||
from ethereum.db import BaseDB |
||||
|
||||
|
||||
class ETH_DB(BaseDB): |
||||
""" |
||||
adopts pythereum BaseDB using plyvel |
||||
""" |
||||
"""Adopts pythereum BaseDB using plyvel.""" |
||||
|
||||
def __init__(self, path): |
||||
self.db = plyvel.DB(path) |
||||
|
||||
def get(self, key): |
||||
""" |
||||
gets value for key |
||||
""" |
||||
"""gets value for key.""" |
||||
return self.db.get(key) |
||||
|
||||
def put(self, key, value): |
||||
""" |
||||
puts value for key |
||||
""" |
||||
"""puts value for key.""" |
||||
self.db.put(key, value) |
||||
|
||||
def write_batch(self): |
||||
""" |
||||
start writing a batch |
||||
""" |
||||
"""start writing a batch.""" |
||||
return self.db.write_batch() |
||||
|
@ -1,18 +1,35 @@ |
||||
"""This module contains exceptions regarding JSON-RPC communication.""" |
||||
|
||||
|
||||
class EthJsonRpcError(Exception): |
||||
"""The JSON-RPC base exception type.""" |
||||
|
||||
pass |
||||
|
||||
|
||||
class ConnectionError(EthJsonRpcError): |
||||
"""An RPC exception denoting there was an error in connecting to the RPC |
||||
instance.""" |
||||
|
||||
pass |
||||
|
||||
|
||||
class BadStatusCodeError(EthJsonRpcError): |
||||
"""An RPC exception denoting a bad status code returned by the RPC |
||||
instance.""" |
||||
|
||||
pass |
||||
|
||||
|
||||
class BadJsonError(EthJsonRpcError): |
||||
"""An RPC exception denoting that the RPC instance returned a bad JSON |
||||
object.""" |
||||
|
||||
pass |
||||
|
||||
|
||||
class BadResponseError(EthJsonRpcError): |
||||
"""An RPC exception denoting that the RPC instance returned a bad |
||||
response.""" |
||||
|
||||
pass |
||||
|
@ -1,22 +1,45 @@ |
||||
"""This module contains general exceptions used by Mythril.""" |
||||
|
||||
|
||||
class MythrilBaseException(Exception): |
||||
"""The Mythril exception base type.""" |
||||
|
||||
pass |
||||
|
||||
|
||||
class OutOfTimeError(MythrilBaseException): |
||||
pass |
||||
|
||||
|
||||
class CompilerError(MythrilBaseException): |
||||
"""A Mythril exception denoting an error during code compilation.""" |
||||
|
||||
pass |
||||
|
||||
|
||||
class UnsatError(MythrilBaseException): |
||||
"""A Mythril exception denoting the unsatisfiability of a series of |
||||
constraints.""" |
||||
|
||||
pass |
||||
|
||||
|
||||
class NoContractFoundError(MythrilBaseException): |
||||
"""A Mythril exception denoting that a given contract file was not |
||||
found.""" |
||||
|
||||
pass |
||||
|
||||
|
||||
class CriticalError(MythrilBaseException): |
||||
"""A Mythril exception denoting an unknown critical error has been |
||||
encountered.""" |
||||
|
||||
pass |
||||
|
||||
|
||||
class AddressNotFoundError(MythrilBaseException): |
||||
"""A Mythril exception denoting the given smart contract address was not |
||||
found.""" |
||||
|
||||
pass |
||||
|
@ -1,22 +1,37 @@ |
||||
"""This module contains EVM exception types used by LASER.""" |
||||
|
||||
|
||||
class VmException(Exception): |
||||
"""The base VM exception type.""" |
||||
|
||||
pass |
||||
|
||||
|
||||
class StackUnderflowException(IndexError, VmException): |
||||
"""A VM exception regarding stack underflows.""" |
||||
|
||||
pass |
||||
|
||||
|
||||
class StackOverflowException(VmException): |
||||
"""A VM exception regarding stack overflows.""" |
||||
|
||||
pass |
||||
|
||||
|
||||
class InvalidJumpDestination(VmException): |
||||
"""A VM exception regarding JUMPs to invalid destinations.""" |
||||
|
||||
pass |
||||
|
||||
|
||||
class InvalidInstruction(VmException): |
||||
"""A VM exception denoting an invalid op code has been encountered.""" |
||||
|
||||
pass |
||||
|
||||
|
||||
class OutOfGasException(VmException): |
||||
"""A VM exception denoting the current execution has run out of gas.""" |
||||
|
||||
pass |
||||
|
@ -1,18 +1,38 @@ |
||||
"""This module contains a function manager to deal with symbolic Keccak |
||||
values.""" |
||||
from mythril.laser.smt import Expression |
||||
|
||||
|
||||
class KeccakFunctionManager: |
||||
"""A keccak function manager for symbolic expressions.""" |
||||
|
||||
def __init__(self): |
||||
"""""" |
||||
self.keccak_expression_mapping = {} |
||||
|
||||
def is_keccak(self, expression: Expression) -> bool: |
||||
""" |
||||
|
||||
:param expression: |
||||
:return: |
||||
""" |
||||
return str(expression) in self.keccak_expression_mapping.keys() |
||||
|
||||
def get_argument(self, expression: str) -> Expression: |
||||
""" |
||||
|
||||
:param expression: |
||||
:return: |
||||
""" |
||||
if not self.is_keccak(expression): |
||||
raise ValueError("Expression is not a recognized keccac result") |
||||
return self.keccak_expression_mapping[str(expression)][1] |
||||
|
||||
def add_keccak(self, expression: Expression, argument: Expression) -> None: |
||||
""" |
||||
|
||||
:param expression: |
||||
:param argument: |
||||
""" |
||||
index = str(expression) |
||||
self.keccak_expression_mapping[index] = (expression, argument) |
||||
|
@ -1,35 +1,77 @@ |
||||
"""This module contains the class used to represent state-change constraints in |
||||
the call graph.""" |
||||
|
||||
|
||||
class Constraints(list): |
||||
""" |
||||
This class should maintain a solver and it's constraints, This class tries to make the Constraints() object |
||||
as a simple list of constraints with some background processing. |
||||
"""This class should maintain a solver and it's constraints, This class |
||||
tries to make the Constraints() object as a simple list of constraints with |
||||
some background processing. |
||||
|
||||
TODO: add the solver to this class after callback refactor |
||||
""" |
||||
|
||||
def __init__(self, constraint_list=None, solver=None, possibility=None): |
||||
""" |
||||
|
||||
:param constraint_list: |
||||
:param solver: |
||||
:param possibility: |
||||
""" |
||||
super(Constraints, self).__init__(constraint_list or []) |
||||
self.solver = solver |
||||
self.__possibility = possibility |
||||
|
||||
def check_possibility(self): |
||||
""" |
||||
|
||||
:return: |
||||
""" |
||||
return True |
||||
|
||||
def append(self, constraint): |
||||
""" |
||||
|
||||
:param constraint: |
||||
""" |
||||
super(Constraints, self).append(constraint) |
||||
|
||||
def pop(self, index=-1): |
||||
""" |
||||
|
||||
:param index: |
||||
""" |
||||
raise NotImplementedError |
||||
|
||||
def __copy__(self): |
||||
""" |
||||
|
||||
:return: |
||||
""" |
||||
constraint_list = super(Constraints, self).copy() |
||||
return Constraints(constraint_list) |
||||
|
||||
def __deepcopy__(self, memodict=None): |
||||
""" |
||||
|
||||
:param memodict: |
||||
:return: |
||||
""" |
||||
return self.__copy__() |
||||
|
||||
def __add__(self, constraints): |
||||
""" |
||||
|
||||
:param constraints: |
||||
:return: |
||||
""" |
||||
constraints_list = super(Constraints, self).__add__(constraints) |
||||
return Constraints(constraint_list=constraints_list) |
||||
|
||||
def __iadd__(self, constraints): |
||||
""" |
||||
|
||||
:param constraints: |
||||
:return: |
||||
""" |
||||
super(Constraints, self).__iadd__(constraints) |
||||
return self |
||||
|
@ -0,0 +1 @@ |
||||
"""This module contains utility functions for the Mythril support package.""" |
@ -1,3 +1,7 @@ |
||||
# This file is suitable for sourcing inside POSIX shell, e.g. bash as |
||||
# well as for importing into Python |
||||
"""This file contains the current Mythril version. |
||||
|
||||
This file is suitable for sourcing inside POSIX shell, e.g. bash as well |
||||
as for importing into Python. |
||||
""" |
||||
|
||||
VERSION = "v0.19.11" # NOQA |
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue