Add IP and port validation to beef.net

This commit is contained in:
Brendan Coles
2017-08-11 06:12:15 +00:00
parent f545b3631b
commit 173a65be13
10 changed files with 46 additions and 35 deletions

View File

@@ -23,7 +23,7 @@ beef.execute(function() {
// validate target port
var rport = "<%= @rport %>";
if (!rport || rport > 65535 || rport < 0 || isNaN(rport)) {
if (!beef.net.is_valid_port(rport)) {
beef.net.send('<%= @command_url %>', <%= @command_id %>, 'fail=invalid target port');
return;
}