Coder Social home page Coder Social logo

tinchoabbate / ethernaut-ctf Goto Github PK

View Code? Open in Web Editor NEW
13.0 4.0 6.0 113 KB

Solutions for Ethernaut CTF (https://ethernaut.openzeppelin.com) - Writeups at https://notonlyowner.com

License: MIT License

JavaScript 45.69% Solidity 54.31%
ethereum ganache-cli truffle-framework smart-contracts solidity web3 security

ethernaut-ctf's Introduction

ethernaut-ctf

Based on https://ethernaut.openzeppelin.com/

You can find the writeups at notonlyowner.com

Install dependencies

  • Run npm install to install both Ganache-cli and Truffle

Usage

  1. Start ganache-cli on port 7545 with npx ganache-cli --port 7545
  2. Deploy contracts to local blockchain running npx truffle migrate
  3. Execute exploit with npx truffle exec exploits/<filename>

Note: I initially started coding the exploits as Truffle external scripts, that's why most of them are to be executed with npx truffle exec. Another totally valid approach, and somewhat simpler, would be to just build the exploits as Truffle tests. This is what I started doing after Privacy.

ethernaut-ctf's People

Contributors

dependabot[bot] avatar tinchoabbate avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

ethernaut-ctf's Issues

fallback.exploit.js fails

Hello upon running your exploit, it doesn't get past just prints the attacker address and nothing else. This does not look like the expected outcome. See below for example:

root@kali:~/smart-contracts# npx truffle exec exploits/fallback-exp.js 
Using network 'development'.

Attacker address: 0x33a3eaad2c31b3078ce43add633c393eef1ff6f3

I tried both running by downloading your git repo and running npm install in the root, and by following the instructions directly in your walkthrough. I'm sure that I'm just missing something stupid. I migrated with npx truffle migrate and all the files are created correctly. Ganache-cli is running and truffle-config.js is copied and pasted from the guide.

What could I be doing wrong? Thanks in advance.

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.