Changeset 591
- Timestamp:
- 11/05/06 15:55:00 (2 years ago)
- Files:
-
- fwknop/trunk/ChangeLog (modified) (1 diff)
- fwknop/trunk/fwknop (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
fwknop/trunk/ChangeLog
r588 r591 18 18 the REQUIRE_SOURCE_ADDRESS criteria can be applied by the fwknopd 19 19 server. 20 - Added --Show-last-cmd and --Show-host-cmd args to fwknop so that the 21 last fwknop command and the last fwknop host commands can be viewed. 20 22 - Added the svn revision number to --Version and --help output. 21 23 fwknop/trunk/fwknop
r590 r591 73 73 my $server_proto = ''; 74 74 my $run_last_host = ''; 75 my $show_last_host_cmd = ''; 76 my $show_last_cmd = 0; 75 77 my $gpg_home_dir = ''; 76 78 my $gpg_recipient = ''; … … 172 174 $knock_dst_pre_resolve = $knock_dst; 173 175 174 if ($run_last_args) { 176 if ($run_last_args or $show_last_cmd) { 177 175 178 ### run fwknop with same command line args as the previous 176 179 ### execution 177 180 &run_last_cmdline(); 178 } elsif ($run_last_host) { 181 182 } elsif ($run_last_host or $show_last_host_cmd) { 183 184 $run_last_host = $show_last_host_cmd if $show_last_host_cmd; 185 179 186 ### run fwknop with the last args for this particular knock destination 180 187 &run_last_host_cmdline(); … … 264 271 265 272 ### save our command line args (so -l can be used next time) 266 &save_args() unless $run_last_args or $run_last_host or $no_save_last_args; 273 unless ($run_last_args or $run_last_host or $no_save_last_args 274 or $show_last_cmd or $show_last_host_cmd) { 275 &save_args(); 276 } 267 277 268 278 if (lc($server_mode) eq 'pcap' or lc($server_mode) eq 'knock') { … … 1108 1118 'no-save-args' => \$no_save_last_args, 1109 1119 'Last-host=s' => \$run_last_host, 1120 'Show-last-cmd' => \$show_last_cmd, 1121 'Show-host-cmd=s' => \$show_last_host_cmd, 1110 1122 'Resolve-external-IP' => \$resolve_external_ip, 1111 1123 'whatismyip' => \$resolve_external_ip, # for backwards compatibility … … 1129 1141 close S; 1130 1142 chomp $arg_line; 1143 1144 if ($show_last_cmd) { 1145 print "[+] Last fwknop client command line: $arg_line\n"; 1146 exit 0; 1147 } 1131 1148 print "[+] Running with last command line args: $arg_line\n" 1132 1149 unless $quiet; … … 1157 1174 if ($arg_line) { 1158 1175 chomp $arg_line; 1176 1177 if ($show_last_host_cmd) { 1178 print "[+] Last command run for host: $show_last_host_cmd\n", 1179 " $arg_line\n"; 1180 exit 0; 1181 } 1159 1182 print "[+] Running with last command line args: $arg_line\n" 1160 1183 unless $quiet; … … 1281 1304 --no-save-args - Do not save command line args to 1282 1305 ~/.fwknop.run file. 1306 --Show-last-cmd - Display the last fwknop command and exit. 1307 --Show-host-cmd <host> - Display the last fwknop command that was 1308 executed for <host> and exit. 1283 1309 -d, --debug - Run fwknop in debugging mode. 1284 1310 -v, --verbose - Verbose mode.
