Make a slither package

pull/12/head
disconnect3d 6 years ago
parent 943b22cf95
commit cfe8f89c39
  1. 12
      README.md
  2. 1
      requirements.txt
  3. 19
      setup.py
  4. 2
      slither/__init__.py
  5. 7
      slither/__main__.py

@ -11,15 +11,15 @@ With Slither you can:
## How to install
Slither uses Python 2.
Slither uses Python 3.
Use pip to install the dependencies:
:
```bash
$ pip install -U -r requirements.txt
$ python setup.py install
```
You may also want solc, which can be installed using homebrew:
You may also want solc, the Solidity compiler, which can be installed using homebrew:
```bash
$ brew update
@ -40,11 +40,11 @@ $ sudo apt-get install solc
## How to use
```
$ slither.py file.sol
$ slither file.sol
```
```
$ slither.py examples/uninitialized.sol
$ slither examples/uninitialized.sol
[..]
INFO:Detectors:Uninitialized state variables in examples/uninitialized.sol, Contract: Uninitialized, Vars: destination, Used in ['transfer']
[..]

@ -1 +0,0 @@
prettytable

@ -0,0 +1,19 @@
from setuptools import setup, find_packages
setup(
name='Slither',
description='Slither is a Solidity static analysis framework written in Python 3.',
url='https://github.com/trailofbits/slither',
author='Trail of Bits',
version='0.1',
packages=find_packages(),
python_requires='>=3.6',
install_requires=['prettytable>=0.7.2'],
license='AGPL-3.0',
long_description=open('README.md').read(),
entry_points={
'console_scripts': [
'slither = slither.__main__:main'
]
}
)

@ -1 +1 @@
from .slither import Slither
from .slither import Slither

@ -53,8 +53,7 @@ def exit(results):
sys.exit(len(results))
if __name__ == '__main__':
def main():
detectors = Detectors()
printers = Printers()
@ -171,3 +170,7 @@ if __name__ == '__main__':
logging.error('Error in %s'%sys.argv[1])
logging.error(traceback.format_exc())
sys.exit(-1)
if __name__ == '__main__':
main()
Loading…
Cancel
Save