WWW::Mechanizeのmech-dump
http://digit.que.ne.jp/visit/index.cgi?2003%c7%af12%b7%ee#i7のエントリーを読んで衝撃を受けた。
WWW::Mechanizeに同梱されているmech-dumpで、フォームの調査が簡単にできてしまう。
mech-dumpなんてコマンドあったんですね、便利すぎてびっくりした!!
mech-dump [URL]で実行
$ mech-dump http://google.com/ GET http://www.google.co.jp/search [f] hl=ja (hidden readonly) ie=Shift_JIS (hidden readonly) q= (text) btnG=Google ???? (submit) btnI=I'm Feeling Lucky (submit) lr= (radio) [*|lang_ja]
mech-dump --helpでヘルプ
$ mech-dump --help Usage: mech-dump [options] [file|url] Options: --forms Dump table of forms (default action) --links Dump table of links --images Dump table of images --all Dump all three of the above, in that order --user=user Set the username --password=pass Set the password --agent=agent Specify the UserAgent to pass --agent-alias=alias Specify the alias for the UserAgent to pass. Pick one of: * Windows IE 6 * Windows Mozilla * Mac Safari * Mac Mozilla * Linux Mozilla * Linux Konqueror --absolute Show URLs as absolute, even if relative in the page --help Show this message The order of the options specified is relevant. Repeated options get repeated dumps.
perldoc
ZIGOROuさんのエントリー