Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 byfind . -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 theproxy.py
script for the purpose of development.The pull request also:
tmp/
folder; it will automatically store the files in a folder namedcache/
.--auto-disable
to themitmproxywrapper.py
script, which automatically disables the proxy when the script is interrupted (rather than having to rerun the script).