­
­
HoguInside & ㅁ ㅇ ㄷ nail: LANGUAGE

IT. POST LIST

POST ALL LABEL

PYTHON3 SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xc0 in position 7: invalid start byte 한글 인식

By 때찌때찌맴매 - 3월 21, 2018
** PYTHON3 SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xc0 in position 7: invalid start byte  한글 인식 * python2 에서 한글 내용의 파일을 실행시 발행 에러. PYTHON 2.X [ 장애 ] [root@localhost 02:57:26:/home/python]# python2 te.py File "te.py", line 1 SyntaxError: Non-ASCII character '\xed' in file testsetst.py on line 1, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details [ 해결 ] # -*-...

Continue Reading

  • Share:

리눅스 서버(iscsi target) + 윈도우서버 (client) powershell + 배치파일 (수정중수정중)

By 때찌때찌맴매 - 1월 27, 2018
리눅스 서버(iscsi target) + 윈도우서버 (client) powershell + 배치파일 ** 전 포스팅인 리눅스 서버(iscsi target) + 윈도우서버 (client) powershell   를 이용해 간단한 배치파일을 작성 했고, 스크립트 자체를 powershell 로 작성 하려 했으나 배치파일로  간단하게 작성 할 수 있을거 같아 배치파일로 진행 했습니다. @echo off ipconfig | find "IPv4" > c:\ipcheck_tmp set /p ip_check= < c:\ipcheck_tmp sc query | find "MSiSCSI" /c > c:\iscsistart...

Continue Reading

  • Share:

defunct(좀비) process 죽이기 feat. scripts

By 때찌때찌맴매 - 12월 07, 2017
** top으로 프로세스 현황을 보면 가끔 좀비 프로세스가 있습니다. 해당 포스팅은 좀비 프로세스 확인 및 제거를 진행합니다. [root@localhost ]# top top - 13:21:53 up 362 days, 12:51, 2 users, load average: 0.36, 0.51, 0.60 Tasks: 544 total, 1 running, 541 sleeping, 0 stopped, 2 zombie Cpu0 : 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Cpu1 : 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st...

Continue Reading

  • Share:

Telegram_CLI install & lua_scripts 모니터 활용

By 때찌때찌맴매 - 1월 12, 2015
Telegram_CLI install & lua_scripts 모니터 활용 약 4개월 전에 Telegram 사용이 핫 할때 사용하다가 2개월 전에 cli  사용 법을 알아서 이것 저것 좀 해보다가 이제 올림 ㅇㅇ; 1. telegram_cli 설치 * 패키지, 소스 설치 및 설정 yum install libevent-devel openssl-devel readline-devel libconfig-devel lua lua-devel -y ln -sf /usr/lib64/libncursesw.so /usr/lib/libncursesw.so mkdir /tele cd /tele git clone –recursive https://github.com/vysheng/tg telegram_cli export LDFLAGS=”-lncursesw” ./configure && make...

Continue Reading

  • Share:

powershell을 이용한 ftp 설치(cmd 자동설치)

By 때찌때찌맴매 - 3월 22, 2014
시스템 자동화를 위해 ftp 사이트를 자동 구축을 하기로 합니다. 구글링 해보니 cmd 창에서는 한계가 있기 때문에 파워 쉘을 이용하기로 했습니다. ftp를 설치 하기 위해서는 iis 설치에서 ftp 서버를 설치 해야 합니다. 설치 방법 : http://hoguinside.com/iis-ftp-%EC%84%A4%EC%B9%98/ 캡쳐 일일이 귀찮아서 http://svrstudy.tistory.com/52 해당 url에서 사진을 가져왔음. 파워쉘은 윈도우에서 강력하게 사용할 수 있지만 일일이 다 쳐야 된다된다. 어느 정도는 텝으로 커버가 되지만 상당히 짜증나는 작업입니다. - 설치...

Continue Reading

  • Share:

/var/log/secure 로그로 /etc/hosts.deny 에 자동 등록시키는 스크립트

By 때찌때찌맴매 - 2월 20, 2014
10분간의 로그 중 20회 이상 Fail Password를 발생시킨 아이피를 차단한다. php 스크립트로 작성. 동작원리 1. /var/log/secure 파일에서 10분전의 로그 추출. 2. 아이피 별로 갯수 통계 3. 한 아이피에서 20회 이상 sshd로 비밀번호가 틀렸다면 /etc/hosts.deny에 “ALL : 아이피”의 형태로 저장 4. xinetd 데몬 재시작 5. 등록한 아이피 목록을 메일 주소로 발송 실행 ./secure_analysis.sh sshd crontab 등록 */10 * * * * /경로명/secure_analysis.sh sshd 소스...

Continue Reading

  • Share:

스크립트로 죽은데몬 재구동!!!

By 때찌때찌맴매 - 12월 04, 2013
apache ,mysql, named 데몬 이 죽었을때 재구동 시키는 스크립트를 만들어 생성합니다. ex) #vi apache.sh ======================================================== #!/bin/bash http=”`pgrep http  | wc -l`” if [ “$http” -eq “0” ] ; then /usr/local/apache/bin/apachectl restart fi ======================================================== http 라는 변수에 pgrep httpd 아파치 프로세스를 검색, wc -l 카운터 체크 http 라는 변수가 0 과 같으면 아래 내용을 실행함니다. 같은 내용으로 이름만 바꾸면 mysql, named 도 생성 됩니다....

Continue Reading

  • Share: