Random channel
parent
ccd12e66a7
commit
8d55104712
|
@ -13,7 +13,7 @@ Status : <span id="message">Please wait for the chat request to be accepted.
|
|||
<div id="chat_area"></div>
|
||||
<a href="http://metasploit.com/" target="_blank">Metasploit.com</a>
|
||||
<script>
|
||||
var channel = 'msfsinn3rtest123';
|
||||
var channel = '=CHANNEL=';
|
||||
var websocket = new WebSocket('ws://wsnodejs.jit.su:80');
|
||||
var inSession = false;
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
</font></div>
|
||||
<div id="chat_area"></div>
|
||||
<script>
|
||||
var channel = 'msfsinn3rtest123';
|
||||
var channel = '=CHANNEL=';
|
||||
var websocket = new WebSocket('ws://wsnodejs.jit.su:80');
|
||||
|
||||
websocket.onopen = function() {
|
||||
|
@ -55,13 +55,12 @@
|
|||
};
|
||||
|
||||
window.onload = function() {
|
||||
console.debug("onload");
|
||||
getUserMedia(function(stream) {
|
||||
peer.addStream(stream);
|
||||
peer.startBroadcasting();
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
function getUserMedia(callback) {
|
||||
var hints = {audio:true,video:{
|
||||
optional: [],
|
||||
|
|
|
@ -58,14 +58,16 @@ class Webcam
|
|||
|
||||
def chat_request
|
||||
offerer_id = 'sinn3r_offer'
|
||||
channel = Rex::Text.rand_text_alphanumeric(20)
|
||||
|
||||
remote_browser_path = get_webrtc_browser_path
|
||||
|
||||
if remote_browser_path.blank?
|
||||
raise RuntimeError, "Unable to find a suitable browser on the target machine"
|
||||
end
|
||||
|
||||
ready_status = init_video_chat(remote_browser_path, offerer_id)
|
||||
connect_video_chat(offerer_id)
|
||||
ready_status = init_video_chat(remote_browser_path, channel, offerer_id)
|
||||
connect_video_chat(channel, offerer_id)
|
||||
end
|
||||
|
||||
# Record from default audio source for +duration+ seconds;
|
||||
|
@ -137,10 +139,12 @@ class Webcam
|
|||
# @param remote_browser_path [String] A browser path that supports WebRTC on the target machine
|
||||
# @param offerer_id [String] A ID that the answerer can look for and join
|
||||
#
|
||||
def init_video_chat(remote_browser_path, offerer_id)
|
||||
def init_video_chat(remote_browser_path, channel, offerer_id)
|
||||
interface = load_interface('offerer.html')
|
||||
api = load_api_code
|
||||
|
||||
interface = interface.gsub(/\=CHANNEL\=/, channel)
|
||||
|
||||
tmp_dir = session.sys.config.getenv("TEMP")
|
||||
|
||||
begin
|
||||
|
@ -176,7 +180,7 @@ class Webcam
|
|||
# @param offerer_id [String] The offerer's ID in order to join the video chat
|
||||
# @return void
|
||||
#
|
||||
def connect_video_chat(offerer_id)
|
||||
def connect_video_chat(channel, offerer_id)
|
||||
interface = load_interface('answerer.html')
|
||||
api = load_api_code
|
||||
|
||||
|
@ -188,6 +192,7 @@ class Webcam
|
|||
interface = interface.gsub(/\=WEBRTCAPIJS\=/, tmp_api.path)
|
||||
interface = interface.gsub(/\=RHOST\=/, rhost)
|
||||
interface = interface.gsub(/\=STARTTIME\=/, Time.now.to_s)
|
||||
interface = interface.gsub(/\=CHANNEL\=/, channel)
|
||||
|
||||
tmp_interface = Tempfile.new('answerer.html')
|
||||
tmp_interface.binmode
|
||||
|
|
Loading…
Reference in New Issue