Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated command.js for sw_network_proxy #1898

Merged
merged 1 commit into from
Apr 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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