Changeset 1241
- Timestamp:
- 09/13/08 09:06:08 (2 months ago)
- Files:
-
- fwknop/trunk/fwknop (modified) (5 diffs)
- fwknop/trunk/fwknop.8 (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
fwknop/trunk/fwknop
r1232 r1241 102 102 my $save_packet_mode = 0; 103 103 my $save_packet_file = ''; 104 my $save_packet_append = 0; 104 105 my $cmdline_pcap_cmd = ''; 105 106 my $no_save_last_args = 0; … … 430 431 $save_packet_file = "$homedir/fwknop_save_packet.$$"; 431 432 } 432 unlink $save_packet_file if -e $save_packet_file; 433 unless ($save_packet_append) { 434 unlink $save_packet_file if -e $save_packet_file; 435 } 433 436 } 434 437 … … 896 899 if ($save_packet_mode) { 897 900 print " Saving packet data to: $save_packet_file\n" unless $quiet; 898 open F, "> $save_packet_file" or die "[*] Could not open ", 899 "$save_packet_file: $!"; 900 print F $msg; 901 if ($save_packet_append) { 902 open F, ">> $save_packet_file" or die "[*] Could not open ", 903 "$save_packet_file: $!"; 904 } else { 905 open F, "> $save_packet_file" or die "[*] Could not open ", 906 "$save_packet_file: $!"; 907 } 908 print F $msg, "\n"; 901 909 close F; 902 910 } … … 1624 1632 'Save-packet' => \$save_packet_mode, 1625 1633 'Save-packet-file=s' => \$save_packet_file, 1634 'Save-packet-append' => \$save_packet_append, 1626 1635 'Save-dst' => \$save_destination, 1627 1636 'user-rc=s' => \$user_rc_file, … … 1979 1988 to a file (~/fwknop_save_packet.<pid> by 1980 1989 default). 1981 --Save-packet-file - Specify the path to the file where the1990 --Save-packet-file <file> - Specify the path to the file where the 1982 1991 encrypted SPA packet is stored when the 1983 1992 --Save-packet argument is used. 1993 --Save-packet-append - Append a newly generated SPA packet to the 1994 --Save-packet-file instead of overwriting 1995 an existing file. This is useful for 1996 creating lots of SPA packets for testing 1997 randomness and encryption properties. 1984 1998 --Source-port <port> - Fix a specific source port for outgoing SPA 1985 1999 packets. This is not usually necessary, fwknop/trunk/fwknop.8
r1239 r1241 285 285 command line can be complex and difficult to recall. 286 286 .TP 287 .BR \- L "\fR,\fP " \-\^\-Last-host\ \<host>287 .BR \-\^\-Last-host\ \<host> 288 288 Instruct 289 289 .B fwknop … … 337 337 See the \-\-NAT-local and \-\-NAT-access command line arguments to fwknop for 338 338 additional details on gaining access to services via a NAT operation. 339 .TP 340 .BR \-\^\-Save-packet 341 Instruct the 342 .B fwknop 343 client to write a newly created SPA packet out to a file so that it can be 344 examined off-line. The default path is 345 .I ~/fwknop_save_packet.<pid> 346 where <pid> is the process ID of the fwknop client process, but this can be 347 changed with the \-\-Save-packet-file argument (see below). 348 .TP 349 .BR \-\^\-Save-packet-file\ \<file> 350 Specify the file to write a new SPA packet to in 351 .I \-\-Save-packet 352 mode. 353 .TP 354 .BR \-\^\-Save-packet-append 355 In 356 .I \-\-Save-packet 357 mode fwknop normally overwrite the file used to save a new SPA packet, but 358 this command line argument instructs fwknop to append a new SPA packet to 359 the file instead. This is useful for generating large sets of SPA packets 360 in order to test randomness or encryption properties. 339 361 .TP 340 362 .BR \-\^\-time-offset-plus\ \<time>
