mirror of
https://github.com/rapid7/metasploit-framework
synced 2024-11-12 11:52:01 +01:00
Fixed formating and changed option for listing, will not list all events by defaults
git-svn-id: file:///home/svn/framework3/trunk@10880 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
parent
aa02905564
commit
70c95265f1
@ -17,7 +17,7 @@ meter_type = client.platform
|
||||
opts = Rex::Parser::Arguments.new(
|
||||
"-h" => [ false, "Help menu" ],
|
||||
"-i" => [ false, "Show information about Event Logs on the System and their configuration"],
|
||||
"-l" => [ true, "List a given Event Log (or ALL if no argument specified)"],
|
||||
"-l" => [ true, "List a given Event Log."],
|
||||
"-c" => [ true, "Clear a given Event Log (or ALL if no argument specified)"],
|
||||
"-f" => [ true, "Event ID to filter events on"],
|
||||
"-s" => [ true, "Save logs to local CSV file, optionally specify alternate folder in which to save logs"],
|
||||
@ -227,25 +227,21 @@ if local_log
|
||||
end
|
||||
|
||||
# List the logs if the user desires
|
||||
if list_logs
|
||||
if eventlog_name
|
||||
list_logs(eventlog_name,filter,filter_string,logs,local_log,supress_print)
|
||||
else
|
||||
eventlog_list.each { |eventlog_name|
|
||||
print_status eventlog_name + ": "
|
||||
list_logs(eventlog_name,filter,filter_string,logs,local_log,supress_print)
|
||||
}
|
||||
end
|
||||
if list_logs and eventlog_name
|
||||
list_logs(eventlog_name,filter,filter_string,logs,local_log,supress_print)
|
||||
else
|
||||
print_error("You must specify and eventlog to query!")
|
||||
end
|
||||
|
||||
|
||||
# Finally, clear the specified logs if the user desires
|
||||
if clear_logs
|
||||
if eventlog_name
|
||||
clear_logs(eventlog_name)
|
||||
else
|
||||
eventlog_list.each { |eventlog_name|
|
||||
eventlog_list.each do |eventlog_name|
|
||||
print_status eventlog_name + ": "
|
||||
clear_logs(eventlog_name)
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue
Block a user