提交 86a43f94 authored 作者: Mitch Capper's avatar Mitch Capper

Tightened up usage info to avoid line breaks

上级 466e18c6
...@@ -35,31 +35,31 @@ my (@EXEC_ON_CONNECT,@EXEC_ON_QUIT); ...@@ -35,31 +35,31 @@ my (@EXEC_ON_CONNECT,@EXEC_ON_QUIT);
sub usage(){ sub usage(){
my $auto_str = join " ", @AUTOS; my $auto_str = join " ", @AUTOS;
my $usage = qq~ my $usage = qq~
Usage: fs_logger.pl options Usage: fs_logger.pl options
-A, --auto Auto mode, equiv of $auto_str -A, --auto Auto mode, equiv of $auto_str
-h, --help Usage Information -h, --help Usage Information
-H, --host=hostname Host to connect -H, --host=hostname Host to connect
-P, --port=port Port to connect (1 - 65535) -P, --port=port Port to connect (1 - 65535)
-u, --user=user\@domain user\@domain -u, --user=user\@domain user\@domain
-p, --password=password Password -p, --password=password Password
-x, --execute=command Execute Command on connect (can be used multiple times) -x, --execute=command Execute Command on connect
-X, --quit-execute=command Execute Command when quitting (can be used multiple times) -X, --quit-execute=command Execute Command when quitting
-l, --loglevel=command Log Level -l, --loglevel=command Log Level
-d, --debug=level fs_cli Debug Level (0 - 7) -d, --debug=level fs_cli Debug Level (0 - 7)
-q, --quiet Disable logging -q, --quiet Disable logging
-r, --retry Retry connection on failure -r, --retry Retry connection on failure
-R, --reconnect Reconnect if disconnected -R, --reconnect Reconnect if disconnected
-f, --file=<file> Output file -f, --file=<file> Output file
-pb --paste-bin[=<name>] Post to FreeSWITCH Paste Bin (optional name to post as) -pb --paste-bin[=<name>] Post to FS Pastebin (optional post as)
-st --sip-trace[=<profile>] Sip trace (optional profile to trace on, can be used multiple times) -st --sip-trace[=<profile>] Sip trace (optional profile to trace on)
-sd --sip-debug=<level> Set SIP debug level -sd --sip-debug=<level> Set SIP debug level
-oa --obfuscate-auto Auto obfuscate sensitive information (ips/passwords/hashes/domains) -oa --obfuscate-auto Auto obfuscate sensitive information
-of --obfuscate-file=<file> File containing strings to obfuscate from the log (one per line, can use regexp if line starts with ^) -of --obfuscate-file=<file> File containing strings to obfuscate
if line contains an equals sign(not proceeded by a '\\') what is to the right of the equals sign is used as the replacement -do --display-output Display output on stdout
-do --display-output Display output on stdout -ia --input-accept Pass input to the freeswitch console
-ia --input-accept Pass input to the freeswitch console -D, --fslogger-debug FSLogger debug mode
-D, --fslogger-debug FSLogger debug mode
The -st, -X, -x options can be used multiple times
fs_logger.pl will run until fs_cli ends or control+c fs_logger.pl will run until fs_cli ends or control+c
~; ~;
print STDERR $usage; print STDERR $usage;
......
...@@ -8,8 +8,8 @@ Auto mode (or -A) turns on a few different options to some defaults that are gen ...@@ -8,8 +8,8 @@ Auto mode (or -A) turns on a few different options to some defaults that are gen
Obfuscation Obfuscation
The -oa and -of options. The -oa and -of options.
The auto obfuscation mode (-oa) will try to randomize any ips/passwords/hashes or domains found in the log file. It tries to do so in a discrete manor so that it does not interfere with debugging. IP addresses when randomized have their common subnets preserved relative to each other. This means 192.168.50.10 may turn into 123.123.123.8 but ensures that 192.168.50.30 will have the same base (123.123.123.) class so networks can be identified. The auto obfuscation mode (-oa) will try to randomize any ips/passwords/hashes or domains found in the log file. It tries to do so in a discrete manor so that it does not interfere with debugging (mainly ips/passwords/hashes/domains). IP addresses when randomized have their common subnets preserved relative to each other. This means 192.168.50.10 may turn into 123.123.123.8 but ensures that 192.168.50.30 will have the same base (123.123.123.) class so networks can be identified.
The file obfuscation (-of) allows you to manually specify sensitive data you want always obfuscated and optionally what to obfuscate it with. See -h for details on the syntax of that file. The file obfuscation (-of) allows you to manually specify sensitive data you want always obfuscated and optionally what to obfuscate it with. File should have one entry per line. If the line starts with a '^' it treats the pattern as a regular expression, you can optionally capture groups to only replace those groups or no groups and it will replace the entire match. If line contains an equals sign(not proceeded by a '\\') what is to the right of the equals sign is used as the replacement.
Interactive Options Interactive Options
The -ia and -do options allow FS Logger to behave more like you were interacting with fs_cli directly. The display ouput (-do) option shows you what data is being logged as its being generated (although not obfuscated yet). The input accept mode (-ia) passes lines you type in FS Logger to fs_cli. With both these options it is almost exactly as if you were interacting with fs_cli. There are a few minor differences: tab auto complete does not work, function keys (F1-F12) do not work, up and down for history only work in windows (as its the console that actually does it there) and there is no colorization of lines. The -ia and -do options allow FS Logger to behave more like you were interacting with fs_cli directly. The display ouput (-do) option shows you what data is being logged as its being generated (although not obfuscated yet). The input accept mode (-ia) passes lines you type in FS Logger to fs_cli. With both these options it is almost exactly as if you were interacting with fs_cli. There are a few minor differences: tab auto complete does not work, function keys (F1-F12) do not work, up and down for history only work in windows (as its the console that actually does it there) and there is no colorization of lines.
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论