GithubHelp home page GithubHelp logo

joaomlourenco / oscar Goto Github PK

View Code? Open in Web Editor NEW

This project forked from filipedeluna/oscar

0.0 2.0 0.0 59 KB

OSCAR Noise Injection Framework

License: GNU General Public License v3.0

Shell 0.15% Python 12.40% Java 87.46%

oscar's Introduction

OSCAR Noise Injector - Prototype

Requirements (Tested on)

  • Apache Maven 3.6.3
  • OpenJDK 17.0.2 (Project compiles to Java 9)

Running Instructions

mvn clean
mvn compile
mvn exec:java -Dexec.mainClass=oscar.Main -Dexec.args="-h"
OSCAR arguments
oscar <targetfile> <mainclass> <outputdirectory>
Instrumented program arguments
Usage:
        java [java_options] <mainclass> [oscar_options]
                (to execute a class)
        or: java -jar <mainclass> [oscar_options]
                (to execute a jar file)

OSCAR options include:
        -a --args                       String                          Inject arguments into the program
        -c --config_file                String                          Set config file location to load
        -co --console-output            Flag            False           Enable output of noising locations signals to console
        -fo --file-output               Flag            False           Enable output of noising locations signals to a file
        -lfo --lazy-file-output         Flag            False           Enable lazy output of noising locations signals to a file
        -M --max_sleep_length           Long            0               Set maximum sleep length
        -m --min_sleep_length           Long            400             Set minimum sleep length
        -d --disable-noise              Flag            False           Disable all noise
        -np --noise-placements          List<String>    All             Set the list of active noise placements.
        -nc --noise-categories          List<String>    All             Set the list of active noise categories.
        -pnp --print-noise-placements   Flag            -               Print all possible noise placements.
        -v --version                    Flag            -               Print OSCAR version.
        -vb --verbose                   Flag            False           Enable full logging.
        -q --quiet                      Flag            False           Disable logging.
        -h --help                       Flag            False           Print Help.

OSCAR Noise Injector 2022
Note:
  • Sleep lengths should be integers
  • Injected arguments need to be inside quotes as such: "-a -b -c"

Examples:

Account
  1. Compile the Account program source code
cd data/cflash/account
javac *.java
cd ../../..
  1. Use OSCAR to instrument the Account program's bytecode with the noising engine's logic. OSCAR will wrap the original program in its routine. The outputted program will be in the folder "output".
mvn exec:java -Dexec.mainClass=oscar.Main -Dexec.args="data/cflash/account/Main.class Main 
output"
  1. Run the instrumented program without any noise
cd output
java Main -d
  1. Run the instrumented program with random noise between 0 and 100ms
java Main -m 0 -M 100
  1. Run the instrumented program, only noising synchronized blocks and methods, and lazily output the trace to a file.
java Main -m 0 -M 100 -nc sb -lfo
  1. Run the instrumented program, with specific arguments.
java Main -a "5"

oscar's People

Contributors

filipedeluna avatar

Watchers

 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.