{"action":"created","issue":{"url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/5067","labels_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/5067/labels{/name}","comments_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/5067/comments","events_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/5067/events","html_url":"https://github.com/rapid7/metasploit-framework/pull/5067","id":66181563,"number":5067,"title":"Add standalone tool for jsobfu","user":{"login":"wchen-r7","id":1170914,"avatar_url":"https://avatars.githubusercontent.com/u/1170914?v=3","gravatar_id":"","url":"https://api.github.com/users/wchen-r7","html_url":"https://github.com/wchen-r7","followers_url":"https://api.github.com/users/wchen-r7/followers","following_url":"https://api.github.com/users/wchen-r7/following{/other_user}","gists_url":"https://api.github.com/users/wchen-r7/gists{/gist_id}","starred_url":"https://api.github.com/users/wchen-r7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wchen-r7/subscriptions","organizations_url":"https://api.github.com/users/wchen-r7/orgs","repos_url":"https://api.github.com/users/wchen-r7/repos","events_url":"https://api.github.com/users/wchen-r7/events{/privacy}","received_events_url":"https://api.github.com/users/wchen-r7/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rapid7/metasploit-framework/labels/feature","name":"feature","color":"bfe5bf"},{"url":"https://api.github.com/repos/rapid7/metasploit-framework/labels/misc","name":"misc","color":"bfdadc"},{"url":"https://api.github.com/repos/rapid7/metasploit-framework/labels/tests","name":"tests","color":"009800"}],"state":"closed","locked":false,"assignee":{"login":"jvazquez-r7","id":1742838,"avatar_url":"https://avatars.githubusercontent.com/u/1742838?v=3","gravatar_id":"","url":"https://api.github.com/users/jvazquez-r7","html_url":"https://github.com/jvazquez-r7","followers_url":"https://api.github.com/users/jvazquez-r7/followers","following_url":"https://api.github.com/users/jvazquez-r7/following{/other_user}","gists_url":"https://api.github.com/users/jvazquez-r7/gists{/gist_id}","starred_url":"https://api.github.com/users/jvazquez-r7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jvazquez-r7/subscriptions","organizations_url":"https://api.github.com/users/jvazquez-r7/orgs","repos_url":"https://api.github.com/users/jvazquez-r7/repos","events_url":"https://api.github.com/users/jvazquez-r7/events{/privacy}","received_events_url":"https://api.github.com/users/jvazquez-r7/received_events","type":"User","site_admin":false},"milestone":null,"comments":5,"created_at":"2015-04-03T16:37:26Z","updated_at":"2015-04-03T21:03:51Z","closed_at":"2015-04-03T21:02:15Z","pull_request":{"url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/5067","html_url":"https://github.com/rapid7/metasploit-framework/pull/5067","diff_url":"https://github.com/rapid7/metasploit-framework/pull/5067.diff","patch_url":"https://github.com/rapid7/metasploit-framework/pull/5067.patch"},"body":"This tool will obfuscate a Javascript file.\r\n\r\n## Verification\r\n\r\n- [x] Travis is green\r\n- [x] Create the following JS code as /tmp/test.js\r\n\r\n```javascript\r\nalert(\"hello, world!\");\r\n```\r\n\r\n- [x] Run the jsobfu tool: ```tools/jsobfu -i /tmp/test.js```\r\n- [x] It should obfuscate the code to something like this:\r\n\r\n```javascript\r\nwindow[(function () { var C=\"rt\",n=\"e\",M=\"a\",$=\"l\"; return M+$+n+C })()]((function () { var w=\"st\",i9=\"e\",z=\"t\"; return z+i9+w })());\r\n```\r\n\r\n- [x] Open a browser (IE, or Chrome, or Firefox), and then open the Web Developer Tool.\r\n- [x] Try your obfuscated Javascript there, and you should see an alert like this:\r\n\r\n![screen shot 2015-04-03 at 11 37 00 am](https://cloud.githubusercontent.com/assets/1170914/6985146/c7164ba8-d9f5-11e4-90fb-c527481d3f50.png)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/comments/89419010","html_url":"https://github.com/rapid7/metasploit-framework/pull/5067#issuecomment-89419010","issue_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/5067","id":89419010,"user":{"login":"jvazquez-r7","id":1742838,"avatar_url":"https://avatars.githubusercontent.com/u/1742838?v=3","gravatar_id":"","url":"https://api.github.com/users/jvazquez-r7","html_url":"https://github.com/jvazquez-r7","followers_url":"https://api.github.com/users/jvazquez-r7/followers","following_url":"https://api.github.com/users/jvazquez-r7/following{/other_user}","gists_url":"https://api.github.com/users/jvazquez-r7/gists{/gist_id}","starred_url":"https://api.github.com/users/jvazquez-r7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jvazquez-r7/subscriptions","organizations_url":"https://api.github.com/users/jvazquez-r7/orgs","repos_url":"https://api.github.com/users/jvazquez-r7/repos","events_url":"https://api.github.com/users/jvazquez-r7/events{/privacy}","received_events_url":"https://api.github.com/users/jvazquez-r7/received_events","type":"User","site_admin":false},"created_at":"2015-04-03T21:03:51Z","updated_at":"2015-04-03T21:03:51Z","body":"Thanks @wchen-r7 ! landed! \r\n\r\nJust fixed specs a little: https://github.com/rapid7/metasploit-framework/commit/cb08e5b8da66e46f3cec9e488c7add12537a4f84\r\n\r\n* to use before hooks\r\n* because the obfuscated result didn't include String.fromCharCode always"}}