Change port

This commit is contained in:
wchen-r7 2017-03-31 17:20:04 -05:00 committed by James Barnett
parent 92d0e1bc45
commit 185c915655
3 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ require 'net/http'
SECRET = "a7aebc287bba0ee4e64f947415a94e5f"
cli = Net::HTTP.new('127.0.0.1', 8080)
cli = Net::HTTP.new('127.0.0.1', 8181)
req = Net::HTTP::Get.new('/')
res = cli.request(req)
cookie = res['Set-Cookie'].scan(/_metasploitable=(.+); path/).flatten.first || ''

View File

@ -27,7 +27,7 @@ dump = [ Marshal.dump(session) ].pack('m')
hmac = OpenSSL::HMAC.hexdigest(OpenSSL::Digest::SHA1.new, SECRET, dump)
cookie = "_metasploitable=#{CGI.escape("#{dump}--#{hmac}")}"
http = Net::HTTP.new('127.0.0.1', 8080)
http = Net::HTTP.new('127.0.0.1', 8181)
req = Net::HTTP::Get.new('/')
req['Cookie'] = cookie
res = http.request(req)

View File

@ -8,7 +8,7 @@ MYSECRET = 'a7aebc287bba0ee4e64f947415a94e5f'
set :environment, :development
set :bind, '0.0.0.0'
set :port, 8080
set :port, 8181
use Rack::Session::Cookie,
:key => "_metasploitable",