僕の備忘録(PC、UN*X、ネットワーク関連が中心)なんです。
自分の書いたところは適当(な時とか)に書き換えますので御了承を。
特に考えることもなくTiger で make installできてしまった。
ただし、入ってないライブラリを無視し続けたらしく、
まだ色々試行錯誤を続けないと使えないっぽい。
write(1)とかwrited(8)とか見付けた。 /etc/inetd.conf に
write stream tcp wait root /usr/sbin/tcpd in.writed
と書いてみた。kill -HUP すると、
Jul 16 11:55:27 lj700 inetd[1119]: write/tcp: unknown service
んで、適当に、/etc/servicesに
write 811/tcp
とかやってみた。後はマニュアルを見ながらwrite $user /dev/tty/num とか write $user@$host /dev/tty/num とかやってみたが、いずれも
Where are you?
でおしまい。
Jul 16 12:07:20 lj700 in.writed[2120]: connect from 127.0.0.1
とかは出てるけど。
さて、次はどうしようか。
Putty で鯖に入り、export LANG=ja_JP.eucJPした上でw3m から これを書く。それにしてもJIS配列が面倒になってきた。
うにまがの過去記事(2002後半)をたよりにputtygen.exeで
もってキーを作成
(OpenSSH向けのパブリックキーは[Save]でなくコピペ)し、
鯖の~/.ssh/authorezied_keys2 に登録。したのは
じつは
一昨日だった。
がWinXPでAirHが使えず(中央図書館にいた)、今朝方
ようやく試せるところに来た。
で、モデムによるネットワークの設定を追加し、
WinXP(購入当初軽く接続試験しただけ)でも使えるようにする。
おっと、素でグローバルに繋ぐのは危ない。
買ってインストールすべきものを入れていない...
を拾ってきて入れた。なんとも面倒くさかった。
でtigerにもsqueakが無事インストールできた。
あと、適当にキーを突っつく。command + space で仮名漢字変換
のトグル。command + Tab は Win の alt + tab。それにしても
浮かぶモノがこのとおり、ずいぶんでかい。
「テキストエディット」のキーアサインはEmacsに似ている。
$ command $ fc command ~ ~ (ry /tmp/bash1121485041: unmodified: line 1
sshでリモートログインした時、行頭でチルダに加えてピリオドを打鍵すると、 接続を切(ら)れるとは知らなかった。 ちなみにリモートがFreeBSDでもLinuxでも同様。
これに気付いたのは、Linuxから FreeBSD-5.3 にsshで入り、さらにtip(1)
でもってFreeBSD-4.11 にシリアルコンソールで入っていた時、~.を入力する
と、元からぶち切(ら)れた時だった。
ちなみにtipは生きているので、そのままでは再接続できない。
さて、何をどういじって回避したものか。さしあたりは kermitで足りるが。
CygwinによりWinにX-Windowを実現するLiveCDだそうである。
まだ落としただけなので、これだけ。結構古いな。
# mount -o loop xlivecd-20041201.iso temp # ls -l temp 合計 65 -r-xr-xr-x 1 root root 223 2004-08-24 05:52 AUTORUN.INF* -r-xr-xr-x 1 root root 52 2004-12-01 21:28 STAMP* -r-xr-xr-x 1 root root 2998 2004-08-19 04:42 X.bat* dr-xr-xr-x 1 root root 26624 2004-11-18 06:35 bin/ -r-xr-xr-x 1 root root 491 2004-04-02 22:51 cygmin.ini* -r-xr-xr-x 1 root root 7022 2004-11-16 22:41 cygwin.ico* dr-xr-xr-x 1 root root 2048 2004-12-01 21:25 etc/ dr-xr-xr-x 1 root root 2048 2004-12-01 21:25 home/ -r-xr-xr-x 1 root root 6681 2004-11-22 23:36 index.html* dr-xr-xr-x 1 root root 4096 2004-11-18 06:56 lib/ dr-xr-xr-x 1 root root 2048 2004-12-01 21:25 livecd/ -r-xr-xr-x 1 root root 4159 2004-08-20 04:30 run.bat* dr-xr-xr-x 1 root root 2048 2004-12-01 21:25 tmp/ dr-xr-xr-x 1 root root 2048 2004-11-16 22:38 usr/ dr-xr-xr-x 1 root root 2048 2004-02-07 05:28 var/
厳密には「liveCD」ではあるまい(起動できない)。
あまりアプリケーションがないので、このくらい。
どっかからXアプリケーションを実行して
こっちに描画すればいいんだろうけど。
xwdのキャプチャとPrintScreenキーのスクリーンショット
を並べてみた。
xwdではXのアプリケーションしか撮れなかった。ちょっと寂しい。
まずfuse(Filesystem in Userspace)-2.5.3のmake install。
にldconfig -v。
こちらもこちらで面白そうだが、後回し。
ntfs-3gのアーカイブは、"ntfs-3g-20070714-BETA.tgz" だった。これも解包してmake install。
マウントにはntfs-3g(8)を用いる。READMEなどで例示してある通りにやってみる。
# ntfs-3g /dev/hda1 /mnt/win # mount | grep win /dev/fuse on /mnt/win type fuse (rw,nosuid,nodev,\ noatime,default_permissions,allow_other) # umount # grep ntfs /var/log/messages Jul 16 21:46:03 HOST ntfs-3g[17263]: Version 2006-07-14-BETA Jul 16 21:46:03 HOST ntfs-3g[17263]: Mounted /dev/hda1 (Read-Write, label "", NTFS 3.1) Jul 16 21:55:47 HOST ntfs-3g[17263]: Unmounting /dev/hda1 ()
書き込みがなにげにできてしまうことは確認できた。
さて、ちゃんと動くかどうか。久々に
WinXP起動してみたが、なんとも邪魔臭かったし。
屑部録は wordpress-2.0.6で放置していたが、2.0.10にあげる。 それぞれの差分をとって、前バージョンのバックアップを取り、上書きし、ブラウザで アクセス(一応の動作と <meta name="generator" content="WordPress ME2.0.x" /> を確認)、を繰り返す。
$ ls -l me*.zip -rw-r--r-- 1 $USER $GROUP 688387 2007-01-08 00:45 me205-to-206.zip -rw-r--r-- 1 $USER $GROUP 49419 2007-01-16 17:36 me206-to-207.zip -rw-r--r-- 1 $USER $GROUP 524949 2007-02-22 21:49 me207-to-208.zip -rw-r--r-- 1 $USER $GROUP 184792 2007-02-22 21:49 me208-to-209.zip -rw-r--r-- 1 $USER $GROUP 629364 2007-04-04 00:19 me209-to-2010.zip
屑部録に スパム防止機構 を組み込むことを考えた。
プラグインをインストール(アーカイブをほどいてwp-content/plugins/custm-anti-spamの下にコピー、) し、管理画面を開く。「プラグイン」タブで有効にして、「管理」タブの下の 「custom-anti-spam」の項目を覗くと、
Peter's Custom Anti-Spam Anti-spam image This page will diagnose your server setup to see h\ ow it relates to the performance of this plugin. R\ emember that all actual settings for this plugin c\ an be changed under the Plugins > Plugin Editor me\ nu. If you can see an image above, the plugin shou\ ld be working correctly. Can't see the anti-spam image when you're viewing \ a comment form? Remember to log out of WordPress f\ irst -- by default, the image doesn't show to regi\ stered users (although you can edit that option in\ the plugin file). GD library The GD library is not installed. This plugin will \ not work without it. Ask your webhost to install t\ his library (or install it if you manage your own \ server). FreeType The FreeType library is not installed. The anti-sp\ am image should still display, but with only a pla\ in font. Ask your webhost to install this library \ (or install it if you manage your own server) if y\ ou want to be able to use the uploaded fonts. get_option Yay! The script should be able to automatically fi\ gure out your blog address. open_basedir Yay! open_basedir is off. The script should be abl\ e to automatically figure out the server path.
GDを入れるためにXやらlibjpegやらを入れ、GDをmake
installしてもダメ。php4を入れ直すことまで考えて、
どうせなら、と、php-4.4.7を取ってきてビルドする。
ring.asahi-netには見当たらなかった。
$ ./configure \ --with-apxs2=/usr/local/apache2/bin/apxs \ --with-mysql=/usr/local/mysql \ --with-openssl=/usr/ssl \ --enable-mbstring \ --with-zlib-dir=/usr/lib \ --with-freetype-dir=/usr/X11R6 \ --with-gd
make installして、apacheを再起動しても、やっぱりダメだった。
info.phpでGDの部分を確認する。freetype云々がない。
FreeTypeが原因かも。Xに含まれてない奴でどうかと考えた。
freetype-2.3.5を
貰ってきてビルドする。難なく(少し手間取ったが)make install。
gdのビルドもやり直す。 ./configureに --with-freetype=/usr/local/libとかつけとく。
ここでエラー。orz...
エラーメッセージを読み直し、gd再度ビルド。
./configure \ --with-freetype=/usr/local/lib \ --with-fontconfig=/usr/X11R6
でgdは入った。さらに二転三転。
ktermとrxvtと双方とも使ってるうちにどっちだったかよく迷う。
それから、リモートのEmacsは白い画面ではちょっと見づらい配色がデフォルトになっている。
殊に先ほど入れたnavi2ch(CVS)は、黒地のほうが読みやすそうだ。
つうことでrxvtはreverseVideoで。
まだ2.xの手当ては継続しているようである。
ちなみに、これを書いている時点(Wed Jul 16 09:50:57 JST 2008)
では、2.0.0.16で修正された脆弱性は、まだ
セキュリティアドバイザリには載ってなかった。
URLが変り、2.0.0.16の修正も追記されている。ので
リンクを貼り直す。
中の人も大変だ。
後記
タイトル間違えすぎ。orz
を指定してやると、HTTP/1.1 は、 すぐに正常に切断された。
$ telnet localhost 80 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. GET / HTTP/1.1 Host: localhost Connection: close HTTP/1.1 200 OK Date: Thu, 16 Jul 2009 00:25:25 GMT Server: Apache/2.2.9 (Debian) Last-Modified: Fri, 22 May 2009 10:00:52 GMT ETag: "cad3e-2d-46a7d55ee9d00" Accept-Ranges: bytes Content-Length: 45 Connection: close Content-Type: text/html <html><body><h1>It works!</h1></body></html> Connection closed by foreign host.
複数ドメインのDynamicDNSの
記述法がよくわからなかったが、認証先が同一なら、
$HOST_A, $HOST_B と一行にまとめて記述すればいいようだった。
認証先が別々なら、個別のエントリを書け、ということか。
例によってWireshark に通すと、一つのパケットに
"GET /nic/update?system=dyndns&hostname=$HOST_A,
$HOST_B&myip=$GLOBAL_IP"
などと表示されていた。
一括で更新してしまうようだ。
ログは2行出ていたけど。
ddclient[2551]: Success: updating $HOST_A: good: IP address set to $GLOBAL_IP. ddclient[2551]: Success: updating $HOST_B: good: IP address set to $GLOBAL_IP.
昨日のサーバのログから。
古いブラウザを名乗ってる奴には、bot臭いものもあった。
$ wc -l $LOG 7650 $LOG
半分近くがコメントスパマーのPOST、1/3以上がサーチエンジンのbot。
$ grep "MSIE 4" $LOG |wc -l 5 $ grep "MSIE 5" $LOG |wc -l 1 $ grep "MSIE 6" $LOG | wc -l 166 $ grep "MSIE 7" $LOG | wc -l 58 $ grep "MSIE 8" $LOG | wc -l 44
それからFirefoxも。
$ grep Firefox/3.0 $LOG |wc -l 159 $ grep Firefox/3.5 $LOG |wc -l 88 $ grep Firefox/2 $LOG |wc -l 5 $ grep Firefox/1 $LOG |wc -l 3
まあ、あまり凝った構成にはしてないのだけど。
Safari/Chrome は、また別途。
Postfix。
まずはmydestination に複数のFQDNを入れてみる。
telnet 25 でrcpt: to に両方を指定してメールを送信してみた。
Maildir に二つメールが届いた。
$ diff /var/mail/$USER/new/1247720581.V301I57fc* 2,3c2,3 < X-Original-To: user@$HOST_A < Delivered-To: user@$HOST_A --- > X-Original-To: user@$HOST_B > Delivered-To: user@$HOST_B
それから、前の設定を取り消し、user@HOST_Aとuser@HOST_B
が、違うメールボックスに届くようにする。
指定されたアドレスと、変換するアドレスを記述したルックアップテーブル
をASCIIテキストで作成し、 postmap $file。
それからmain.cfに virtual_alias_maps と virtual_alias_domains を
追記。domainsとはいってもFQDNが通る。
配送先にローカルユーザを二つ作成し、そっちにメールが届くことを確認。
そして、配送先に携帯アドレスも使ってみたが、問題なく動作した。
ローカルユーザからの送信も個別のドメインにするために、今度は ユーザ名と書き換えるメールアカウントをcanonical_maps で定義する。
書いたらこれだけだが、記述ミスなどでかなり時間を喰ってしまった。
main.cf の記述ミスは、常には指摘してくれない。分からない構文は
スルーするのだろうか。
PythonでFirefoxを操作できる、らしい。
qita などを見ながら。
debian jessie のインストールは python-pipを apt-get して、sudo pip install selenium 、らしい。
$ python Python 2.7.9 (default, Mar 1 2015, 12:57:24) [GCC 4.9.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from selenium import webdriver >>> from time import sleep >>> browser = webdriver.Firefox()
>>> sites ('www.kuzuore.com', 'news.google.com') >>> for x in sites: ... sleep(5) ... browser.get('http://' + x)
で、同じタブに次々とサイトが入れ替わる。
RaspberryPi A(メディアは同じSDカード)にて ほぼ同じであることを確認。
msieve-1.53 $ time echo 2^128+1|bc| ./msieve -m -q -v next number: Msieve v. 1.53 (SVN unknown) Sun Jul 16 08:20:32 2017 random seeds: 1e394044 60accfd4 factoring 340282366920938463463374607431768211457 (39 digits) no P-1/P+1/ECM available, skipping commencing quadratic sieve (39-digit input) using multiplier of 5 using generic 32kb sieve core sieve interval: 4 blocks of size 32768 processing polynomials in batches of 51 using a sieve bound of 6779 (478 primes) using large prime bound of 271160 (18 bits) polynomial 'A' values have 5 factors restarting with 327 full and 2927 partial relations 871 relations (327 full + 544 combined from 2927 partial), need 574 sieving complete, commencing postprocessing begin with 3254 relations reduce to 1303 relations in 2 passes attempting to read 1303 relations recovered 1303 relations recovered 128 polynomials attempting to build 871 cycles found 871 cycles in 1 passes distribution of cycle lengths: length 1 : 327 length 2 : 544 largest cycle: 2 relations matrix is 478 x 871 (0.1 MB) with weight 17075 (19.60/col) sparse part has weight 17075 (19.60/col) filtering completed in 3 passes matrix is 462 x 526 (0.0 MB) with weight 8676 (16.49/col) sparse part has weight 8676 (16.49/col) commencing Lanczos iteration memory use: 0.0 MB lanczos halted after 9 iterations (dim = 459) recovered 63 nontrivial dependencies p17 factor: 59649589127497217 p22 factor: 5704689200685129054721 elapsed time 00:00:01 next number: real 0m1.173s user 0m0.950s sys 0m0.110s
msieveのビルド時に make all ECM=1 する。
$ ldd msieve /usr/lib/arm-linux-gnueabihf/libarmmem.so (0xb6f26000) libecm.so.1 => /usr/lib/arm-linux-gnueabihf/libecm.so.1 (0xb6e9e000) libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0xb6e8b000) libz.so.1 => /lib/arm-linux-gnueabihf/libz.so.1 (0xb6e64000) libgmp.so.10 => /usr/lib/arm-linux-gnueabihf/libgmp.so.10 (0xb6df1000) libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xb6d72000) libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0xb6d49000) libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6c0a000) librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0xb6bf3000) /lib/ld-linux-armhf.so.3 (0x7f581000)
なんか色々違ってるようだけど、検証は後で。
$ apt-cache search make | awk '$1~/make$/{print $1}' automake bmake pmake cbp2make cmake colormake debmake dh-make gnustep-make icmake latex-make make mmake omake polymake qt4-qmake qt5-qmake remake python-rosmake snakemake
awkはすぐ忘れる。
USB2.0のHDDから、128GBのディスクイメージをサイズぴったりのSSDに 書き込んでみた。エラーは出なかった。
全体よりも、先頭100秒間の方が面白い グラフになったかも。
ここまで
Return-Path: <w******@g**********.com> X-Original-To: $ACCOUNT@$HOST Delivered-To: $ACCOUNT@$HOST Received: from 155.197.189.179.novanetnp.net.br (unknown [179.189.197.155]) by $SMTP_SERVER (Postfix) with SMTP id 19D37400A4 for <$ACCOUNT@$HOST>; Fri, 16 Jul 2021 04:13:08 +0900 (JST) From: "R**** G*****" <w******@g*********.com> To: <y******@q*********.com> Subject: Investment opportunity Date: Thu, 15 Jul 2021 14:12:07 -0500
From: の名前で検索するといくつか。有名人を詐称している模様。
To: のアドレスで検索しても何もなし。
でも、SMTPのログは確かにこちら向けであった。
Jul 16 04:13:05 $SMTP_SERVER postfix/smtpd[28036]: warning: hostname 155.197.189.179.novanetnp.net.br does not resolve to address 179.189.197.155: Name or service not known Jul 16 04:13:05 $SMTP_SERVER postfix/smtpd[28036]: connect from unknown[179.189.197.155] Jul 16 04:13:09 $SMTP_SERVER postfix/smtpd[28036]: 19D37400A4: client=unknown[179.189.197.155] Jul 16 04:13:13 $SMTP_SERVER postfix/cleanup[28041]: 19D37400A4: message-id=<> Jul 16 04:13:13 $SMTP_SERVER postfix/qmgr[27323]: 19D37400A4: from=<w******@g**********.com>, size=1836, nrcpt=1 (queue active) Jul 16 04:13:13 $SMTP_SERVER postfix/virtual[28042]: 19D37400A4: to=<$ACCOUNT@$HOST>, relay=virtual, delay=5.8, delays=5.8/0.01/0/0, dsn=2.0.0, status=sent (delivered to maildir) Jul 16 04:13:13 $SMTP_SERVER postfix/qmgr[27323]: 19D37400A4: removed
怪しげなホスト名とか、もう少し締めようか。
リンクはご自由にどうぞ。でもURLや内容が変った場合はあしからず。