-- mode: markdown; mode: visual-line; fill-column: 80 --
Time-stamp: <Mon 2016-02-22 22:04 svarrette>
_ _____ _ _ _ __
| |/ ____| | | | | | / _|
| | (___ | |__ __ _ __| | ___ | |__ | |_
_ | |\___ \| '_ \ / _` |/ _` |/ _ \| '_ \| _|
| |__| |____) | | | | (_| | (_| | (_) | |_) | |
\____/|_____/|_| |_|\__,_|\__,_|\___/|_.__/|_|
Copyright (c) 2016 B. Bertholon, S. Varrette and P.Bouvry <benoit@bertholon.info>
A JavaScript Obfuscation framework based on evolutionary heuristics
This repository is hosted on Github.
-
To clone this repository, proceed as follows (adapt accordingly):
$> mkdir -p ~/git/github.com/shadobf $> cd ~/git/github.com/shadobf $> git clone https://github.com/shadobf/JShadobf.git
/!\ IMPORTANT
: Once cloned, initiate your local copy of the repository by running:
$> cd jshadobf
$> make setup
This will initiate the Git submodules of this repository and setup the git flow layout for this repository.
Later on, you can upgrade the Git submodules to the latest version by running:
$> make upgrade
If upon pulling the repository, you end in a state where another collaborator have upgraded the Git submodules for this repository, you'll end in a dirty state (as reported by modifications within the .submodules/
directory). In that case, just after the pull, you have to run the following to ensure consistency with regards the Git submodules:
$> make update
$> sudo apt-get install virtualenv build-essential openjdk-7-jre libfreetype6-dev libpng3 pkg-config nodejs-legacy python-dev python-tk
$> virtualenv python_jshadobf
$> source python_jshadobf/bin/activate
Go to the JShadobf directory
$> cd JShadobf
Install antlr into virtualenv
$> cd thirdparty
$> tar xzf antlr-3.1.3.tar.gz
$> cp setuptools-0.6c11-py2.7.egg antlr-3.1.3/runtime/Python/setuptools-0.6c5-py2.7.egg
$> cd antlr-3.1.3/runtime/Python
$> python setup.py install
$> cd ../../../..
Install jshadobf into virtualenv
$> cd src/
$> make
$> pip install numpy
$> python setup.py develop
$> cd ..
$> python tools/parsed_code_printer.py testsuite/prgms/sort.js
$> python tools/compute_metrics.py -a -f testsuite/prgms/alert.js
launch moaed
$> python tools/moea_launcher.py -g 50 -p 100 -1 testsuite/prgms/fibo.js -a moead -v -G mu1:exectime
You can submit bug / issues / feature request using the shadobf/jshadobf
Project Tracker
This repository make use of Git such that you should have it installed on your working machine:
$> apt-get install git-core # On Debian-like systems
$> yum install git # On CentOS-like systems
$> brew install git # On Mac OS, using [Homebrew](http://mxcl.github.com/homebrew/)
$> port install git # On Mac OS, using MacPort
Consider these resources to become more familiar (if not yet) with Git:
At least, you shall configure the following variables
$> git config --global user.name "Your Name Comes Here"
$> git config --global user.email you@yourdomain.example.com
# configure colors
$> git config --global color.diff auto
$> git config --global color.status auto
$> git config --global color.branch auto
Note that you can create git command aliases in ~/.gitconfig
as follows:
[alias]
up = pull origin
pu = push origin
st = status
df = diff
ci = commit -s
br = branch
w = whatchanged --abbrev-commit
ls = ls-files
gr = log --graph --oneline --decorate
amend = commit --amend
Consider my personal .gitconfig
as an example -- if you decide to use it, simply copy it in your home directory and adapt the [user]
section.
The Git branching model for this repository follows the guidelines of gitflow. In particular, the central repository holds two main branches with an infinite lifetime:
production
: the production-ready branchdevel
: the main branch where the latest developments interviene. This is the default branch you get when you clone the repository.
Thus you are more than encouraged to install the git-flow extensions following the installation procedures to take full advantage of the proposed operations. The associated bash completion might interest you also.
The operation consisting of releasing a new version of this repository is automated by a set of tasks within the root Makefile
.
In this context, a version number have the following format:
<major>.<minor>.<patch>[-b<build>]
where:
< major >
corresponds to the major version number< minor >
corresponds to the minor version number< patch >
corresponds to the patching version number- (eventually)
< build >
states the build number i.e. the total number of commits within thedevel
branch.
Example: `1.0.0-b28`
The current version number is stored in the root file VERSION
. /!\ NEVER MAKE ANY MANUAL CHANGES TO THIS FILE
For more information on the version, run:
$> make versioninfo
If a new version number such be bumped, you simply have to run:
$> make start_bump_{major,minor,patch}
This will start the release process for you using git-flow
.
Once you have finished to commit your last changes, make the release effective by running:
$> make release
It will finish the release using git-flow
, create the appropriate tag in the production
branch and merge all things the way they should be.
This project is released under the terms of the GPL-3.0 licence.
That's quite simple:
- Fork it
- Create your own feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request