トップ 最新 追記

けんのぼやき

過去のぽやき
ここは個人的なメモ的日記です。よく間違えていて、放置したりしているので要注意。typo多し。というかダメ杉なんで。
記載内容でクレームがある場合はメールください。(tDiary.Netのクレーム対応方針について)

 

  • 20 現状確認





2001-11-19

1 はてなスタイル

をちょっとだけ使ってみました。

ほげげ

*ふげ
むむ

で書き出すと「ほげげ」と「*ふげ]の間の改行がプレビューの時や更新時に増加してるかも。

2 機能

ふとhatenaスタイルの*t*機能とか簡単に書ける脚注がちょっといいかなぁと思った。でも、どうしても必要というわけではないところがポイントかな(^^;;;;

スタイルをかえるとその日のスタイル属性が確定してしまうので困るけど、どうしても困っちゃうというワケではない(^^;;; tDiaryは削除しない方針であるので仕方がないかなぁ。

お名前 : コメント :


2001-11-23

1 昔のメモ。

2001年07月08日(日) 01:05:09,2001年07月08日(日),Windowsでsnort+ACID,snortインストールメモ(Windows2000+Apache+PHP+MySQL+snort+ACID)
 ※SSLまではやってまへん。。。
 ※使用しているcgiのバグで半角英数字を使うべきところで全角使ったりしてます(汗



 [参考にさせていただいた所]
  Snort & Windows 2000      http://www.snort.org/Files/snort-w2k.pdf
  NT Security-Snort       http://www.port139.co.jp/ntsec_snort.htm
  みっきーのネットワーク研究所  http://www.hawkeye.ac/micky/
  snortの設定          http://www.hamster.ne.jp/~osa/memo/snort/
  academic office        http://www.office.ac/index-j.html
  PHPインストール        http://www.php.net/manual/ja/install-windows.php

 必要なモノ
  Apache      http://httpd.apache.org/dist/httpd/binaries/win32/
  PHP       http://www.php.net/downloads.php
  MySQL      http://www.softagency.co.jp/MySQL/downloads/index.html
  snort (MySQL版) http://www.snort.org/snort-files.htm
  snort (tar玉)  http://www.snort.org/snort-files.htm
  snort rule    http://www.snort.org/snort-files.htm#Rules
  snort rule    http://whitehats.com/ids/index.html
  ACID       http://www.cert.org/kb/acid/
  ADODB      http://php.weblogs.com/adodb
  WinPcap     http://netgroup-serv.polito.it/winpcap/

 知っていると便利なこと
  (1)コマンド プロンプト (Cmd.exe) の自動補完を有効にする方法
    http://www.microsoft.com/japan/support/kb/articles/JP244/4/07.htm
    ※HKEY_CURRENT_USER\Software\Microsoft\Command Processor の CompletionChar の値を 9 にする

  (2)PATHの追加方法
    1.マイコンピュータのプロパティ
    2.詳細のタブ
    3.環境変数のボタンクリック
    4.PATHがなければ新規、あれば追加
    5.変数名 PATH 変数値 %PATH%;C:PHP;C:\MySQL






 1. WinPcap2.1をインストール
  ※exeファイルを実行するだけ


 2. snort1.7を好きな場所にインストール
  ※アーカイブを解凍し移動するだけ
  (1) ダウンロードしたルールセットをsnortをインストールしたフォルダへ
    ※***-libのファイルは不要になる
  (2) snort.conf(05/21/2001)の編集
     a)Step #1: Set the network variables:
      ・ 42|var HOME_NET 192.168.0.0/24
      ・ 66|var DNS_SERVERS 192.168.0.1
     b)Step #2: Configure preprocessors
      ・ 82|preprocessor minfrag: 128
          ↑---------------たぶん128byte以下をって感じかな。#を外す。
      ※137|preprocessor portscan-ignorehosts: $DNS_SERVERS
          ↑---------------たぶんポートスキャンを捕捉するするときの除外ホスト。
     c)Step #3: Configure output plugins
      ・239|output database: log mysql user=snort dbname=snort host=localhost
     d)Step #4: Customize your rule set
      ※ルールを追加するときは include ***.rules を追加するみたいな
      ※www.snort.org で手に入れた最新の snort.conf に x11.rules が抜けていたりする
  (3) snort-1.7.tar.gz の contrib フォルダにある create_mysql を例えば \mysql\bin にコピー
  (4) snortのフォルダ内に log と言う名のフォルダを作成
    ※別の名前でもよいが、その時はsnort起動時にオプションで指定する必要がある



 3. MySQL3.23.39-ntを好きな場所にインストール
  ※Setup Type は Typical を選択



 4. winmysqladmin.exe を実行
  ※ \mysql\bin 配下にある
  (1) UsernameとPasswordを設定
  (2) タスクトレイに新たなアイコン
  (3) アイコンを右クリック show me で各種設定画面
  (4) my.ini Setup タブの左下にある Create ShortCut on Start Menu をクリック
    ※スタートメニューのスタートアップフォルダにショートカット作成
  (5) Databases タブの左上にある Databeses の上で右クリック Create Database を選択
  (6) Database Name を snort とし Create the Database ボタンをクリック
  (7) タスクトレイに戻すには右上のアイコンサイズのアイコンの上で右クリック Hide me を選択



 5. cmd.exe を起動し \mysql\bin\mysql.exe を実行
   Welcome to the MySQL monitor.  Commands end with ; or \g.
   Your MySQL connection id is 5 to server version: 3.23.39-nt
   
   Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
   
   mysql>
  のようなメッセージが表示



 6. 次のようにタイプ
   mysql> ¥u mysql;
   Database changed
   mysql>



 7. 次のようにタイプ
   mysql> grant INSERTSELECTCREATEDELETE on snort.* to snort@localhost;
   Query OK 0 rows affected (0.03 sec)
   
   mysql>
  ときとして時間は変わる…



 8. ¥q で mysql モードを終了



 9. 次のようにタイプ
   \mysql\bin>mysql.exe -u snort snort < create_mysql
  ※2-(3) でコピーしたファイルを使用している



