{"action":"created","comment":{"url":"https://api.github.com/repos/guardicore/monkey/pulls/comments/242047653","pull_request_review_id":185465518,"id":242047653,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MjA0NzY1Mw==","diff_hunk":"@@ -223,36 +223,35 @@ def _traceroute_windows(target_ip, ttl):\n     return trace_list\n \n \n+def _traceroute_windows(target_ip, ttl):\n+    \"\"\"\n+    Traceroute for a specific IP/name - Windows implementation\n+    \"\"\"\n+    # we'll just use tracert because that's always there\n+    cli = [\"tracert\",\n+           \"-d\",\n+           \"-w\", \"250\",\n+           \"-h\", str(ttl),\n+           target_ip]\n+    proc_obj = subprocess.Popen(cli, stdout=subprocess.PIPE)\n+    stdout, stderr = proc_obj.communicate()\n+    stdout = stdout.replace('\\r', '')\n+    return _parse_traceroute(stdout, IP_ADDR_RE, ttl)\n+\n+\n def _traceroute_linux(target_ip, ttl):\n     \"\"\"\n     Traceroute for a specific IP/name - Linux implementation\n     \"\"\"\n-    # implementation note: We're currently going to just use ping.\n-    # reason is, implementing a non root requiring user is complicated (see traceroute(8) code)\n-    # while this is just ugly\n-    # we can't use traceroute because it's not always installed\n-    current_ttl = 1\n-    trace_list = []\n-    while current_ttl <= ttl:\n-        cli = [\"ping\",\n-               \"-c\", \"1\",\n-               \"-w\", \"1\",\n-               \"-t\", str(current_ttl),\n-               target_ip]\n-        proc_obj = subprocess.Popen(cli, stdout=subprocess.PIPE)\n-        stdout, stderr = proc_obj.communicate()\n-        ips = re.findall(IP_ADDR_RE, stdout)\n-        if len(ips) < 2:  # Unexpected output. Fail the whole thing since it's not reliable.\n-            return []\n-        elif ips[-1] in trace_list:  # Failed getting this hop\n-            trace_list.append(None)\n-        else:\n-            trace_list.append(ips[-1])\n-            dest_ip = ips[0]  # first ip is dest ip. must be parsed here since it can change between pings\n-\n-            if dest_ip == ips[-1]:\n-                break\n \n-        current_ttl += 1\n+    traceroute_path = get_binary_file_path(\"traceroute\")","path":"monkey/infection_monkey/network/tools.py","position":102,"original_position":102,"commit_id":"b2deb4b6c923fcde1efec232c0d152e8b191e6f3","original_commit_id":"b2deb4b6c923fcde1efec232c0d152e8b191e6f3","user":{"login":"danielguardicore","id":15857396,"node_id":"MDQ6VXNlcjE1ODU3Mzk2","avatar_url":"https://avatars2.githubusercontent.com/u/15857396?v=4","gravatar_id":"","url":"https://api.github.com/users/danielguardicore","html_url":"https://github.com/danielguardicore","followers_url":"https://api.github.com/users/danielguardicore/followers","following_url":"https://api.github.com/users/danielguardicore/following{/other_user}","gists_url":"https://api.github.com/users/danielguardicore/gists{/gist_id}","starred_url":"https://api.github.com/users/danielguardicore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielguardicore/subscriptions","organizations_url":"https://api.github.com/users/danielguardicore/orgs","repos_url":"https://api.github.com/users/danielguardicore/repos","events_url":"https://api.github.com/users/danielguardicore/events{/privacy}","received_events_url":"https://api.github.com/users/danielguardicore/received_events","type":"User","site_admin":false},"body":"Also, did you check this outside of pyinstaller?","created_at":"2018-12-17T07:43:24Z","updated_at":"2018-12-17T07:43:38Z","html_url":"https://github.com/guardicore/monkey/pull/229#discussion_r242047653","pull_request_url":"https://api.github.com/repos/guardicore/monkey/pulls/229","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/guardicore/monkey/pulls/comments/242047653"},"html":{"href":"https://github.com/guardicore/monkey/pull/229#discussion_r242047653"},"pull_request":{"href":"https://api.github.com/repos/guardicore/monkey/pulls/229"}},"in_reply_to_id":242047073},"pull_request":{"url":"https://api.github.com/repos/guardicore/monkey/pulls/229","id":238978338,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM4OTc4MzM4","html_url":"https://github.com/guardicore/monkey/pull/229","diff_url":"https://github.com/guardicore/monkey/pull/229.diff","patch_url":"https://github.com/guardicore/monkey/pull/229.patch","issue_url":"https://api.github.com/repos/guardicore/monkey/issues/229","number":229,"state":"open","locked":false,"title":"Feature/tracert with bin","user":{"login":"itaymmguardicore","id":30774653,"node_id":"MDQ6VXNlcjMwNzc0NjUz","avatar_url":"https://avatars3.githubusercontent.com/u/30774653?v=4","gravatar_id":"","url":"https://api.github.com/users/itaymmguardicore","html_url":"https://github.com/itaymmguardicore","followers_url":"https://api.github.com/users/itaymmguardicore/followers","following_url":"https://api.github.com/users/itaymmguardicore/following{/other_user}","gists_url":"https://api.github.com/users/itaymmguardicore/gists{/gist_id}","starred_url":"https://api.github.com/users/itaymmguardicore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itaymmguardicore/subscriptions","organizations_url":"https://api.github.com/users/itaymmguardicore/orgs","repos_url":"https://api.github.com/users/itaymmguardicore/repos","events_url":"https://api.github.com/users/itaymmguardicore/events{/privacy}","received_events_url":"https://api.github.com/users/itaymmguardicore/received_events","type":"User","site_admin":false},"body":"# Feature / Fixes\r\n> On linux, a pre-built traceroute will be carried along with the monkey\r\n\r\n* [X] Have you added an explanation of what your changes do and why you'd like to include them?\r\n* [X] Have you successfully tested your changes locally?\r\n\r\n##  Changes\r\n  - Add prebuilt traceroute to monkey\r\n  - Use carried traceroute\r\n","created_at":"2018-12-16T17:11:07Z","updated_at":"2018-12-17T07:43:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"75daf210f7f06e2afca08216e3aa5d85b9f9bc16","assignee":{"login":"itaymmguardicore","id":30774653,"node_id":"MDQ6VXNlcjMwNzc0NjUz","avatar_url":"https://avatars3.githubusercontent.com/u/30774653?v=4","gravatar_id":"","url":"https://api.github.com/users/itaymmguardicore","html_url":"https://github.com/itaymmguardicore","followers_url":"https://api.github.com/users/itaymmguardicore/followers","following_url":"https://api.github.com/users/itaymmguardicore/following{/other_user}","gists_url":"https://api.github.com/users/itaymmguardicore/gists{/gist_id}","starred_url":"https://api.github.com/users/itaymmguardicore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itaymmguardicore/subscriptions","organizations_url":"https://api.github.com/users/itaymmguardicore/orgs","repos_url":"https://api.github.com/users/itaymmguardicore/repos","events_url":"https://api.github.com/users/itaymmguardicore/events{/privacy}","received_events_url":"https://api.github.com/users/itaymmguardicore/received_events","type":"User","site_admin":false},"assignees":[{"login":"itaymmguardicore","id":30774653,"node_id":"MDQ6VXNlcjMwNzc0NjUz","avatar_url":"https://avatars3.githubusercontent.com/u/30774653?v=4","gravatar_id":"","url":"https://api.github.com/users/itaymmguardicore","html_url":"https://github.com/itaymmguardicore","followers_url":"https://api.github.com/users/itaymmguardicore/followers","following_url":"https://api.github.com/users/itaymmguardicore/following{/other_user}","gists_url":"https://api.github.com/users/itaymmguardicore/gists{/gist_id}","starred_url":"https://api.github.com/users/itaymmguardicore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itaymmguardicore/subscriptions","organizations_url":"https://api.github.com/users/itaymmguardicore/orgs","repos_url":"https://api.github.com/users/itaymmguardicore/repos","events_url":"https://api.github.com/users/itaymmguardicore/events{/privacy}","received_events_url":"https://api.github.com/users/itaymmguardicore/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/guardicore/monkey/pulls/229/commits","review_comments_url":"https://api.github.com/repos/guardicore/monkey/pulls/229/comments","review_comment_url":"https://api.github.com/repos/guardicore/monkey/pulls/comments{/number}","comments_url":"https://api.github.com/repos/guardicore/monkey/issues/229/comments","statuses_url":"https://api.github.com/repos/guardicore/monkey/statuses/b2deb4b6c923fcde1efec232c0d152e8b191e6f3","head":{"label":"guardicore:feature/tracert-with-bin","ref":"feature/tracert-with-bin","sha":"b2deb4b6c923fcde1efec232c0d152e8b191e6f3","user":{"login":"guardicore","id":5675395,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2NzUzOTU=","avatar_url":"https://avatars2.githubusercontent.com/u/5675395?v=4","gravatar_id":"","url":"https://api.github.com/users/guardicore","html_url":"https://github.com/guardicore","followers_url":"https://api.github.com/users/guardicore/followers","following_url":"https://api.github.com/users/guardicore/following{/other_user}","gists_url":"https://api.github.com/users/guardicore/gists{/gist_id}","starred_url":"https://api.github.com/users/guardicore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardicore/subscriptions","organizations_url":"https://api.github.com/users/guardicore/orgs","repos_url":"https://api.github.com/users/guardicore/repos","events_url":"https://api.github.com/users/guardicore/events{/privacy}","received_events_url":"https://api.github.com/users/guardicore/received_events","type":"Organization","site_admin":false},"repo":{"id":41620215,"node_id":"MDEwOlJlcG9zaXRvcnk0MTYyMDIxNQ==","name":"monkey","full_name":"guardicore/monkey","private":false,"owner":{"login":"guardicore","id":5675395,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2NzUzOTU=","avatar_url":"https://avatars2.githubusercontent.com/u/5675395?v=4","gravatar_id":"","url":"https://api.github.com/users/guardicore","html_url":"https://github.com/guardicore","followers_url":"https://api.github.com/users/guardicore/followers","following_url":"https://api.github.com/users/guardicore/following{/other_user}","gists_url":"https://api.github.com/users/guardicore/gists{/gist_id}","starred_url":"https://api.github.com/users/guardicore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardicore/subscriptions","organizations_url":"https://api.github.com/users/guardicore/orgs","repos_url":"https://api.github.com/users/guardicore/repos","events_url":"https://api.github.com/users/guardicore/events{/privacy}","received_events_url":"https://api.github.com/users/guardicore/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/guardicore/monkey","description":"Infection Monkey - An automated pentest tool","fork":false,"url":"https://api.github.com/repos/guardicore/monkey","forks_url":"https://api.github.com/repos/guardicore/monkey/forks","keys_url":"https://api.github.com/repos/guardicore/monkey/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardicore/monkey/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardicore/monkey/teams","hooks_url":"https://api.github.com/repos/guardicore/monkey/hooks","issue_events_url":"https://api.github.com/repos/guardicore/monkey/issues/events{/number}","events_url":"https://api.github.com/repos/guardicore/monkey/events","assignees_url":"https://api.github.com/repos/guardicore/monkey/assignees{/user}","branches_url":"https://api.github.com/repos/guardicore/monkey/branches{/branch}","tags_url":"https://api.github.com/repos/guardicore/monkey/tags","blobs_url":"https://api.github.com/repos/guardicore/monkey/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardicore/monkey/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardicore/monkey/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardicore/monkey/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardicore/monkey/statuses/{sha}","languages_url":"https://api.github.com/repos/guardicore/monkey/languages","stargazers_url":"https://api.github.com/repos/guardicore/monkey/stargazers","contributors_url":"https://api.github.com/repos/guardicore/monkey/contributors","subscribers_url":"https://api.github.com/repos/guardicore/monkey/subscribers","subscription_url":"https://api.github.com/repos/guardicore/monkey/subscription","commits_url":"https://api.github.com/repos/guardicore/monkey/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardicore/monkey/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardicore/monkey/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardicore/monkey/issues/comments{/number}","contents_url":"https://api.github.com/repos/guardicore/monkey/contents/{+path}","compare_url":"https://api.github.com/repos/guardicore/monkey/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardicore/monkey/merges","archive_url":"https://api.github.com/repos/guardicore/monkey/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardicore/monkey/downloads","issues_url":"https://api.github.com/repos/guardicore/monkey/issues{/number}","pulls_url":"https://api.github.com/repos/guardicore/monkey/pulls{/number}","milestones_url":"https://api.github.com/repos/guardicore/monkey/milestones{/number}","notifications_url":"https://api.github.com/repos/guardicore/monkey/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardicore/monkey/labels{/name}","releases_url":"https://api.github.com/repos/guardicore/monkey/releases{/id}","deployments_url":"https://api.github.com/repos/guardicore/monkey/deployments","created_at":"2015-08-30T07:22:51Z","updated_at":"2018-12-17T06:40:50Z","pushed_at":"2018-12-16T17:11:07Z","git_url":"git://github.com/guardicore/monkey.git","ssh_url":"git@github.com:guardicore/monkey.git","clone_url":"https://github.com/guardicore/monkey.git","svn_url":"https://github.com/guardicore/monkey","homepage":"https://www.guardicore.com/infectionmonkey/","size":4861,"stargazers_count":2541,"watchers_count":2541,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":269,"mirror_url":null,"archived":false,"open_issues_count":14,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":269,"open_issues":14,"watchers":2541,"default_branch":"develop"}},"base":{"label":"guardicore:develop","ref":"develop","sha":"598455113b8dfa16e5fe897b8ff838b8ed831ab2","user":{"login":"guardicore","id":5675395,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2NzUzOTU=","avatar_url":"https://avatars2.githubusercontent.com/u/5675395?v=4","gravatar_id":"","url":"https://api.github.com/users/guardicore","html_url":"https://github.com/guardicore","followers_url":"https://api.github.com/users/guardicore/followers","following_url":"https://api.github.com/users/guardicore/following{/other_user}","gists_url":"https://api.github.com/users/guardicore/gists{/gist_id}","starred_url":"https://api.github.com/users/guardicore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardicore/subscriptions","organizations_url":"https://api.github.com/users/guardicore/orgs","repos_url":"https://api.github.com/users/guardicore/repos","events_url":"https://api.github.com/users/guardicore/events{/privacy}","received_events_url":"https://api.github.com/users/guardicore/received_events","type":"Organization","site_admin":false},"repo":{"id":41620215,"node_id":"MDEwOlJlcG9zaXRvcnk0MTYyMDIxNQ==","name":"monkey","full_name":"guardicore/monkey","private":false,"owner":{"login":"guardicore","id":5675395,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2NzUzOTU=","avatar_url":"https://avatars2.githubusercontent.com/u/5675395?v=4","gravatar_id":"","url":"https://api.github.com/users/guardicore","html_url":"https://github.com/guardicore","followers_url":"https://api.github.com/users/guardicore/followers","following_url":"https://api.github.com/users/guardicore/following{/other_user}","gists_url":"https://api.github.com/users/guardicore/gists{/gist_id}","starred_url":"https://api.github.com/users/guardicore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardicore/subscriptions","organizations_url":"https://api.github.com/users/guardicore/orgs","repos_url":"https://api.github.com/users/guardicore/repos","events_url":"https://api.github.com/users/guardicore/events{/privacy}","received_events_url":"https://api.github.com/users/guardicore/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/guardicore/monkey","description":"Infection Monkey - An automated pentest tool","fork":false,"url":"https://api.github.com/repos/guardicore/monkey","forks_url":"https://api.github.com/repos/guardicore/monkey/forks","keys_url":"https://api.github.com/repos/guardicore/monkey/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardicore/monkey/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardicore/monkey/teams","hooks_url":"https://api.github.com/repos/guardicore/monkey/hooks","issue_events_url":"https://api.github.com/repos/guardicore/monkey/issues/events{/number}","events_url":"https://api.github.com/repos/guardicore/monkey/events","assignees_url":"https://api.github.com/repos/guardicore/monkey/assignees{/user}","branches_url":"https://api.github.com/repos/guardicore/monkey/branches{/branch}","tags_url":"https://api.github.com/repos/guardicore/monkey/tags","blobs_url":"https://api.github.com/repos/guardicore/monkey/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardicore/monkey/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardicore/monkey/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardicore/monkey/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardicore/monkey/statuses/{sha}","languages_url":"https://api.github.com/repos/guardicore/monkey/languages","stargazers_url":"https://api.github.com/repos/guardicore/monkey/stargazers","contributors_url":"https://api.github.com/repos/guardicore/monkey/contributors","subscribers_url":"https://api.github.com/repos/guardicore/monkey/subscribers","subscription_url":"https://api.github.com/repos/guardicore/monkey/subscription","commits_url":"https://api.github.com/repos/guardicore/monkey/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardicore/monkey/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardicore/monkey/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardicore/monkey/issues/comments{/number}","contents_url":"https://api.github.com/repos/guardicore/monkey/contents/{+path}","compare_url":"https://api.github.com/repos/guardicore/monkey/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardicore/monkey/merges","archive_url":"https://api.github.com/repos/guardicore/monkey/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardicore/monkey/downloads","issues_url":"https://api.github.com/repos/guardicore/monkey/issues{/number}","pulls_url":"https://api.github.com/repos/guardicore/monkey/pulls{/number}","milestones_url":"https://api.github.com/repos/guardicore/monkey/milestones{/number}","notifications_url":"https://api.github.com/repos/guardicore/monkey/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardicore/monkey/labels{/name}","releases_url":"https://api.github.com/repos/guardicore/monkey/releases{/id}","deployments_url":"https://api.github.com/repos/guardicore/monkey/deployments","created_at":"2015-08-30T07:22:51Z","updated_at":"2018-12-17T06:40:50Z","pushed_at":"2018-12-16T17:11:07Z","git_url":"git://github.com/guardicore/monkey.git","ssh_url":"git@github.com:guardicore/monkey.git","clone_url":"https://github.com/guardicore/monkey.git","svn_url":"https://github.com/guardicore/monkey","homepage":"https://www.guardicore.com/infectionmonkey/","size":4861,"stargazers_count":2541,"watchers_count":2541,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":269,"mirror_url":null,"archived":false,"open_issues_count":14,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":269,"open_issues":14,"watchers":2541,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/guardicore/monkey/pulls/229"},"html":{"href":"https://github.com/guardicore/monkey/pull/229"},"issue":{"href":"https://api.github.com/repos/guardicore/monkey/issues/229"},"comments":{"href":"https://api.github.com/repos/guardicore/monkey/issues/229/comments"},"review_comments":{"href":"https://api.github.com/repos/guardicore/monkey/pulls/229/comments"},"review_comment":{"href":"https://api.github.com/repos/guardicore/monkey/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/guardicore/monkey/pulls/229/commits"},"statuses":{"href":"https://api.github.com/repos/guardicore/monkey/statuses/b2deb4b6c923fcde1efec232c0d152e8b191e6f3"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"danielguardicore"}}