GitHub PullRequestReviewCommentEvent at 2014-09-05 00:34:06
Repository: metasploit-framework
Actor: ChrisTruncer
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/comments/17151379","id":17151379,"diff_hunk":"@@ -0,0 +1,93 @@\n+require 'metasploit/framework/login_scanner/http'\n+\n+module Metasploit\n+  module Framework\n+    module LoginScanner\n+\n+      # IP Board login scanner\n+      class IPBoard < HTTP\n+\n+        # (see Base#attempt_login)\n+        def attempt_login(credential)\n+          http_client = Rex::Proto::Http::Client.new(\n+              host, port, {}, ssl, ssl_version\n+          )\n+\n+          http_client = config_client(http_client)\n+\n+          result_opts = {\n+              credential: credential,\n+              host: host,\n+              port: port,\n+              protocol: 'tcp'\n+          }\n+          if ssl\n+            result_opts[:service_name] = 'https'\n+          else\n+            result_opts[:service_name] = 'http'\n+          end\n+\n+          begin\n+            http_client.connect\n+\n+            nonce_request = http_client.request_cgi(\n+                'uri' => uri,\n+                'method'  => 'GET'\n+            )\n+\n+            nonce_response = http_client.send_recv(nonce_request)\n+\n+            if nonce_response.body =~ /name='auth_key'\\s+value='.*?((?:[a-z0-9]*))'/i\n+              server_nonce = $1\n+\n+              auth_uri = \"#{uri}/index.php?app=core&module=global&section=login&do=process\"\n+\n+              request = http_client.request_cgi(\n+                  'uri' => auth_uri,\n+                  'method'  => 'POST',\n+                  'vars_post'      => {\n+                      'auth_key'     => server_nonce,\n+                      'ips_username' => credential.public,\n+                      'ips_password' => credential.private\n+                  },\n+              )\n+\n+              response = http_client.send_recv(request)\n+\n+              if response && response.code == 200 && response.get_cookies.include?('ipsconnect') && response.get_cookies.include?('coppa')","path":"lib/metasploit/framework/login_scanner/ipboard.rb","position":57,"original_position":57,"commit_id":"c5755824a69d5772155d4ddef2f130cdd6f70e1f","original_commit_id":"c5755824a69d5772155d4ddef2f130cdd6f70e1f","user":{"login":"ChrisTruncer","id":1674822,"avatar_url":"https://avatars.githubusercontent.com/u/1674822?v=2","gravatar_id":"642710444f9f3c815ee898c72b6481ed","url":"https://api.github.com/users/ChrisTruncer","html_url":"https://github.com/ChrisTruncer","followers_url":"https://api.github.com/users/ChrisTruncer/followers","following_url":"https://api.github.com/users/ChrisTruncer/following{/other_user}","gists_url":"https://api.github.com/users/ChrisTruncer/gists{/gist_id}","starred_url":"https://api.github.com/users/ChrisTruncer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChrisTruncer/subscriptions","organizations_url":"https://api.github.com/users/ChrisTruncer/orgs","repos_url":"https://api.github.com/users/ChrisTruncer/repos","events_url":"https://api.github.com/users/ChrisTruncer/events{/privacy}","received_events_url":"https://api.github.com/users/ChrisTruncer/received_events","type":"User","site_admin":false},"body":"response.code should be == 302.  If the login is successful, it'll do a redirect.  If it fails, it'll be a 200.","created_at":"2014-09-05T00:34:06Z","updated_at":"2014-09-05T00:34:06Z","html_url":"https://github.com/rapid7/metasploit-framework/pull/3699#discussion_r17151379","pull_request_url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/3699","_links":{"self":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/comments/17151379"},"html":{"href":"https://github.com/rapid7/metasploit-framework/pull/3699#discussion_r17151379"},"pull_request":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/3699"}}},"pull_request":{"url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/3699","id":20266699,"html_url":"https://github.com/rapid7/metasploit-framework/pull/3699","diff_url":"https://github.com/rapid7/metasploit-framework/pull/3699.diff","patch_url":"https://github.com/rapid7/metasploit-framework/pull/3699.patch","issue_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/3699","number":3699,"state":"open","locked":false,"title":"Feature/ipboard login refactor","user":{"login":"dmaloney-r7","id":1146440,"avatar_url":"https://avatars.githubusercontent.com/u/1146440?v=2","gravatar_id":"f95321053b330eaa81329f3efe681d91","url":"https://api.github.com/users/dmaloney-r7","html_url":"https://github.com/dmaloney-r7","followers_url":"https://api.github.com/users/dmaloney-r7/followers","following_url":"https://api.github.com/users/dmaloney-r7/following{/other_user}","gists_url":"https://api.github.com/users/dmaloney-r7/gists{/gist_id}","starred_url":"https://api.github.com/users/dmaloney-r7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmaloney-r7/subscriptions","organizations_url":"https://api.github.com/users/dmaloney-r7/orgs","repos_url":"https://api.github.com/users/dmaloney-r7/repos","events_url":"https://api.github.com/users/dmaloney-r7/events{/privacy}","received_events_url":"https://api.github.com/users/dmaloney-r7/received_events","type":"User","site_admin":false},"body":"This module refactors the ipboard_login module by @ChrisTruncer to use a new LoginScanner class designed to abstract the heavy lifting in a reusable and testable manner.\r\n\r\n@ChrisTruncer if you could review and test this to please make sure I didn't break anything that would be great! Thanks\r\n\r\nbranched off of https://github.com/rapid7/metasploit-framework/pull/3697","created_at":"2014-08-25T19:35:31Z","updated_at":"2014-09-05T00:34:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3d47b07749c25abc94e0c6fb86631e7690247fa8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/3699/commits","review_comments_url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/3699/comments","review_comment_url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/comments/{number}","comments_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/3699/comments","statuses_url":"https://api.github.com/repos/rapid7/metasploit-framework/statuses/c5755824a69d5772155d4ddef2f130cdd6f70e1f","head":{"label":"dmaloney-r7:feature/ipboard-login-refactor","ref":"feature/ipboard-login-refactor","sha":"c5755824a69d5772155d4ddef2f130cdd6f70e1f","user":{"login":"dmaloney-r7","id":1146440,"avatar_url":"https://avatars.githubusercontent.com/u/1146440?v=2","gravatar_id":"f95321053b330eaa81329f3efe681d91","url":"https://api.github.com/users/dmaloney-r7","html_url":"https://github.com/dmaloney-r7","followers_url":"https://api.github.com/users/dmaloney-r7/followers","following_url":"https://api.github.com/users/dmaloney-r7/following{/other_user}","gists_url":"https://api.github.com/users/dmaloney-r7/gists{/gist_id}","starred_url":"https://api.github.com/users/dmaloney-r7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmaloney-r7/subscriptions","organizations_url":"https://api.github.com/users/dmaloney-r7/orgs","repos_url":"https://api.github.com/users/dmaloney-r7/repos","events_url":"https://api.github.com/users/dmaloney-r7/events{/privacy}","received_events_url":"https://api.github.com/users/dmaloney-r7/received_events","type":"User","site_admin":false},"repo":{"id":6300145,"name":"metasploit-framework","full_name":"dmaloney-r7/metasploit-framework","owner":{"login":"dmaloney-r7","id":1146440,"avatar_url":"https://avatars.githubusercontent.com/u/1146440?v=2","gravatar_id":"f95321053b330eaa81329f3efe681d91","url":"https://api.github.com/users/dmaloney-r7","html_url":"https://github.com/dmaloney-r7","followers_url":"https://api.github.com/users/dmaloney-r7/followers","following_url":"https://api.github.com/users/dmaloney-r7/following{/other_user}","gists_url":"https://api.github.com/users/dmaloney-r7/gists{/gist_id}","starred_url":"https://api.github.com/users/dmaloney-r7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmaloney-r7/subscriptions","organizations_url":"https://api.github.com/users/dmaloney-r7/orgs","repos_url":"https://api.github.com/users/dmaloney-r7/repos","events_url":"https://api.github.com/users/dmaloney-r7/events{/privacy}","received_events_url":"https://api.github.com/users/dmaloney-r7/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dmaloney-r7/metasploit-framework","description":"Metasploit Framework","fork":true,"url":"https://api.github.com/repos/dmaloney-r7/metasploit-framework","forks_url":"https://api.github.com/repos/dmaloney-r7/metasploit-framework/forks","keys_url":"https://api.github.com/repos/dmaloney-r7/metasploit-framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dmaloney-r7/metasploit-framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dmaloney-r7/metasploit-framework/teams","hooks_url":"https://api.github.com/repos/dmaloney-r7/metasploit-framework/hooks","issue_events_url":"https://api.github.com/repos/dmaloney-r7/metasploit-framework/issues/events{/number}","events_url":"https://api.github.com/repos/dmaloney-r7/metasploit-framework/events","assignees_url":"https://api.github.com/repos/dmaloney-r7/metasploit-framework/assignees{/user}","branches_url":"https://api.github.com/repos/dmaloney-r7/metasploit-framework/branches{/branch}","tags_url":"https://api.github.com/repos/dmaloney-r7/metasploit-framework/tags","blobs_url":"https://api.github.com/repos/dmaloney-r7/metasploit-framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dmaloney-r7/metasploit-framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dmaloney-r7/metasploit-framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/dmaloney-r7/metasploit-framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dmaloney-r7/metasploit-framework/statuses/{sha}","languages_url":"https://api.github.com/repos/dmaloney-r7/metasploit-framework/languages","stargazers_url":"https://api.github.com/repos/dmaloney-r7/metasploit-framework/stargazers","contributors_url":"https://api.github.com/repos/dmaloney-r7/metasploit-framework/contributors","subscribers_url":"https://api.github.com/repos/dmaloney-r7/metasploit-framework/subscribers","subscription_url":"https://api.github.com/repos/dmaloney-r7/metasploit-framework/subscription","commits_url":"https://api.github.com/repos/dmaloney-r7/metasploit-framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/dmaloney-r7/metasploit-framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/dmaloney-r7/metasploit-framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/dmaloney-r7/metasploit-framework/issues/comments/{number}","contents_url":"https://api.github.com/repos/dmaloney-r7/metasploit-framework/contents/{+path}","compare_url":"https://api.github.com/repos/dmaloney-r7/metasploit-framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dmaloney-r7/metasploit-framework/merges","archive_url":"https://api.github.com/repos/dmaloney-r7/metasploit-framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dmaloney-r7/metasploit-framework/downloads","issues_url":"https://api.github.com/repos/dmaloney-r7/metasploit-framework/issues{/number}","pulls_url":"https://api.github.com/repos/dmaloney-r7/metasploit-framework/pulls{/number}","milestones_url":"https://api.github.com/repos/dmaloney-r7/metasploit-framework/milestones{/number}","notifications_url":"https://api.github.com/repos/dmaloney-r7/metasploit-framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dmaloney-r7/metasploit-framework/labels{/name}","releases_url":"https://api.github.com/repos/dmaloney-r7/metasploit-framework/releases{/id}","created_at":"2012-10-19T19:04:14Z","updated_at":"2014-06-26T15:23:26Z","pushed_at":"2014-09-04T17:33:31Z","git_url":"git://github.com/dmaloney-r7/metasploit-framework.git","ssh_url":"git@github.com:dmaloney-r7/metasploit-framework.git","clone_url":"https://github.com/dmaloney-r7/metasploit-framework.git","svn_url":"https://github.com/dmaloney-r7/metasploit-framework","homepage":"http://www.metasploit.com/","size":290069,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rapid7:master","ref":"master","sha":"6e3739a220477c366b07613aa9711b77d269563f","user":{"login":"rapid7","id":1013671,"avatar_url":"https://avatars.githubusercontent.com/u/1013671?v=2","gravatar_id":"5d198df57a51ac06525bfa48c3ff9f6c","url":"https://api.github.com/users/rapid7","html_url":"https://github.com/rapid7","followers_url":"https://api.github.com/users/rapid7/followers","following_url":"https://api.github.com/users/rapid7/following{/other_user}","gists_url":"https://api.github.com/users/rapid7/gists{/gist_id}","starred_url":"https://api.github.com/users/rapid7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rapid7/subscriptions","organizations_url":"https://api.github.com/users/rapid7/orgs","repos_url":"https://api.github.com/users/rapid7/repos","events_url":"https://api.github.com/users/rapid7/events{/privacy}","received_events_url":"https://api.github.com/users/rapid7/received_events","type":"Organization","site_admin":false},"repo":{"id":2293158,"name":"metasploit-framework","full_name":"rapid7/metasploit-framework","owner":{"login":"rapid7","id":1013671,"avatar_url":"https://avatars.githubusercontent.com/u/1013671?v=2","gravatar_id":"5d198df57a51ac06525bfa48c3ff9f6c","url":"https://api.github.com/users/rapid7","html_url":"https://github.com/rapid7","followers_url":"https://api.github.com/users/rapid7/followers","following_url":"https://api.github.com/users/rapid7/following{/other_user}","gists_url":"https://api.github.com/users/rapid7/gists{/gist_id}","starred_url":"https://api.github.com/users/rapid7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rapid7/subscriptions","organizations_url":"https://api.github.com/users/rapid7/orgs","repos_url":"https://api.github.com/users/rapid7/repos","events_url":"https://api.github.com/users/rapid7/events{/privacy}","received_events_url":"https://api.github.com/users/rapid7/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rapid7/metasploit-framework","description":"Metasploit Framework","fork":false,"url":"https://api.github.com/repos/rapid7/metasploit-framework","forks_url":"https://api.github.com/repos/rapid7/metasploit-framework/forks","keys_url":"https://api.github.com/repos/rapid7/metasploit-framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rapid7/metasploit-framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rapid7/metasploit-framework/teams","hooks_url":"https://api.github.com/repos/rapid7/metasploit-framework/hooks","issue_events_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/events{/number}","events_url":"https://api.github.com/repos/rapid7/metasploit-framework/events","assignees_url":"https://api.github.com/repos/rapid7/metasploit-framework/assignees{/user}","branches_url":"https://api.github.com/repos/rapid7/metasploit-framework/branches{/branch}","tags_url":"https://api.github.com/repos/rapid7/metasploit-framework/tags","blobs_url":"https://api.github.com/repos/rapid7/metasploit-framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rapid7/metasploit-framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rapid7/metasploit-framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/rapid7/metasploit-framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rapid7/metasploit-framework/statuses/{sha}","languages_url":"https://api.github.com/repos/rapid7/metasploit-framework/languages","stargazers_url":"https://api.github.com/repos/rapid7/metasploit-framework/stargazers","contributors_url":"https://api.github.com/repos/rapid7/metasploit-framework/contributors","subscribers_url":"https://api.github.com/repos/rapid7/metasploit-framework/subscribers","subscription_url":"https://api.github.com/repos/rapid7/metasploit-framework/subscription","commits_url":"https://api.github.com/repos/rapid7/metasploit-framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/rapid7/metasploit-framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/rapid7/metasploit-framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/comments/{number}","contents_url":"https://api.github.com/repos/rapid7/metasploit-framework/contents/{+path}","compare_url":"https://api.github.com/repos/rapid7/metasploit-framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rapid7/metasploit-framework/merges","archive_url":"https://api.github.com/repos/rapid7/metasploit-framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rapid7/metasploit-framework/downloads","issues_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues{/number}","pulls_url":"https://api.github.com/repos/rapid7/metasploit-framework/pulls{/number}","milestones_url":"https://api.github.com/repos/rapid7/metasploit-framework/milestones{/number}","notifications_url":"https://api.github.com/repos/rapid7/metasploit-framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rapid7/metasploit-framework/labels{/name}","releases_url":"https://api.github.com/repos/rapid7/metasploit-framework/releases{/id}","created_at":"2011-08-30T06:13:20Z","updated_at":"2014-09-04T23:52:07Z","pushed_at":"2014-09-04T21:17:21Z","git_url":"git://github.com/rapid7/metasploit-framework.git","ssh_url":"git@github.com:rapid7/metasploit-framework.git","clone_url":"https://github.com/rapid7/metasploit-framework.git","svn_url":"https://github.com/rapid7/metasploit-framework","homepage":"http://www.metasploit.com/","size":971177,"stargazers_count":2492,"watchers_count":2492,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":2247,"mirror_url":null,"open_issues_count":99,"forks":2247,"open_issues":99,"watchers":2492,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/3699"},"html":{"href":"https://github.com/rapid7/metasploit-framework/pull/3699"},"issue":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/issues/3699"},"comments":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/issues/3699/comments"},"review_comments":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/3699/comments"},"review_comment":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/pulls/3699/commits"},"statuses":{"href":"https://api.github.com/repos/rapid7/metasploit-framework/statuses/c5755824a69d5772155d4ddef2f130cdd6f70e1f"}}}}