Linux에서 구글 SMTP 테스트 하기

암호알아내기 user1@ubuntu-desktop:~$ openssl enc -base64 <<< 'email@gmail.com' d2VidGVycm9ydXNAZ21haWwuY29tCg== user1@ubuntu-desktop:~$ openssl enc -base64 <<< 'tkfkdgkqslek.' MThhbGNsaaaaYQo=   메일 보내기 openssl s_client -connect smtp.gmail.com:465 -crlf 220 smtp.gmail.com ESMTP ud10sm124759201pab.27 – gsmtp helo 250 smtp.gmail.com at your service auth login 334 VXNlcm5hbWU6 d2VidGVycm9ydXNAZ21haWwuY29tCg== 334 UGFzc3dvcmQ6 MThhbGNsaaaaYQo= mail from: <email@gmail.com> 250 2.1.0 OK tv6sm70519976pab.4 – gsmtp rcpt to: <email@email.com> […]

Linux 파이프 원리를 알아보자

파이프 원리 이해하기 @@ curl 은 두개의 디스크립터가 나온다, 실제 URL요청후 받는 HTML과 속도 리포트를 하는 OUTPUT이다. 그러나 HTML과 OUTPUT의 디스크립터 번호가 다르다. HTML은 표준출력으로 1번 디스크립터로 쓰여지고 OUTPUT은 2번 디스크립터로 기록하게 된다. 따라서 다음과 같이 하게 되면 파이프를 2번 디스크립터로 받게 되어 정상 출력을 하게된다. 1. 먼저 1번 표준 출력을 2번 디스크립터로 던진다. 2. […]

Linux에서 stringy 검색 활용, 또는 lookahead 사용법

stringy 검색 활용하는 방법 # sed에서 stringy 활용하는 방법 / super sed로 해야 처리가 가능하다. $ cat sample.txt | ssed -n -R 's/(<a.*?>.*?<\/a>)/\1@/gp' – R : 정규표현식을 펄형식으로 사용하기 위해서 정의해주는 것이다. .*? : 최소 매칭으로 되지만, newline은 제외된다. 따라서 a태그 내용이 도중에 줄이 바뀌었을 경우에는 검색되지 않는다. <a>태그의 시작과 끝을 나타내는 </a>의 태그를 <a.*>.*<\/a>라고 […]

Linux의 route 커맨드로 gateway 관리

아이피 별로 route Gateway 분기하기 route del default route add default gw 172.20.10.1 route add 130.80.10.185 gw 192.168.0.1 route add 130.68.49.35 gw 192.168.0.1 root@debian:~# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default 192.168.43.1 0.0.0.0 UG 0 0 0 wlan0 130.80.10.185 192.168.nate.co 255.255.255.255 UGH 0 0 0 eth0 link-local * […]

Linux의 netstat, 동시접속자수 확인

모든 서비스 동시 접속자 수 [root@fot etc]# netstat -nap | grep ESTABLISHED | wc -l 11 [root@fot etc]# netstat -nap | grep ESTABLISHED tcp 0 0 127.0.0.1:52314 127.0.0.1:8009 ESTABLISHED 12237/httpd tcp 0 0 127.0.0.1:56156 127.0.0.1:8009 ESTABLISHED 12239/httpd … tcp 0 0 ::ffff:127.0.0.1:8009 ::ffff:127.0.0.1:52312 ESTABLISHED 12252/java tcp 0 0 ::ffff:127.0.0.1:8009 ::ffff:127.0.0.1:56156 ESTABLISHED 12252/java … tcp 0 […]

Linux에서 lsof 사용법

################################################################################ lsof 사용법 ################################################################################ ——————————————————————————– FD – stands for File descriptor and may seen some of the values as: ——————————————————————————– cwd current working directory rtd root directory txt program text (code and data) mem memory-mapped file r for read access. w for write access. u for read and write access. ——————————————————————————– TYPE – of files […]

www.xxxx.com 도메인 xxxx.com 으로 리다이렉트 시키기

만일 www.xxxx.com 도메인을 xxxx.com 도메인과 함께 같은 웹페이지를 사용하려고 한다면 VirtualHost를 두가지 노드를 생성해야 하거나 해야 한다. 이러한 불편함을 없애려면, .htaccess를 이용하여 리다이렉트 시키면 되겠다. ** 우분투 기준입니다. root@webterror:/var/www# vi /etc/apache2/sites-enabled/000-default # VirtualHost 설정 파일을 아래와 같이 편집해야 하는데, 중요한건 AllowOverride가 되어야 한다는 것이다. # /var/www 디렉토리가 .htaccess 파일을 사용할수 있도록 override를 시켜준다. &lt;VirtualHost *:80&gt; […]

워드프레스 Admin 계정 비밀번호 재설정 방법

워드프레스에서 비밀번호를 재설정하기 위해서는 아래와 같은 절차가 있어야 한다. 워드프레스 codex에서 발췌해온건데, 아래의 방법은 MySQL 5버전 이하일 경우에 해당된다. 5버전이하에는 MD5 암호화 필드처리가 안되는것 같다. Get an MD5 hash of your password. Visit md5 Hash Generator, or… Create a key with Python. or… On Unix/Linux: Create file wp.txt with the new password in it (and […]