Coder Social home page Coder Social logo

5l1v3r1 / wkrakmi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bernsteining/wkrakmi

0.0 1.0 0.0 24 KB

A rust program to easily generate lightweight and standalone WebAssembly crackmes for Capture The Flag platforms.

Shell 11.19% CSS 33.30% HTML 25.12% Rust 30.40%

wkrakmi's Introduction

wkrakmi

A Rust program to generate lightweight and standalone WebAssembly crackmes for Capture The Flag platforms.

Usage

Modify the challenge function in challenge.rs in order to choose your own challenge difficulty.

Make sure you have rust toolchain installed and up to date.

If not, install Rust toolchain:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Download the wasm-bindgen-cli and basic-http-server crates.

cargo install basic-http-server wasm-bindgen-cli

wasm-bindgen and cargo versions must match, make sure cargo is up to date:

cargo update

Add wasm to rustup targets:

rustup target add wasm32-unknown-unknown

Then, run the build.sh script. It will compile the Rust code to WebAssembly, and run the challenge on 127.0.0.1:4000.

If you don't want to download basic-http-server with cargo, you can still run the challenge with the following Python script:

import http.server
import socketserver

PORT = 4000

Handler = http.server.SimpleHTTPRequestHandler
Handler.extensions_map.update({
    '.wasm': 'application/wasm',
})

socketserver.TCPServer.allow_reuse_address = True
with socketserver.TCPServer(("", PORT), Handler) as httpd:
    httpd.allow_reuse_address = True
    print("serving at port", PORT)
    httpd.serve_forever()

Tips for sharing the challenge online

Using ngrok, you can share the challenge online:

ngrok http 4000

It will generate a link on which the challenge will be hosted publicly.

wkrakmi's People

Watchers

 avatar

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.