10. snortの起動テスト 次のようにタイプ
   \snort\snort.exe -c snort.conf

               (省略)
       --== Initialization Complete ==--
   
   -> Snort! <-
   Version 1.7-MySQL-WIN32
   By Martin Roesch (roesch@clark.net www.snort.org)
   WIN32 Port By Michael Davis (mike@datanerds.net www.datanerds.net/~mike)
  という感じだと起動していると思う(汗



11. 試しに HOME_NET のどこかへ ping でも打ち込む



12. log フォルダに alert.ids ができていて、中を見ると
   [**] ICMP Echo Request Windows [**]
   07/07-21:15:11.490490 192.168.0.3 -> 192.168.0.2
   ICMP TTL:32 TOS:0x0 ID:32279 IpLen:20 DgmLen:60
   Type:8  Code:0  ID:512   Seq:256  ECHO
  といった具合になっていたら動作していると思われる



13. ちなみに MySQL の方にある Databases タブの snort の Database を見ると
  ちゃんとデータが蓄えられてるのが分かる感じ



14. Apache1.3.20 を好きな場所にインストール
   ※一応の動作確認は http://127.0.0.1/ をやってみたり
   ※ドキュメントは http://127.0.0.1/manual/index.html で読めたりする



15. PHP4.0.6 を好きな場所にインストール
   ※Apacheを一旦停止させる(管理ツールのサービス等で)

   (1)httpd.conf に追加
      ScriptAlias /php/ "C:/php/"
      LoadModule php4_module c:/php/sapi/php4apache.dll
      Action application/x-httpd-php "/php/php.exe"
      AddType application/x-httpd-php .php

   (2)php.ini の編集
    ・php.ini-dist ファイルをコピーして php.ini を作成
     ・314行目付近の include_path = を設定 (PHPのインストール場所)
     ・324行目付近の extension_dir = を設定 (PHPのインストール場所)

   (3)php4ts.dll を %system%system32 へコピー
   (4)php.ini-dist を %system% へ php.ini に名前を変えてコピー
     ※PATH= を通しておけばどこでもいいのだろう
      (セキュリティ上は違うとこがいいのかなぁ?よくわからん。(爆 )

   (5)動作確認 下記内容の test.php ファイルでも作成
     <html><head></head><body><?php print ("PHPの動作確認"); ?></body></html>

     ※ブラウザで test.php を開いて "PHPの動作確認" って表示されたらちゃんと動いているらしい
      ソースを見ると <html><head></head><body>PHPの動作確認</body></html> ってな感じだろう



16. ADODB 1.12 を 好きな場所にコピー



17. ACID 0.9.6b9 を Apache のユーザディレクトリにACIDでも作ってコピー



18. acid_conf.php の編集
  (1) $DBlib_path = を ADODB をインストールしたディレクトリを指定
  (2) 下記を具合のいいように設定(汗
     $alert_dbname   = "snort";
     $alert_host     = "localhost";
     $alert_port     = "";
     $alert_user     = "***";
     $alert_password = "***";



19. http://localhost/~acid/ を開いてみると Warning: が出てると思われる
  下の方に Setup page へのリンクあるので移動する



20. ACID Setup の画面で Create ACID AG なるボタンがあるので押す
   Successfully created 'acid_ag'
   Successfully created 'acid_ag_alert'
   Successfully created 'acid_ip_cache'
  ってなメッセージがでるはず
  ※acid_common.php の function RegisterGlobalState() が働いてくれない(謎
   いいのかぁ… 別途検討の必要あり(涙



不満も残るがいったん完了
,,,,,,,

お名前 : コメント :



2001-11-25 Bookmarklet

1 Bookmarklet

  • Message を数値文字参照に変換する bookmarklet (orkut)
javascript:z=document.f;s=z.textboxSubject;s.value=h(s);b=z.textboxBody;b.value=h(b);void(0);function%20h(e){x=e.value;y=%22%22;for(n=0;n<x.length;n++)y+=(%22&#%22+(x.charCodeAt(n))+%22;%22);return(y);}
  • HTTP応答ヘッダを表示するWinIE専用のbookmarklet
javascript:(function(){var d=document;var o=new ActiveXObject("Microsoft.XMLHTTP");o.open("HEAD",d.URL,false);o.send();d.body.innerText=o.Status+" "+o.StatusText+"\n"+o.GetAllResponseHeaders();focus();})();

スターダストさん

  • CSSブロック表示
javascript:(function()%7Bvar%20newSS;newSS=document.getElementById('codepoetry-debug-stylesheet');if(newSS)%7BnewSS.href=null;document.documentElement.childNodes%5B0%5D.removeChild(newSS);%7D%20else%20%7BnewSS=document.createElement('link');newSS.rel='stylesheet';newSS.type='text/css';newSS.href='http://www.stylesheet-stylebook.com/stuff/css-debug-2.css';newSS.id='codepoetry-debug-stylesheet';document.documentElement.childNodes%5B0%5D.appendChild(newSS);%7D%7D)()

Stylesheet Stylebookより

  • アドレス偽装有無の確認
javascript:alert("The real URL is: " + location.protocol + "//" + location.hostname + "/" + "\nThe address URL is: " + location.href + "\n" + "If the server names do not match, this may be a spoof.");

2 CSSブロック表示で使用するスタイルシート

html:after
{
	content: "RED: SPAN/ID; YELLOW: SPAN/CLASS; ORANGE: DIV/ID; BLUE: DIV/CLASS; TABLE/CLASS: GREEN; TABLE/ID: LIGHT BLUE";
	background: rgba(255,255,255,0.5);
	color: black;
	font-family: monospace;
}

div, span, img
{
	outline: 1px solid black;
	-moz-outline: 1px solid black;
}

[name]:before
{
	content: 'NAME: \'' attr(name) '\'';
	outline: 1px solid black;
	-moz-outline: 1px solid black;
	background: rgba(255,255,255,0.1);
	color: black;
	text-align: left;
	text-transform: none;
	text-decoration: none;
	white-space: normal;
	font-family: sans-serif;
	font-size: small;
	font-style: normal;
	font-variant: normal;
	font-weight: normal;
}

span[id]:before
{
	content: 'ID: \'' attr(id) '\'';
	outline: 1px solid black;
	-moz-outline: 1px solid black;
	background: red;
	color: black;
	text-align: left;
	text-transform: none;
	text-decoration: none;
	white-space: normal;
	font-family: sans-serif;
	font-size: small;
	font-style: normal;
	font-variant: normal;
	font-weight: normal;
}

span[id]
{
	outline: 1px solid red;
	-moz-outline: 1px solid red;
	background: rgba(255,0,0,0.1);
}

span[class]:before
{
	content: 'CLASS: \'' attr(class) '\'';
	outline: 1px solid black;
	-moz-outline: 1px solid black;
	background: yellow;
	color: black;
	text-align: left;
	text-transform: none;
	text-decoration: none;
	white-space: normal;
	font-family: sans-serif;
	font-size: small;
	font-style: normal;
	font-variant: normal;
	font-weight: normal;
}

span[class]
{
	outline: 1px solid yellow;
	-moz-outline: 1px solid yellow;
	background: rgba(255,255,0,0.1);
}

div[id]:before
{
	content: 'ID: \'' attr(id) '\'';
	outline: 1px solid black;
	-moz-outline: 1px solid black;
	background: orange;
	color: black;
	text-align: left;
	text-transform: none;
	text-decoration: none;
	white-space: normal;
	font-family: sans-serif;
	font-size: small;
	font-style: normal;
	font-variant: normal;
	font-weight: normal;
}

div[id]
{
	outline: 1px solid orange;
	-moz-outline: 1px solid orange;
	background: rgba(255,128,0,0.1);
}

div[class]:before
{
	content: 'CLASS: \'' attr(class) '\'';
	outline: 1px solid black;
	-moz-outline: 1px solid black;
	background: blue;
	color: white;
	text-align: left;
	text-transform: none;
	text-decoration: none;
	font-family: sans-serif;
	font-size: small;
	font-style: normal;
	font-variant: normal;
	font-weight: normal;
}

div[class]
{
	outline: 1px solid blue;
	-moz-outline: 1px solid blue;
	background: rgba(0,0,255,0.1);
}

table[class]:before, TR[class]:before, TD[class]:before
{
	content: 'CLASS: \'' attr(class) '\'';
	outline: 1px solid black;
	-moz-outline: 1px solid black;
	background: #6F6;
	color: black;
	text-align: left;
	text-transform: none;
	text-decoration: none;
	white-space: normal;
	font-family: sans-serif;
	font-size: small;
	font-style: normal;
	font-variant: normal;
	font-weight: normal;
}

table[class], tr[class], td[class]
{
	background: rgba(100, 255, 100, 0.1);
	outline: 1px solid #6F6;
	-moz-outline: 1px solid #6F6;
}

table[id]:before, tr[id]:before, td[id]:before
{
	content: 'ID: \'' attr(id) '\'';
	outline: 1px solid black;
	-moz-outline: 1px solid black;
	background: #66F;
	color: black;
	text-align: left;
	text-transform: none;
	text-decoration: none;
	white-space: normal;
	font-family: sans-serif;
	font-size: small;
	font-style: normal;
	font-variant: normal;
	font-weight: normal;
}

table[id], tr[id], td[id]
{
	background: rgba(100, 100, 255, 0.1);
	outline: 1px solid #66F;
	-moz-outline: 1px solid #66F;
}

h1:before
{
	content: "H1";
	outline: 1px solid black;
	-moz-outline: 1px solid black;
	background: rgba(255,255,255,0.1);
	color: black;
	text-align: left;
	text-transform: none;
	text-decoration: none;
	white-space: normal;
	font-family: sans-serif;
	font-size: small;
	font-style: normal;
	font-variant: normal;
	font-weight: normal;
}

h1
{
	outline: 1px solid black;
	-moz-outline: 1px solid black;
}

h2:before
{
	content: "H2";
	outline: 1px solid black;
	-moz-outline: 1px solid black;
	background: rgba(255,255,255,0.1);
	color: black;
	text-align: left;
	text-transform: none;
	text-decoration: none;
	white-space: normal;
	font-family: sans-serif;
	font-size: small;
	font-style: normal;
	font-variant: normal;
	font-weight: normal;
}

h2
{
	outline: 1px solid black;
	-moz-outline: 1px solid black;
}

h3:before
{
	content: "H3";
	outline: 1px solid black;
	-moz-outline: 1px solid black;
	background: rgba(255,255,255,0.1);
	color: black;
	text-align: left;
	text-transform: none;
	text-decoration: none;
	white-space: normal;
	font-family: sans-serif;
	font-size: small;
	font-style: normal;
	font-variant: normal;
	font-weight: normal;
}

h3
{
	outline: 1px solid black;
	-moz-outline: 1px solid black;
}

h4:before
{
	content: "H4";
	outline: 1px solid black;
	-moz-outline: 1px solid black;
	background: rgba(255,255,255,0.1);
	color: black;
	text-align: left;
	text-transform: none;
	text-decoration: none;
	white-space: normal;
	font-family: sans-serif;
	font-size: small;
	font-style: normal;
	font-variant: normal;
	font-weight: normal;
}

h4
{
	outline: 1px solid black;
	-moz-outline: 1px solid black;
}

h5:before
{
	content: "H5";
	outline: 1px solid black;
	-moz-outline: 1px solid black;
	background: rgba(255,255,255,0.1);
	color: black;
	text-align: left;
	text-transform: none;
	text-decoration: none;
	white-space: normal;
	font-family: sans-serif;
	font-size: small;
	font-style: normal;
	font-variant: normal;
	font-weight: normal;
}

h5
{
	outline: 1px solid black;
	-moz-outline: 1px solid black;
}

h6:before
{
	content: "H6";
	outline: 1px solid black;
	-moz-outline: 1px solid black;
	background: rgba(255,255,255,0.1);
	color: black;
	text-align: left;
	text-transform: none;
	text-decoration: none;
	white-space: normal;
	font-family: sans-serif;
	font-size: small;
	font-style: normal;
	font-variant: normal;
	font-weight: normal;
}

h6
{
	outline: 1px solid black;
	-moz-outline: 1px solid black;
}

お名前 : コメント :


2001-11-26 wikiスタイルの実験用

1 [link] テスト1

書き出し

  • リスト1
  • リスト2

2 テスト2

<br>の機能はない 改行で改行されない

改行させる方法
http://sho.tdiary.net/20040120.html#p04

空行で<p> つまるところ別段落

google.comで検索

テーブルは調整しないと前につまる

項目1-1項目1-2項目1-3
項目2-1項目2-2項目2-3

箇条書きと自動リンク

空きスペース確認用の箇条書き終了

<pre>
</pre>
<pre>
</pre>

取消線

強調em

強調strong

blockquote

定義リスト
こんな具合

お名前 : コメント :


2001-11-27 isbn_imageのテキストまわりこみテスト

1 テスト1

ああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああ
<%=isbn_image_right "4757302126" %>あああ…

2 テスト2

ああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああ
<%=isbn_image_left "4757302126" %>あああ…

3 テスト3

4757302126 ああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああ

<%=isbn_image "4757302126" %>あああ…

4 テスト4

ああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああ

<div style="float:left"><%=isbn_image "4757302126" %></div>あああ…

5 テスト5

会社を辞めずに億万長者! ああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああ

<%=isbn_image "4757302126","会社を辞めずに億万長者!" %>あああ…

6 テスト6

ああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああああ

<div style="float:left"><%=isbn_image "4757302126","会社を辞めずに億万長者!" %></div>あああ…

7 wikiスタイル

{{isbn_image('4757302126','会社を辞めずに億万長者!')}}

8 表示例

上記表示例は画像を小さくした場合です。

お名前 : コメント :


2001-11-28

1 めも

http://wiki.fdiary.net/about/?advertisement

お名前 : コメント :


2001-11-30

1 tDiary設置

xrea.comへ設置にあたり参考にさせていただいた場所

* http://znz.s1.xrea.com/t/?date=20010909#p02

* http://ntt.s1.xrea.com/tdiary/?date=20010831#p03

[2001/12/6 追記]

tDiaryの本文にeRuby使いたい

tDiary ちょっとメモ

ツッコミにメールアドレスを表示させる

namazuの設置系

 namazuをさくらねっとに

 

 検索機能の付け方

  

 Namazu の tdiaryフィルタをでっちあげてみる

 

2 シンボリックリンク

知人にも利用できるように

tDiary TIPS (複数の日記を運営したいのですが)

http://www.spc.gr.jp/tdiary/tips.html#diary_server

を利用しようとしたがうまくいかない。

時間がもったいないないので複数tDiaryを入れることにした。

3 xrea.comで作るホームページ

[12/1追記]

参考になるページ

▽XREA-FAQ 私設応援団 

 http://supporter.s1.xrea.com/

▽XREAのCGIに関するメモ

 http://sci.s1.xrea.com/xreacgi/

▽XREA SUPPORT BOARD

 http://sb.xrea.com/

お名前 : コメント :






2001|11|12|
2002|01|02|03|04|05|06|07|08|09|10|11|12|
2003|01|02|03|04|05|06|07|08|09|10|11|12|
2004|01|02|03|04|05|06|07|08|09|10|11|12|
2005|01|02|03|04|05|06|07|08|09|11|12|
2006|01|03|


トップ 最新 追記