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
unstable
Carlos Perez 2010-11-03 04:40:44 +00:00
parent aa02905564
commit 70c95265f1
1 changed files with 8 additions and 12 deletions

View File

@ -17,7 +17,7 @@ meter_type = client.platform
opts = Rex::Parser::Arguments.new( opts = Rex::Parser::Arguments.new(
"-h" => [ false, "Help menu" ], "-h" => [ false, "Help menu" ],
"-i" => [ false, "Show information about Event Logs on the System and their configuration"], "-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)"], "-c" => [ true, "Clear a given Event Log (or ALL if no argument specified)"],
"-f" => [ true, "Event ID to filter events on"], "-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"], "-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 end
# List the logs if the user desires # List the logs if the user desires
if list_logs if list_logs and eventlog_name
if eventlog_name list_logs(eventlog_name,filter,filter_string,logs,local_log,supress_print)
list_logs(eventlog_name,filter,filter_string,logs,local_log,supress_print) else
else print_error("You must specify and eventlog to query!")
eventlog_list.each { |eventlog_name|
print_status eventlog_name + ": "
list_logs(eventlog_name,filter,filter_string,logs,local_log,supress_print)
}
end
end end
# Finally, clear the specified logs if the user desires # Finally, clear the specified logs if the user desires
if clear_logs if clear_logs
if eventlog_name if eventlog_name
clear_logs(eventlog_name) clear_logs(eventlog_name)
else else
eventlog_list.each { |eventlog_name| eventlog_list.each do |eventlog_name|
print_status eventlog_name + ": " print_status eventlog_name + ": "
clear_logs(eventlog_name) clear_logs(eventlog_name)
} end
end end
end end