{"id":19539318,"url":"https://github.com/ethnical/swek3","last_synced_at":"2025-07-06T20:33:14.116Z","repository":{"id":44391254,"uuid":"512401473","full_name":"Ethnical/Swek3","owner":"Ethnical","description":"Web3 Security Toolbox","archived":false,"fork":false,"pushed_at":"2024-04-29T07:19:24.000Z","size":6837,"stargazers_count":73,"open_issues_count":0,"forks_count":9,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-04T15:04:57.077Z","etag":null,"topics":["ethereum","rust","security-tools","solidity"],"latest_commit_sha":null,"homepage":"https://blog.mevsec.com/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ethnical.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-10T10:06:26.000Z","updated_at":"2024-10-21T17:11:39.000Z","dependencies_parsed_at":"2024-04-08T08:43:48.386Z","dependency_job_id":"ff03fccb-b88f-4aba-9d4f-ed84b3b32a26","html_url":"https://github.com/Ethnical/Swek3","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ethnical%2FSwek3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ethnical%2FSwek3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ethnical%2FSwek3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ethnical%2FSwek3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ethnical","download_url":"https://codeload.github.com/Ethnical/Swek3/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251017410,"owners_count":21523571,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ethereum","rust","security-tools","solidity"],"created_at":"2024-11-11T02:39:02.811Z","updated_at":"2025-04-26T16:31:19.454Z","avatar_url":"https://github.com/Ethnical.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Swek the EVM Security Toolbox.\n\nSwek is a Security toolbox focused on EVM written in Rust.\n\nMost of the features are designed to help auditors to get faster in the daily works.\n\nFeel free to contact me to add some features or found any bugs.\n\nIf you are intersted in Rust, MeV, Solidity Sec join us here =\u003e https://discord.gg/54Q9pnpQcV\n\n![ezgif-4-a87ec11928](https://user-images.githubusercontent.com/23560242/196544426-0aa7462d-7d73-4a58-89f4-1f7136a406b9.gif)\n\n---\n\n### Convert Solidity to Interface\n\nConvert Solidity file into an interface using the convert2interface (download the right version of the Solc then compile and extract the interface).\n\n![image](https://user-images.githubusercontent.com/23560242/178570537-8974f67c-baa6-4e8d-b2e9-c4f8ad5ca9e5.png)\n\nJust need to use the `--path` parameter.\n\n---\n\n\n\n\n## Onchain\n\u003e A lists of tools for onchain contracts and incidents response.\n#### get-selectors\n\u003e Design to get all the selectors from the bytecode of a contract.\n\n|Paramaters| Informations|\n|----------|-------------|\n|`--address`| address of the contract|\n|`--rpc`| Link to the rpc of the wanted blockchain|\n\n\u003cimg width=\"1186\" alt=\"CleanShot 2023-03-28 at 21 39 42@2x\" src=\"https://user-images.githubusercontent.com/23560242/228348814-fc391333-400a-4268-84a3-6effac7fe0f6.png\"\u003e\n\n\n### Mempool Watcher\n\u003e A small Mempool Watcher written in Rust.\n\n- Need to add lots of features to filter every txs.\n- Next step add a features to simulates txs.\n\n## ![image](https://user-images.githubusercontent.com/23560242/179367699-286e92ac-ce70-4f6e-9e20-434d8b565972.png)\n\n\n## Contract-info.\n\nGet informations using AST of the contract.\n/!\\ This doesn't compile the contract /!\\\nTo have a quick overview of the (functions, modifiers, visibility, library etc...) you can use `-m` for **modifiers** and `-v` for the **visibility**.\n\n_Usage :_\n![image](https://user-images.githubusercontent.com/23560242/196519295-c9881b79-602d-43eb-bed8-bd8726750d3c.png)\n\n**Centralisation Risk**\n\n- The `-c` set to `yes` will return some crisk ready to share in markdown (need to pass the modifier).\n  ![image](https://user-images.githubusercontent.com/23560242/197516359-611afd0f-c342-4ca2-87fd-adeb56b764a7.png)\n\n_Usage :_\n`swek --path /Users/ethnical/Sec/Rust/oz_implementations/contracts/OffShore.sol -m onlyOwner -c yes`\n\n---\n\n### Implemented Features\n\n- Visibility Checker : Display all functions in _red_ who has `_` but not `internal` visibility.\n\n### Upcoming Features.\n\n_Contracts Features:_\n\n- [X] Analyze directly in (etherscan, snowtrace, moonscan, etc).\n- [ ] Add the `view` `pure` etc in modifiers.\n- [ ] Add a params for remapping like `--remaps @openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/`\n- [ ] Display all the contracts names inside the folder.\n- [ ] Display all the externals calls.\n\n_Others features:_\n\n- [X] private key to address.\n- [ ] Converter Wei Gas.\n- [ ] ByteCode ASM deploy.\n- [ ] Get interface from non compile contract\n- [ ] Check the dif between OZ implentation and the implentation inside the sol file.\n- [ ] Reorganise inside a file the interface and the contract to have them in correct order.\n- [ ] Create a markdown option to store as a markdown file.\n- [ ] Add a kind of \"binwalk\" on calldata (4bytes signatures).\n---\n\n### TODO\n\n- [ ] Reuse the Solang lib directly to get the `notice` through comments.\n- [ ] Use the solang library\n\n\n## Install \u0026 Run\n- There is the released version here (just need to run the binary) -\u003e https://github.com/Ethnical/Swek3/releases \n- If you don't want or the version is not supported you can build from source by the following steps: \n```bash\ngit clone https://github.com/Ethnical/Swek3.git\ncd Swek3\ncargo build\n./target/debug/swek --help #This is the binary `swek`\nmv ./target/debug/swek /usr/bin/swek #move the binary to `/usr/bin/` to avoid to each time need to path or you need to update the path.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethnical%2Fswek3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fethnical%2Fswek3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethnical%2Fswek3/lists"}