You've already forked greyhack
made rscan port optional
This commit is contained in:
@@ -1,13 +1,13 @@
|
|||||||
if params.len < 2 or params[0] == "-h" or params[0] == "--help" then
|
if params.len < 1 or params[0] == "-h" or params[0] == "--help" then
|
||||||
current_program = get_shell.host_computer.File(program_path)
|
current_program = get_shell.host_computer.File(program_path)
|
||||||
exit("Usage: "+current_program.name+" <remote ip> [remote port]")
|
exit("Usage: "+current_program.name+" <remote ip> [remote port]")
|
||||||
end if
|
end if
|
||||||
mx = include_lib("/lib/metaxploit.so")
|
mx = include_lib("/lib/metaxploit.so")
|
||||||
ip = params[0]
|
ip = params[0]
|
||||||
port = params[1].to_int
|
if params.len == 1 or port == 0 then
|
||||||
if port == 0 then
|
|
||||||
sess = mx.net_use(ip)
|
sess = mx.net_use(ip)
|
||||||
else
|
else
|
||||||
|
port = params[1].to_int
|
||||||
sess = mx.net_use(ip, port)
|
sess = mx.net_use(ip, port)
|
||||||
end if
|
end if
|
||||||
if not sess then
|
if not sess then
|
||||||
|
|||||||
Reference in New Issue
Block a user