Consensys / mythril

Security analysis tool for EVM bytecode. Supports smart contracts built for Ethereum, Hedera, Quorum, Vechain, Rootstock, Tron and other EVM-compatible blockchains.
https://mythx.io/
MIT License
3.87k stars 738 forks source link

Support rpc for BSC #1565

Open MrMegamind opened 2 years ago

MrMegamind commented 2 years ago

I tried to run myth analyze -a 0x13b852e276f10281C72ccF33EdF81d81DD198Aae --rpc bsc-dataseed1.defibit.io:443 Assuming https://docs.binance.org/smart-chain/developer/rpc.html provide the custom RPC

But always get IPC / RPC error: 400 error

How to Reproduce

mythril.interfaces.cli [ERROR]: Could not connect to RPC server. Make sure that your node is running and that RPC parameters are set correctly. thezavya@instance-3:~$ sudo docker run -it --rm mythril/myth analyze -a 0x13b852e276f10281C72ccF33EdF81d81DD198Aae --rpc bsc-dataseed4.binance.org mythril.interfaces.cli [ERROR]: Invalid RPC argument, use 'ganache', 'infura-[network]' or 'HOST:PORT' thezavya@instance-3:~$ sudo docker run -it --rm mythril/myth analyze -a 0x13b852e276f10281C72ccF33EdF81d81DD198Aae --rpc bsc-dataseed4.binance.org:80 mythril.interfaces.cli [ERROR]: Could not connect to RPC server. Make sure that your node is running and that RPC parameters are set correctly. thezavya@instance-3:~$ sudo docker run -it --rm mythril/myth analyze -a 0x13b852e276f10281C72ccF33EdF81d81DD198Aae --rpc bsc-dataseed4.binance.org:443 mythril.interfaces.cli [ERROR]: IPC / RPC error: 400 thezavya@instance-3:~$ sudo docker run -it --rm mythril/myth analyze -a 0x13b852e276f10281C72ccF33EdF81d81DD198Aae --rpc bsc-ws-node.nariox.org:443 mythril.interfaces.cli [ERROR]: IPC / RPC error: 400 thezavya@instance-3:~$ sudo docker run -it --rm mythril/myth analyze -a 0x13b852e276f10281C72ccF33EdF81d81DD198Aae --rpc bsc-dataseed1.defibit.io:443 mythril.interfaces.cli [ERROR]: IPC / RPC error: 400

stebansaa commented 2 years ago

I think you may be wrongly assuming that is a port misconfiguration. I have experienced a similar issue, there is no way to set network ID, it assumes is 1 as on Ethereum, yet other EVMs use different chain IDs.

DeeeXy366 commented 2 years ago

"--rpctls True" work for me

docker run mythril/myth analyze -a 0x4DB2495AfAd4c0E481fFc40FDaF66E13A786b619 --rpc bsc-dataseed1.binance.org:443 --rpctls True --infura-id MY_ID --max-depth 2

nandanv99 commented 2 years ago

can you please tell how can I use roc for avalanche chain?