Date: Wed, 18 May 2016 13:00:38 +0900 From: "IIJIMA Hiromitsu" <delmonta@dennougedougakkai-ndd.org> To: <freebsd-users-jp@FreeBSD.org> Subject: [FreeBSD-users-jp 95813] Re: =?iso-2022-jp?b?bmMoMSkbJEIkcjtIJEMkRiVHITwlPyRyQXc/LiQ3GyhC?= =?iso-2022-jp?b?GyRCJEYkYjQwTjskSyRKJGkkSiQkGyhC?= Message-ID: <8E1118DC3755480EBE296E774B05DAE6@FMV> References: <88EC40C7E4214C63885ED7F7B67B817F@FMV> <6645a122-d5b9-2ded-647d-1cedd94ae44c@enuenu.org> <DBF5EA2D3C1548DE97508A6F6F9851D6@FMV> <201605151131.u4FBVT4c089490@kx.openedu.org>
next in thread | previous in thread | raw e-mail | index | archive | help
$B$$$$$8$^$G$9!#$*JV;v$,CY$/$J$j$^$7$?!#(B >> $B$=$l$+$i!"$3$l$O<a2`$K@bK!$G$9$,!"(Bnc -N $B$,;H$($k$+$I$&$+$NH=Dj$K(B >> % nc -h |& egrep '[-]N[^[:alnum:]] >& /dev/null >> $B$r<B9T$7$F=*N;%3!<%I(B $? $B$GH=JL$7$h$&$H$9$k$Hf+$K$O$^$j$^$9!#(B >> >> FreeBSD$B$N>l9g!"(Bnc -h $B$O(B1$B$rJV$7!"(Begrep$B$O(B0$B$rJV$7$^$9!#(B >> $B$G!"$3$N%Q%$%W$r(Bbash$B$G<B9T$9$k$H(B $? $B$O(B0$B$K$J$j$^$9!#(B >> $B$H$3$m$,!"F1$8%3%^%s%I$r(Btcsh$B$G<B9T$9$k$H(B $? $B$O(B1$B$K$J$j$^$9!#(B >> $BF1$8$3$H$r(BUbuntu$B$G$b$d$C$F$_$?$N$G$9$,!"$3$A$i$N>l9g!"(Bnc -h $B$O(B >> 0$B$rJV$7!"(Begrep$B$O(B1$B$rJV$9$N$G!"(B$? $B$O(Bbash$B$G$b(Btcsh$B$G$b(B1$B$K$J$j$^$9!#(B > > $B$(!<$H!$A4$F$N%=!<%9$O8+$F$J$$$N$G21B,$K2a$.$^$;$s$,!$4pK\E*(B > $B$K(B *BSD* $B$G$O$b$H$b$H(B -h $B$d(B --help $B$J$s$F^/Mn$?%*%W%7%g%s$O(B > $B$J$/!$4V0c$C$?$N$r;XDj$9$k$H>o$K(B usage $B$rJV$9;EMM$K$J$C$F$$(B > $B$k$N$G$O!)(B nc $B$O(B -h $B$,$"$j$^$7$?$,!$$G$b4pK\(B 1 $B$rJV$7$F$$$k(B > $B$N$G$O!)(Bsh $B$G8+$k$H!$(B FreeBSD$B$G$O3N$+$K$=$&$G$9$M!#(B $B$3$A$i$G$b2<5-$N$h$&$K3NG'$7$^$7$?!#(B $ sh $ uname -a FreeBSD sodans3.funini.com 9.3-RELEASE-p24 FreeBSD 9.3-RELEASE-p24 #0: Sat Aug 22 01:54:44 UTC 2015 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 $ nc -h 1>/dev/null 2>&1 ; echo $? 1 $B$G$b!"(BUbuntu$B$G$O(B nc -h $B$O(B0$B$rJV$9$s$G$9!#(B $ sh $ uname -a Linux ubuntu.delmonta.orz 4.2.0-36-generic #41-Ubuntu SMP Mon Apr 18 15:47:56 UTC 2016 i686 i686 i686 GNU/Linux $ ls -li `which sh` `which bash` 263917 -rwxr-xr-x 1 root root 1109520 Sep 1 2015 /bin/bash 262845 lrwxrwxrwx 1 root root 4 Feb 18 05:26 /bin/sh -> dash $ ls -li /bin/dash 262839 -rwxr-xr-x 1 root root 173644 Feb 18 05:26 /bin/dash $ nc -h 1>/dev/null 2>&1 ; echo $? 0 $B!t(Bsh$B$,(Bbash$B$X$N%O!<%I%j%s%/$K$J$C$F$$$J$$$H$$$&$N$O!"(B $B!t(BLinux$B7O$G$ODA$7$$$+$b!#(B >> $B$G!"$3$N%Q%$%W$r(Bbash$B$G<B9T$9$k$H(B $? $B$O(B0$B$K$J$j$^$9!#(B >> $B$H$3$m$,!"F1$8%3%^%s%I$r(Btcsh$B$G<B9T$9$k$H(B $? $B$O(B1$B$K$J$j$^$9!#(B $B$3$l$b<a2`$K@bK!$G$9$,!"(Bbash$B$N5sF0$r(Btcsh$BIw$K$9$k$3$H$b!"(B $B5U$K(Btcsh$B$N5sF0$r(Bbash$BIw$K$9$k$3$H$b2DG=$G$9!#(B $ tcsh -c 'unset anyerror ; perl -e exit\ 23 | perl -e exit\ 13 | perl -e exit\ 0 ; echo $?' 0 $ bash -o pipefail -c 'perl -e exit\ 23 | perl -e exit\ 13 | perl -e exit\ 0 ; echo $?' 13 >> $B7k6I$N$H$3$m!"(Bnc -N $B$,;H$($k$+$I$&$+$NH=Dj$K$O(B >> % test -n "`nc -h |& egrep '[-]N[^[:alnum:]]'`" >> $B$"$?$j$r;H$&I,MW$,$"$j$^$9!#(B > > sh $B$G$9$,!$D>@\!$(B > if nc -N foo 1234 < bar; then > $B$H$+$9$l$PNI$$$h$&$J(B... $B:#2s$N>l9g!"$3$N(B nc $B%3%^%s%I$O!V4{CN$N%]!<%H$+$i%G!<%?$r<h$C$F$/$k!W(B $B$N$,L\E*$G$O$J$/!"!V4{$K(B nc -l $B$GN)$A>e$,$C$F$$$k%5!<%P%W%m%;%9$r(B $BMn$H$9!W$N$,L\E*$J$s$G$9!#(B $B6qBNE*$K$O!"(Bnc$B$r;H$C$F$$$k$N$OK?%"%W%j$N@H<e@-8!>Z%9%/%j%W%H(B $B!J$3$3$G6qBNE*$J<j8}$^$G8x3+$7$F$$$$$N$+$I$&$+LB$&$N$G!"(B $BL>A0$OIz$;$F$*$-$^$9!K$G$7$F!"$3$s$J=q$-J}$,$7$F$"$j$^$9!#(B | #!/usr/bin/env bash ... | #random port above 16K | PORT=$(($RANDOM + 16384)) | echo "testing http with local port: ${PORT}" | # silence job control messages | set -b | # setup a dummy http server | printf "HTTP/1.0 200 OK\n\n" | nc -l ${PORT} > requestheaders 2>/dev/null & | if test $? -ne 0; then | echo >&2 "failed to listen on localhost:${PORT}" | exit 1 | fi | ### $B@H<e$J$i(B http://localhost:${PORT}/ $B$K%"%/%;%9$7$F$7$^$&%3%^%s%I(B ### | if test -s requestheaders; then | echo "UNSAFE" | else | echo "SAFE" | # terminate the dummy server | echo | nc localhost ${PORT} 2>/dev/null 1>/dev/null | fi | rm requestheaders | set +b $B$3$N:G8e$N(B echo | nc localhopst ${PORT} $B$,(BFreeBSD$B$G$O$$$D$^$G$?$C$F$b=*$o$i$J$/$F!J(Bnc$B$O%G%U%)%k%H$G(B $B%?%$%`%"%&%HL54|8B$G$9!K!"$=$l$r(B nc -z localhost ${PORT} 2>/dev/null 1>/dev/null $B$KJQ$($?$i$&$^$/$$$C$?!"$H$$$&$o$1$G!#(B $B$J$N$G!"(Bnc -L $B$r$$$A$I<B9T$7$F$_$FF0:n$,3NG'$G$-$?$i(B2$B2sL\$r<B9T$9$k(B $B0UL#$O$J$$$7!"5U$K(B invalid option $B$H8@$o$l$?$i(B -N $B$J$7$G:FEY<B9T$9$k(B $BI,MW$,$"$k$7!"$H$$$&$o$1$J$s$G$9!#(B $B$H$j$"$($:(B nc -z $B$G2r7h$9$k$N$G!"$=$NJ}8~$G@H<e@-8!>Z%A!<%`$K(B $B%Q%C%A$rAw$j$^$7$?!#$I$&$bL5;k$5$l$F$$$k$h$&$G$O$"$j$^$9$,!#(B ======================================================================== (Mr.) IIJIMA Hiromitsu aka Delmonta <delmonta@dennougedougakkai-ndd.org> $BHSEh(B $B9@8w(B $B!?(B $B$G$k$b$s$?!&$$$$$8$^(B $B!((B ($BG$F1(B)$BEEG>30F;3X2q(B $BBeI=<hDyLr0X;R?M(B ------------------------------------------------------------------------ Web (Japanese): http://www.dennougedougakkai-ndd.org/ $B!!(B Twitter: @delmonta_iijima, @kabu_agare, #$BJ|AwBg3X(B, #OUJ Yahoo! Japan: delmonta_iijima ------------------------------------------------------------------------ $B%^%K%"%D%/$G0=$7$$%/%$%E(Bbot$B!"1?MQ3+;O!*8=:_!"9XFI<T!&=PBj<T$H$bJg=8Cf!#(B $B!!!!!!!!"(9XFI$O$3$A$i$+$i(B $B"*(B https://twitter.com/AyaC_KaltQ $B!!!!!!!!"(=PBj4uK>$N$+$?$O(B $B"*(B http://kaltq.wicurio.com/ ========================================================================
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8E1118DC3755480EBE296E774B05DAE6>