Git Product home page Git Product logo

writeandrun's Introduction

Detect and Run Arbitrary Code!

Main Idea: Enter almost any arbitrary code into a textbox on the website and have the webapp automatically detect, run, and return the code's output!

Installation

Run the following to install the Flask app in your present working directory.

git clone https://github.com/BlueSquare23/WriteAndRun.git
cd WriteAndRun
virtualenv venv 		# Virtual Env Optional
source venv/bin/activate 	# Virtual Env Optional
pip3 install -r requirements.txt

After installing the app you'll need to obtain a free API key by signing up for an Algorithmia account here. Once you have an API key from them you'll want to put it in a file named .env

  • File: .env
ALGO_API_KEY=simX************************

Overview

This Python Flask application is really just a wrapper for two API's that do all the heavy lifting.

The first API is from Algorithmia. Their API is used here to do the programming language detection.

The second API is Engineer Man's Piston API. This unique RCE API is used to execute the code after its source language has been determined.

Running the App

You can start the application just by running, python app.py.

source venv/bin/activate        # Virtual Env Optional
python3 app.py

And then visit http://localhost:5000/ in a browser to use the app.

Security and Bugs

If this app seems inherently insecure that's because it probably is. In theory, all of the code entered into the site's textbox is sent to Engineer Man's Piston API and never run on the same server as the flask app itself. But yeah a textbox on a website intended to run code is a good target for H4xZ0rZ!

All that to say; Yee be warned! I would Not advise hosting this application on the public internet! I may have created a leaky flask. I claim no liability.

As for bugs my policy is, if it hurts when you do that don't do that.

Email all inquires to: [email protected]

writeandrun's People

Contributors

bluesquare23 avatar

Watchers

James Cloos avatar  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.