mirror of
https://github.com/0dayCTF/reverse-shell-generator.git
synced 2025-01-19 01:08:50 +00:00
Allow setting ip and port with query parameters
This commit is contained in:
parent
271cb0b089
commit
d75ecc845c
14
js/script.js
14
js/script.js
@ -77,13 +77,15 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const query = new URLSearchParams(location.hash.substring(1));
|
||||||
|
|
||||||
const rsg = {
|
const rsg = {
|
||||||
ip: localStorage.getItem('ip') || '10.10.10.10',
|
ip: query.get('ip') || localStorage.getItem('ip') || '10.10.10.10',
|
||||||
port: localStorage.getItem('port') || 9001,
|
port: query.get('port') || localStorage.getItem('port') || 9001,
|
||||||
payload: localStorage.getItem('payload') || 'windows/x64/meterpreter/reverse_tcp',
|
payload: query.get('payload') || localStorage.getItem('payload') || 'windows/x64/meterpreter/reverse_tcp',
|
||||||
shell: localStorage.getItem('shell') || rsgData.shells[0],
|
shell: query.get('shell') || localStorage.getItem('shell') || rsgData.shells[0],
|
||||||
listener: localStorage.getItem('listener') || rsgData.listenerCommands[0][1],
|
listener: query.get('listener') || localStorage.getItem('listener') || rsgData.listenerCommands[0][1],
|
||||||
encoding: localStorage.getItem('encoding') || 'None',
|
encoding: query.get('encoding') || localStorage.getItem('encoding') || 'None',
|
||||||
selectedValues: {
|
selectedValues: {
|
||||||
[CommandType.ReverseShell]: filterCommandData(rsgData.reverseShellCommands, { commandType: CommandType.ReverseShell })[0].name,
|
[CommandType.ReverseShell]: filterCommandData(rsgData.reverseShellCommands, { commandType: CommandType.ReverseShell })[0].name,
|
||||||
[CommandType.BindShell]: filterCommandData(rsgData.reverseShellCommands, { commandType: CommandType.BindShell })[0].name,
|
[CommandType.BindShell]: filterCommandData(rsgData.reverseShellCommands, { commandType: CommandType.BindShell })[0].name,
|
||||||
|
Loading…
Reference in New Issue
Block a user