whitespaces and show help in case no option is provided
git-svn-id: file:///home/svn/framework3/trunk@13828 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
7d7795eb46
commit
f948dab24a
|
@ -4,6 +4,7 @@
|
|||
# This is meant as an illustration.
|
||||
#
|
||||
|
||||
|
||||
spawn = false
|
||||
kill = false
|
||||
target_pid = nil
|
||||
|
@ -31,7 +32,6 @@ opts.parse(args) { |opt, idx, val|
|
|||
end
|
||||
}
|
||||
|
||||
|
||||
# Creates a temp notepad.exe to migrate to depending the architecture.
|
||||
def create_temp_proc()
|
||||
sysinfo = client.sys.config.sysinfo
|
||||
|
@ -46,6 +46,13 @@ def create_temp_proc()
|
|||
proc = client.sys.process.execute(cmd, nil, {'Hidden' => true })
|
||||
return proc.pid
|
||||
end
|
||||
# In case no option is provided show help
|
||||
if args.length == 0
|
||||
print_line(opts.usage)
|
||||
raise Rex::Script::Completed
|
||||
end
|
||||
|
||||
### Main ###
|
||||
|
||||
if client.platform =~ /win32|win64/
|
||||
server = client.sys.process.open
|
||||
|
|
Loading…
Reference in New Issue