Skip to content

Instantly share code, notes, and snippets.

@KONFeature
Last active October 7, 2022 10:42
Show Gist options
  • Save KONFeature/f7c3f15cd9ba7a7c2efed010083bac13 to your computer and use it in GitHub Desktop.
Save KONFeature/f7c3f15cd9ba7a7c2efed010083bac13 to your computer and use it in GitHub Desktop.
Script to run mythril inside a project to perform some security check
#!/bin/bash
# Assert we are in the right folder
if [ ! -d "contracts" ]; then
echo "error: script needs to be run from project root './tools/mythril/mythril.sh'"
exit 1
fi
# Run mythril analyse on the given contract
function analyse_contract {
docker run --rm -v `pwd`:/src --workdir=/src mythril/myth -v 4 analyze $1 --solc-json tools/mythril/remapping.json --max-depth 50
}
echo ""
echo "<----- Checking SybelToken.sol ----->"
analyse_contract contracts/tokens/SybelToken.sol
echo ""
echo "<----- Checking VestingWallets.sol ----->"
analyse_contract contracts/wallets/VestingWallets.sol
echo ""
echo "<----- Checking SybelInternalTokens.sol ----->"
analyse_contract contracts/tokens/SybelInternalTokens.sol
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment