These pages are written by only Japanese.
|
Namazu for hns による簡易全文検索です。 詳細は 詳細指定/ヘルプをご参照下さい。 |
||||||||||||||||||||||||||||||||||||||||||||
awm.jp:~/swfed-0.29% swfdump a+b.swf [HEADER] File version: 4 [HEADER] File size: 511 [HEADER] Frame rate: 12.000000 [HEADER] Frame count: 1 [HEADER] Movie width: 240.00 [HEADER] Movie height: 240.00 [009] 3 SETBACKGROUNDCOLOR (ff/ff/ff) [002] 220 DEFINESHAPE defines id 0001 [027] 4 DEFINESPRITE defines id 0002 [01a] 6 PLACEOBJECT2 places id 0001 at depth 0001nbits =0, line=866 [001] 0 SHOWFRAME 1 (00:00:00,000) [000] 0 END [01a] 9 PLACEOBJECT2 places id 0002 at depth 0001nbits =10, line=866 [002] 206 DEFINESHAPE defines id 0003 [01a] 9 PLACEOBJECT2 places id 0003 at depth 0003nbits =11, line=866 [001] 0 SHOWFRAME 1 (00:00:00,000) [000] 0 ENDDEFINESHAPE(ベクター情報のタグ) は id 0001 id 0003 の2つある事が分かります。
awm.jp:~/swfed-0.29% php ./swfgetshapedata.php a+b.swf 1 > 1.shape awm.jp:~/swfed-0.29% php ./swfreplaceshapedata.php a+b.swf 3 1.shape > 3.swf
C言語クイズint a=1;func(a);printf("%d,a");void func(int x)内のコードを書いて、 このprintfで2を表示させるのじゃ。printfの書き換えは禁止で、各自の環境で動けば正解どうという事もなく。
#include <stdio.h> void func(int x) { *(&x + 8) = 2; } int main(void) { int a=1; func(a); printf("a=%d\n", a); }
awm.jp:~/prog/c% ./a.out a=2Intel 32bit Linux マシンで試しました。別の環境だと + 8 を変えないとダメかも。
void func(int x) { printf("&x=%p\n", &x); } int main(void) { int a=1; func(a); printf("&a=%p\n", &a); }
awm.jp:~/prog/c$ ./a.out x=0xbf9e7350 a=0xbf9e7370a の方が 0x20 大きい。32bit 機なら int は 4byte なので 0x20/4 = 8
*(&x + 8)で、a 相当のアドレスの場所を書き換えられる。
awm.jp:~/IO_SWF% swfdump bloxorz.swf | grep "File size" [HEADER] File size: 3166474
awm.jp:~/IO_SWF%php sample/swfdeformeshape.php bloxorz.swf 0 > t-0.swf awm.jp:~/IO_SWF% swfdump t-0.swf | grep "File size" [HEADER] File size: 3166369100byte も変わりませんが。
awm.jp:~/IO_SWF%php sample/swfdeformeshape.php bloxorz.swf 100 > t-100.swf awm.jp:~/IO_SWF% swfdump t-100.swf | grep "File size" [HEADER] File size: 3160652|<
awm.jp:~/IO_SWF%php sample/swfdeformeshape.php bloxorz.swf 1000 > t-1000.swf awm.jp:~/IO_SWF% swfdump t-1000.swf | grep "File size" [HEADER] File size: 3157203
awm.jp:~/IO_SWF%php sample/swfdeformeshape.php bloxorz.swf 10000 > t-10000.swf awm.jp:~/IO_SWF% swfdump t-10000.swf | grep "File size" [HEADER] File size: 3151985
awm.jp:~/IO_SWF% swfdump bloxorz.swf | grep "File size" [HEADER] File size: 3166474 awm.jp:~/IO_SWF% php sample/swfdeformeshape.php bloxorz.swf 1000 > t2-1000.swf awm.jp:~/IO_SWF% swfdump t2-1000.swf | grep "File size" [HEADER] File size: 3164687サイズは、あまり減らないけど。
awm.jp:~# vi /etc/spamassassin/local.cf # 2011/02/05 added bayes_ignore_header X-Bogosity bayes_ignore_header X-Spam-Flag bayes_ignore_header X-Spam-Status bayes_ignore_header X-Spam-Report bayes_ignore_header X-Spam-Checker-Version bayes_ignore_header X-Becky-Status bayes_ignore_header X-Virus-Scanned bayes_ignore_header Delivered-To bayes_ignore_header X-Original-To
awm.jp:~# /etc/init.d/spamassassin stop Stopping SpamAssassin Mail Filter Daemon: spamd. awm.jp:~# /etc/init.d/spamassassin start Starting SpamAssassin Mail Filter Daemon: spamd.
awm.jp:~% sa-learn --clear awm.jp:~% sa-learn --spam --mbox _SPAM awm.jp:~% sa-learn --ham --mbox 20??
awm.jp:~# pecl install channel://pecl.php.net/vld-0.10.1 <略> Build process completed successfully Installing '/usr/lib/php5/20060613+lfs/vld.so' install ok: channel://pecl.php.net/vld-0.10.1 configuration option "php_ini" is not set to php.ini location You should add "extension=vld.so" to php.ini/PRE
php -dvld.active=1 -dvld.execute=0 -f test.php <略> line # * op fetch ext return operands --------------------------------------------------------------------------------- 5 0 > EXT_NOP 7 1 EXT_STMT 2 ASSIGN !0, '332700380566123' 8 3 EXT_STMT 4 CAST ~1 !0 5 > RETURN ~1 9 6* EXT_STMT 7* RETURN null 8* > ZEND_HANDLE_EXCEPTION branch: # 0; line: 5- 9; sop: 0; eop: 8 path #1: 0, End of function foo.これは楽ですね。
/* * getTransparentIndex */ int getTransparentIndex(SavedImage Image) { int i; unsigned char transparent_index = -1; // ☆チェキ☆ if ((Image.ExtensionBlockCount == 0) || (Image.ExtensionBlocks == NULL)) { return -1; // ☆ GIF97a は大丈夫 ☆ } for (i = 0 ; i < Image.ExtensionBlockCount ; i++ ) { if (<透明色情報が見つかったら>) { transparent_index = <透明色インデックス> return transparent_index; } } return transparent_index; // ☆ -1 でなく 255 が返ります。。☆ }!||!○| ̄|_