Created
June 25, 2015 12:38
-
-
Save xntrik/8ed4c89a07bb079a31b3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/beef/beef2015jun ± rake integration | |
Starting BeEF (wait a few seconds)..................... | |
export DISPLAY=:0; cd test/integration;ruby -W0 ts_integration.rb | |
Loaded suite BeEF Integration Test Suite | |
Started | |
................{"success"=>"true", "command_id"=>"4"} | |
test_get_all_hosts::::: | |
{"count"=>6, "hosts"=>"[{\"id\":1,\"hooked_browser_id\":\"L7wFuqeoZQaBd9sptDFX40ghfkMbv65ChdYaJ3cjgGaNPuBay6Yo4i9chrZniZMi1j1aCJr1uO4JScaY\",\"ip\":\"127.0.0.1\",\"hostname\":\"localhost\",\"type\":null,\"os\":\"Intel Mac OS X 10.10\",\"mac\":null,\"cid\":\"init\"},{\"id\":2,\"hooked_browser_id\":\"FxaGyuPindoOjBylLikiZOPi1YpIFpw78WAObk1ZVXQGigr61wtuGsldYvBSqFbgGndF0MsEGA9yKGwV\",\"ip\":\"127.0.0.1\",\"hostname\":\"localhost\",\"type\":null,\"os\":\"Intel Mac OS X 10.10\",\"mac\":null,\"cid\":\"init\"},{\"id\":3,\"hooked_browser_id\":\"yqWh8a4ZHrOZ8yLNhgqHGjwFctVd4S88zHKmbXItmqmFua9IGXaXmYn7W8VZTHK2BdFgNz8ldNm59uEt\",\"ip\":\"127.0.0.1\",\"hostname\":\"localhost\",\"type\":null,\"os\":\"Intel Mac OS X 10.10\",\"mac\":null,\"cid\":\"init\"},{\"id\":4,\"hooked_browser_id\":\"szEF60UM9eKNYImIvcen1slOw8ry37dKU4LJIrvX0ya3FtYXmrVRdSO1ced8VJeQW4PjR18blKrvyB8c\",\"ip\":\"127.0.0.1\",\"hostname\":\"localhost\",\"type\":null,\"os\":\"Intel Mac OS X 10.10\",\"mac\":null,\"cid\":\"init\"},{\"id\":5,\"hooked_browser_id\":\"jdFoQsP116dzLbQO4uVtts9R5z5GErYFMq6kh4Nr52VCTNGx49f7fiQaABs3IwAXyYiUColO6FtU1FTF\",\"ip\":\"127.0.0.1\",\"hostname\":\"localhost\",\"type\":null,\"os\":\"Intel Mac OS X 10.10\",\"mac\":null,\"cid\":\"init\"},{\"id\":6,\"hooked_browser_id\":\"5MIilAvq6aObGKv5ZXaI7aFbxEPAYrj2ELhHIpu2AP4FNmgUaRpda3f9GhsI8GzXKisYtNySd3eqASrh\",\"ip\":\"127.0.0.1\",\"hostname\":\"localhost\",\"type\":null,\"os\":\"Intel Mac OS X 10.10\",\"mac\":null,\"cid\":\"init\"}]"} | |
.test_get_all_services | |
{"count"=>0, "services"=>"[]"} | |
F | |
=============================================================================================================================================================================================================================== | |
Failure: | |
<0> expected to be != to | |
<0>. | |
test_get_all_services(TC_NetworkRest) | |
/Users/xian/beef/beef2015jun/test/integration/tc_network_rest.rb:150:in `test_get_all_services' | |
147: puts result | |
148: assert(result['count']) | |
149: assert(result['services']) | |
=> 150: assert_not_equal(0, result['count']) | |
151: end | |
152: | |
153: # Tests GET /api/network/services/:sessionid handler with valid input | |
=============================================================================================================================================================================================================================== | |
test_get_host_valid_id | |
{"id"=>1, "hooked_browser_id"=>"L7wFuqeoZQaBd9sptDFX40ghfkMbv65ChdYaJ3cjgGaNPuBay6Yo4i9chrZniZMi1j1aCJr1uO4JScaY", "ip"=>"127.0.0.1", "hostname"=>"localhost", "type"=>nil, "os"=>"Intel Mac OS X 10.10", "mac"=>nil, "cid"=>"init"} | |
..test_get_hosts_invalid_session | |
{"count"=>0, "hosts"=>[]} | |
.test_get_hosts_valid_session:::: | |
{"count"=>1, "hosts"=>[{"id"=>1, "hooked_browser_id"=>"L7wFuqeoZQaBd9sptDFX40ghfkMbv65ChdYaJ3cjgGaNPuBay6Yo4i9chrZniZMi1j1aCJr1uO4JScaY", "ip"=>"127.0.0.1", "hostname"=>"localhost", "type"=>nil, "os"=>"Intel Mac OS X 10.10", "mac"=>nil, "cid"=>"init"}]} | |
.F | |
=============================================================================================================================================================================================================================== | |
Failure: | |
Exception raised: | |
404 Resource Not Found: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"><html><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>The requested URL was not found on this server.</p><hr><address>Apache/2.2.3 (CentOS)</address></body></html> | |
test_get_service_valid_id(TC_NetworkRest) | |
/Users/xian/beef/beef2015jun/test/integration/tc_network_rest.rb:191:in `test_get_service_valid_id' | |
188: def test_get_service_valid_id | |
189: id = 1 | |
190: rest_response = nil | |
=> 191: assert_nothing_raised do | |
192: rest_response = RestClient.get("#{RESTAPI_NETWORK}/service/#{id}", :params => {:token => @@token}) | |
193: end | |
194: check_rest_response(rest_response) | |
=============================================================================================================================================================================================================================== | |
.test_get_services_invalid_session | |
{"count"=>0, "services"=>[]} | |
.test_get_services_valid_session | |
{"count"=>0, "services"=>[]} | |
F | |
=============================================================================================================================================================================================================================== | |
Failure: | |
<0> expected to be != to | |
<0>. | |
test_get_services_valid_session(TC_NetworkRest) | |
/Users/xian/beef/beef2015jun/test/integration/tc_network_rest.rb:165:in `test_get_services_valid_session' | |
162: puts result | |
163: assert(result['count']) | |
164: assert(result['services']) | |
=> 165: assert_not_equal(0, result['count']) | |
166: | |
167: result['services'].each do |service| | |
168: assert_equal(@@hb_session, service['hooked_browser_id']) | |
=============================================================================================================================================================================================================================== | |
Finished in 307.864582 seconds. | |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
26 tests, 82 assertions, 3 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications | |
88.4615% passed | |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
0.08 tests/s, 0.27 assertions/s | |
Shutting down BeEF... | |
ps -ef|grep beef|grep -v grep|awk '{print $2}'|xargs kill | |
~/beef/beef2015jun ± |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment