Comments (8)
can you try reducing collisions in remappings and retry? You can remap @openzeppelin
directly to ../node_modules/@openzeppelin/
or remap @openzeppelin/contracts
to ../node_modules/@openzeppelin/contracts
from mythril.
@norhh I reduce collision in remappings and retry and it's working but now I am getting other error
{
"remappings": [
"@openzeppelin/=../node_modules/@openzeppelin/",
"@uniswap/v2-periphery/contracts/interfaces/=../node_modules/@uniswap/v2-periphery/contracts/interfaces/",
"@uniswap/v2-core/contracts/interfaces/=../node_modules/@uniswap/v2-core/contracts/interfaces/"
],
"optimizer": {
"enabled": true
}
}
mythril.mythril.mythril_analyzer [CRITICAL]: Exception occurred, aborting analysis. Please report this issue to the Mythril GitHub page.
Traceback (most recent call last):
File "/home/pedalsup/.local/lib/python3.10/site-packages/mythril/mythril/mythril_analyzer.py", line 151, in fire_lasers
sym = SymExecWrapper(
File "/home/pedalsup/.local/lib/python3.10/site-packages/mythril/analysis/symbolic.py", line 182, in __init__
self.laser.sym_exec(
File "/home/pedalsup/.local/lib/python3.10/site-packages/mythril/laser/ethereum/svm.py", line 206, in sym_exec
self.execute_transactions(created_account.address)
File "/home/pedalsup/.local/lib/python3.10/site-packages/mythril/laser/ethereum/svm.py", line 232, in execute_transactions
self._execute_transactions_incremental(
File "/home/pedalsup/.local/lib/python3.10/site-packages/mythril/laser/ethereum/svm.py", line 302, in _execute_transactions_incremental
execute_message_call(self, address, func_hashes=func_hashes)
File "/home/pedalsup/.local/lib/python3.10/site-packages/mythril/laser/ethereum/transaction/symbolic.py", line 151, in execute_message_call
laser_evm.exec()
File "/home/pedalsup/.local/lib/python3.10/site-packages/mythril/laser/ethereum/svm.py", line 344, in exec
new_states, op_code = self.execute_state(global_state)
File "/home/pedalsup/.local/lib/python3.10/site-packages/mythril/laser/ethereum/svm.py", line 445, in execute_state
).evaluate(global_state)
File "/home/pedalsup/.local/lib/python3.10/site-packages/mythril/laser/ethereum/instructions.py", line 265, in evaluate
result = instruction_mutator(global_state)
File "/home/pedalsup/.local/lib/python3.10/site-packages/mythril/laser/ethereum/instructions.py", line 196, in wrapper
new_global_states = self.call_on_state_copy(func, func_obj, global_state)
File "/home/pedalsup/.local/lib/python3.10/site-packages/mythril/laser/ethereum/instructions.py", line 131, in call_on_state_copy
return func(func_obj, global_state_copy)
File "/home/pedalsup/.local/lib/python3.10/site-packages/mythril/laser/ethereum/instructions.py", line 1090, in codecopy_
if code.startswith("0x"):
AttributeError: 'tuple' object has no attribute 'startswith'
from mythril.
can you run it with the develop version? You can install develop version by cloning it and doing either:
python setup.py install
or
pip install .
from mythril.
I am getitng below error while running python setup.py install
Installed /usr/local/lib/python3.10/dist-packages/mythril-0.24.1-py3.10.egg
Processing dependencies for mythril==0.24.1
error: eth-utils 2.3.0 is installed but eth-utils<2,>=1.3.0 is required by {'py-ecc'}
from mythril.
I'll look into the conflicts.
To temporarily circumvent this, can you try directly executing the mythril script, use ./myth
(or whatever path the cloned repo is e.g: /path/myth
) over directly running the myth
command
from mythril.
Alternatively, you can try v0.24.2
from mythril.
@norhh Thanks for the help me.
now I am using bytecode to analyze contracts
myth a --bin -f test.asm >> outpuy2.json
it will generate below output
==== State access after external call ====
SWC ID: 107
Severity: Low
Contract: MAIN
Function name: _function_0x92a13eda
PC address: 1167
Estimated Gas Usage: 24901 - 140223
Write to persistent state following external call
The contract account state is accessed after an external call to a fixed address. To prevent reentrancy issues, consider accessing the state only before the call, especially if the callee is untrusted. Alternatively, a reentrancy lock can be used to prevent untrusted callees from re-entering the contract in an intermediate state.
--------------------
Initial State:
Account: [ATTACKER], balance: 0x0, nonce:0, storage:{}
Account: [SOMEGUY], balance: 0x0, nonce:0, storage:{}
Transaction Sequence:
Caller: [CREATOR], function: unknown, txdata: 0x92a13ed
can i get real function name from _function_0x92a13eda
?
another question is Is mythril use slither internally or it is independent from slither?
from mythril.
It's independent of slither.
Bytecode does not have function information, you can get function-hash list by running solc --hashes file.sol <a bunch of args for handling imports for remappings>
does v0.24.2 crash throw this crash? since I pushed some changes yesterday which shouldn't result in this crash
from mythril.
Related Issues (20)
- Overflow analysis not respecting types smaller than `uint256` HOT 1
- mythril install with last web3=6 HOT 2
- Can't run analysis using Docker on M1 Mac HOT 2
- `AttributeError: 'NoneType' object has no attribute 'get'` in `mythril/solidity/features.py` HOT 7
- An incorrect warning result
- Mythril analyze returning AttributeError HOT 2
- How to run custom plugin along with mythril? HOT 1
- Mythril cannot identify imported openzeppelin contracts in foundry project. HOT 5
- Does mythril have the following features HOT 4
- Mythril 0.24.4 raises an error on macOS HOT 2
- Inconsistency in the results of function seqeunce execution HOT 23
- Mythril is producing one liner success report without details. HOT 1
- External call does not change the storage of the callee contract.
- Solc experienced a fatal error while running myth on a Foundry-based project importing an OpenZeppelin library HOT 2
- Unchecked return value not flagged
- Missing support for transient storage opcodes HOT 1
- Mythril is very slow HOT 1
- Inconsistent results source vs bytecode HOT 3
- Misspelled Rootstock in the repository's about section
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mythril.