paradigmxyz / paradigm-ctf-2021 Goto Github PK
View Code? Open in Web Editor NEWOfficial repository for Paradigm CTF 2021
Home Page: https://ctf.paradigm.xyz
Official repository for Paradigm CTF 2021
Home Page: https://ctf.paradigm.xyz
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/{...}
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
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
:
paradigm-ctf-2021/babyrev/public/deploy/chal.py
Lines 4 to 7 in eedc32d
Signature of eth_sandbox.new_launch_instance_action
in paradigm-ctf-infrastructure
def new_launch_instance_action(
do_deploy: Callable[[Web3, str], str],
):
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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.