Giter VIP home page Giter VIP logo

swek3's Introduction

Ethnical - Blockchain Security Engineer at Optimism ๐Ÿ”ด

Discord Youtube Twitter Personal Website MevSec

Information

  • ๐Ÿดโ€โ˜ ๏ธ CTFer & InfoSec Lover.
  • ๐Ÿ“œ Mostly focused on Solidity (smart contracts) & Rust (L1 or tools).
  • ๐Ÿ› ๏ธ Tools builder Swek3
  • ๐Ÿ”Ž Interested in MEV, Fuzzing, EVM.
  • ๐Ÿ‘ฅ Building a small blockchain security community MevSec.
  • ๐Ÿ’ป Homelab addict.
  • ๐Ÿ“บ YouTube French InfoSec Channel (30k Subs).
  • ๐Ÿก Currently located in Malta ๐Ÿ‡ฒ๐Ÿ‡น.
  • ๐Ÿ‘จโ€๐Ÿ’ป My CTF : https://ctf.mevsec.com/
  • ๐Ÿ“ My Blog: https://blog.mevsec.com/

Recent Blogs posts

EVM bytecode & SELFDESTRUCT

CleanShot 2023-10-16 at 00 58 52

Here

Reentrancy CTF

CleanShot 2023-10-16 at 00 58 52

Here

Languages and Tools:

elasticsearch linux python rust solidity

ethnical

swek3's People

Contributors

ethnical avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

swek3's Issues

Trying to get JSON from AST without compiling in Solidity.

The goal here is to try to get JSON from the AST using ethers-rs.
So to do that, I modified the ethers-rs lib by adding the function get_data here (I don't think this is the best option here to do, but for now it works) =>
get_data()

 impl Node {
    /// Reads the content of the file and returns a [Node] containing relevant information
    pub fn read(file: impl AsRef<Path>) -> Result<Self> {
        let file = file.as_ref();
        let source = Source::read(file).map_err(|err| {
            if !err.path().exists() && err.path().is_symlink() {
                SolcError::ResolveBadSymlink(err)
            } else {
                SolcError::Resolve(err)
            }
        })?;
        let data = SolData::parse(source.as_ref(), file);
        Ok(Self { path: file.to_path_buf(), source, data })
    }

    pub fn content(&self) -> &str {
        &self.source.content
    }

    pub fn imports(&self) -> &Vec<SolDataUnit<SolImport>> {
        &self.data.imports
    }

    pub fn version(&self) -> &Option<SolDataUnit<String>> {
        &self.data.version
    }

    pub fn experimental(&self) -> &Option<SolDataUnit<String>> {
        &self.data.experimental
    }

    pub fn license(&self) -> &Option<SolDataUnit<String>> {
        &self.data.license
    }

    pub fn unpack(&self) -> (&PathBuf, &Source) {
        (&self.path, &self.source)
    }
    pub fn get_data(&self) -> &SolData { //here the get_data to get back the SolData and then try to walk it.
        &self.data
    }
}

So now using get_data, we can walk over the object SolContract but for some compatibilities and sharing purposes in the future would like to get a JSON output (Think you could use Deserialize stuffs over all the type but didn't succed)

The final is to get output exactly like this project from ConsenSys written in Python => https://github.com/ConsenSys/python-solidity-parser

So for the moment, I am able to work on the AST(Rust object) but would like to find a way to convert it into JSON or find a way to get JSON directly.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.