Giter Club home page Giter Club logo

paradigm-ctf-2021's People

Contributors

samczsun-paradigm 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar

paradigm-ctf-2021's Issues

Failing to provide correct PoW

build and run seems to work fine. These are the steps I'm taking

./build
./run bank 31337 8545

in other terminal:

nc localhost 31337
1 - launch new instance
2 - get flag
action? 1
hashcash -mb24 qqtpobyc = ? 1:24:220227:qqtpobyc::MblPsycl:2ebd0e

Where the PoW is obtained by running

python3 ./eth_challenge_base/eth_sandbox/hashcash.py -mb24 qqtpobyc

Am I missing anything obvious to run these challenges?

Environment:

echo $PYTHONPATH
/Users/lain/git/mpwn/mp.py
echo $RPC_URL
https://eth-mainnet.alchemyapi.io/v2/{...}

`eth_sandbox` from paradigm-ctf-infrastructure not compatible with CTF 2021

Issue

Run the babyrev challenge, nc babyrev 31337 31338, then connecting to it with nc localhost 31337 will encounter the following error:

Traceback (most recent call last):
  File "/home/ctf/chal.py", line 5, in <module>
    eth_sandbox.new_launch_instance_action(deploy_value=Web3.toWei(50, 'ether')),
TypeError: new_launch_instance_action() got an unexpected keyword argument

Cause

I believe the commit 46974f8 updated the infra to build images with the code from https://github.com/paradigmxyz/paradigm-ctf-infrastructure, but the eth_sandbox package there is not compatible with 2021 CTF.

chal.py in babyrev:

eth_sandbox.run_launcher([
eth_sandbox.new_launch_instance_action(deploy_value=Web3.toWei(50, 'ether')),
eth_sandbox.new_get_flag_action()
])

Signature of eth_sandbox.new_launch_instance_action in paradigm-ctf-infrastructure

def new_launch_instance_action(
    do_deploy: Callable[[Web3, str], str],
):

"failed to launch instance! please try again"

Hi ๐Ÿ‘‹ Thanks for the challenges and for the infrastructure for custom challenges! The code is great, learned a lot from it (reminded me the times when I just started poking around Linux).

When I've built and started babysandbox challenge I've got the "failed to launch instance! please try again" error. After some poking I've found out that it's caused by NodeJS 17. Basically, "ganache-cli" just won't run.

root@a41b14c2f092:/# ganache-cli 
Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:67:19)
    at Object.createHash (node:crypto:130:10)

So, in case if someone else is experiencing the same problem - to fix it set NODE_OPTIONS to --openssl-legacy-provider.

diff --git a/eth_challenge_base/Dockerfile b/eth_challenge_base/Dockerfile
index c28eea9..3d213b4 100644
--- a/eth_challenge_base/Dockerfile
+++ b/eth_challenge_base/Dockerfile
@@ -15,3 +15,4 @@ COPY 98-start-gunicorn /startup
 
 COPY eth_sandbox /usr/lib/python/eth_sandbox
 ENV PYTHONPATH /usr/lib/python
+ENV NODE_OPTIONS --openssl-legacy-provider

Worst deployment experience

You would better provide the tutorial to deploy all these stuff. I have checked a couple of the scripts to figure out how it is working. I would say I need to spend more deploying than solving. It is not normal. I hope you will fix that.

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.