Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxy #86

Merged
merged 1 commit into from
Mar 19, 2016
Merged

Proxy #86

merged 1 commit into from
Mar 19, 2016

Conversation

christofferqa
Copy link
Contributor

This pull request proposes a number of fixes to the proxy, and should solve issues #66, #70, #77, and #78:

  • 66: Rather than storing files as <hash>.<ext> they are stored as <domain>/<hash>/<name>.<ext>. URL's without a filename, e.g. sra.samsung.com, will be stored as <domain>/<hash>/index.<ext>.

    This makes it significantly easier to locate the instrumented source files. For example, the instrumented version of foo.bar/baz.js can be located simply by find . -name baz.js.

    In addition, the environment variable JALANGI_URL is set to the source URL. This can be useful for NodeJS modules passed to Jalangi2 using the --astHandlerModule option, for example, in order to load a configuration file associated with the URL of the web page being analyzed.

  • 70: The content type is now checked case insensitively.

  • 77: The proxy now runs on the current release of mitmproxy, v. 0.15.

  • 78: The problem is that the instrumented version of the file is believed to be in the cache if <hash>.js is a file on the disk, and not if <hash>_jalangi_.js is a file on the disk (https://github.com/Samsung/jalangi2/blob/master/scripts/proxy.py#L23).

    In addition, an option --no-cache is now handled by the proxy.py script for the purpose of development.

The pull request also:

  1. Removes the need for running the proxy script from inside a tmp/ folder; it will automatically store the files in a folder named cache/.
  2. Adds an option --auto-disable to the mitmproxywrapper.py script, which automatically disables the proxy when the script is interrupted (rather than having to rerun the script).
  3. Removes content security policies since they may block jalangi from executing

ksen007 added a commit that referenced this pull request Mar 19, 2016
@ksen007 ksen007 merged commit 36d59bd into Samsung:master Mar 19, 2016
@ksen007
Copy link
Contributor

ksen007 commented Mar 19, 2016

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants