Git Product home page Git Product logo

kantai / passe-pypy-taint-tracking Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 6.0 15.79 MB

Adding taint tracking to PyPy. Used in Passe prototype implementation.

License: Other

Python 93.54% HTML 0.26% Shell 0.02% Groff 0.03% Visual Basic 0.01% C 2.17% Makefile 0.02% C++ 0.27% CSS 0.01% Emacs Lisp 0.01% Vim Script 0.01% Standard ML 0.02% Assembly 0.35% Objective-C 2.96% C# 0.19% Java 0.17%

passe-pypy-taint-tracking's Introduction

PyPy: Python in Python Implementation

Welcome to PyPy!

PyPy is both an implementation of the Python programming language, and an extensive compiler framework for dynamic language implementations. You can build self-contained Python implementations which execute independently from CPython.

The home page is:

http://pypy.org/

The getting-started document will help guide you:

http://doc.pypy.org/en/latest/getting-started.html

It will also point you to the rest of the documentation which is generated from files in the pypy/doc directory within the source repositories. Enjoy and send us feedback!

the pypy-dev team <[email protected]>

PyPy-Tainting

This all comes more or less from here:

http://doc.pypy.org/en/latest/getting-started-python.html

There's two ways you'll be interested in running pypy, with and without compiling. Compilation takes a while (~1 hour on my laptop) and requires valid rpython, so to start with, you'll probably just want to run without compilation.

Running without Compilation

You can run pypy in python:

cd pypy
python bin/pyinteractive.py

This will be slow, and a lot of "C modules" won't work.

Compiling PyPy without JIT

This compiles without JIT but with full optimizations:

cd pypy/goal
python ../../rpython/bin/rpython --opt=2 targetpypystandalone.py

Testing it out

Once you have the pypy prompt, you can test out the tainting code by importing __pypy__.taint (this API is implemented in pypy/modules/__pypy__/interp_taint.py)

so you can test out propagation of data-flows as follows:

from __pypy__ import taint as t

a = "A"
t.add_taint(a, 1)
b = a.lower()
t.get_taint(b) # should output [1]

print t.get_control_taint() # should also output []

if a == "A":
   print t.get_control_taint() # should also output [1]

passe-pypy-taint-tracking's People

Contributors

kantai avatar

Stargazers

Alisha Ukani avatar  avatar Marcela Melara avatar

Watchers

James Cloos avatar  avatar

Forkers

nirvananimbusa

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.