Changeset 1088
- Timestamp:
- 05/28/08 21:50:17 (6 months ago)
- Files:
-
- fwknop/trunk/fwknop (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
fwknop/trunk/fwknop
r1081 r1088 824 824 print 825 825 "\n[+] Sending $msg_len byte message to $knock_dst over $spoof_proto", 826 "/$enc_pcap_port\n (spoofed src IP: $spoof_src).\n \n" unless $quiet;826 "/$enc_pcap_port\n (spoofed src IP: $spoof_src).\n" unless $quiet; 827 827 my $rand_src_port = int(rand(65535)); 828 828 $rand_src_port = 65001 if $rand_src_port > 65535; … … 887 887 } 888 888 }); 889 if ($test_mode) { 890 print " --Test-mode enabled, SPA packet not sent.\n"; 891 } else { 889 unless ($test_mode) { 892 890 $rawpkt->send(); 893 891 } … … 897 895 if ($spa_established_tcp) { ### useful for Tor 898 896 print "\n[+] Sending $msg_len byte message to $knock_dst ", 899 "over established tcp/$enc_pcap_port socket...\n \n"897 "over established tcp/$enc_pcap_port socket...\n" 900 898 unless $quiet; 901 899 902 if ($test_mode) { 903 print " --Test-mode enabled, SPA packet not sent.\n"; 904 } else { 900 unless ($test_mode) { 905 901 my $socket = IO::Socket::INET->new( 906 902 PeerAddr => $knock_dst, … … 916 912 } else { 917 913 print "\n[+] Sending $msg_len byte message to $knock_dst ", 918 "over udp/$enc_pcap_port...\n\n" unless $quiet; 919 920 if ($test_mode) { 921 print " --Test-mode enabled, SPA packet not sent.\n"; 922 } else { 914 "over udp/$enc_pcap_port...\n" unless $quiet; 915 916 unless ($test_mode) { 923 917 my $socket = IO::Socket::INET->new( 924 918 PeerAddr => $knock_dst, … … 931 925 undef $socket; 932 926 } 927 } 928 } 929 unless ($quiet) { 930 if ($NAT_access_str and $NAT_access_str =~ /($ip_re),(\d+)/) { 931 my $internal_ip = $1; 932 my $nat_port = $2; 933 print " Requesting NAT access to $access_str on $internal_ip via ", 934 "port $nat_port\n\n"; 935 } else { 936 print "\n"; 937 } 938 if ($test_mode) { 939 print " --Test-mode enabled, SPA packet not sent.\n\n"; 933 940 } 934 941 }
