#!/usr/bin/perl
$buffer=$ENV{'QUERY_STRING'};
@pairs = split(/&/,$buffer);
foreach $pair ($paris)
{
($name, $value) = split(/=/,$pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg;
$FORM{$name} = $value;
}
print("Content-type: text/plain\n\n");
print `finger $FORM{"user"}`;
서버단에서 실행하면,
root@www ~ [0.00 0.00]> perl test.pl
Content-type: text/plain
Login Name Tty Idle Login Time Office Office Phone Host
xxxxx pts/3 Dec 13 10:08 (x.x.xx)
'서버관리' 카테고리의 다른 글
불법 접근 차단하기 (0) | 2012.12.13 |
---|---|
Adaptec Raid Controller Build options (0) | 2012.12.13 |
취약한 cgi 프로그램 perl 예시 (0) | 2012.12.13 |
아파치 모듈 확인하기 (0) | 2012.12.12 |
로그 파일에 대해 (0) | 2012.12.12 |
어떤 데몬과 연결되어 있는지 확인하기 (0) | 2012.12.12 |
WRITTEN BY
- 김병국
유용했던 자료를 기록해 두었습니다. 도움이 되시길~~~ Welcome! I started this blog as a way to give back to all of the other system administrators who have taught me something in the past. Writing these posts brings me a lot of enjoyment and I hope you fun
받은 트랙백이 없고
,
댓글이 없습니다.