본문 바로가기

Command

관리자권한으로 cron 설정하기. It's easy to use. If you want to run cron job as super user(administrator), follow the below command. sudo crontab -eAdd just 'sudo' before crontab. It'll work on your system. 더보기
Advanced scheduling of Mac OS Wake and Sleep Time Mac OS has a settings panel that allows you to schedule the Wake, Sleep and Shutdown time for your Mac, but there is only one sche dule allowed, everyday, or every friday, or every weekend, and so on. I wanted a different wake and shutdown time for the weekend and weekdays. This is possible using cron, and the command line tool pmset. The crontab below wakes the Mac up at 5pm every weekday and s.. 더보기
남의 컴퓨터를 내 마음대로 다룬다? - Python Reverse Shell_004 - Client Connection to Server (파이썬 리버스 쉘 - 클라이언트에서 서버에 연결하기) 지난 시간에 이어서 이번 시간에는 클라이언트(타겟팅 컴퓨터 혹은 내가 조정하고자 하는 컴퓨터)에서 실행시킬 코드를 다루어 보도록 하겠습니다. 우선 아래와 같이 필요한 모듈을 import 해줍니다. ▼ 소켓을 실행시켜 변수 s 에 넣겠습니다.▼ 서버(내 컴퓨터)의 아이피 주소를 호스트에 할당해 줍니다. 여기 있는 아이피로 클라이언트(숙주 컴퓨터)가 찾아오게 하는 겁니다. 물론 아래와 같이 자신의 아이피를 고스란히 누설하는 크래커는 없을 것입니다. 보통은 다른 루트를 여러번 경유하게 하거나, 중간에 다른 매개체(!!)를 거치게 합니다. 이 부분은 다루지 않겠습니다. 그러다 정말 철컹철컹 당할 사람을 만들면 안되겠기에.....;; 아래 아이피도 임의의 가상 아이피 입니다. 집에서 공유기를 사용하신다면, 192.. 더보기
[MAC TIP] Key Press Action with AppleScript This is an AppleScript to act like a keyboard action. Run a script like this in AppleScript Editor: activate application "Firefox" repeat 100times tell application "System Events" to keystroke "a" using command down delay (random number from 0.5 to 5) end repeat - More examples:tell application "System Events" key code 123 using {shift down, command down} -- shift-command-left endset old to (pat.. 더보기
[PYTHON] Python을 이용한 웹사이트 스캐너 만들기 - 3. IP Address 2편에서 tld(Top Level Domain)을 얻었습니다. 이제는 스캐닝을 할 웹사이트의 ip address 를 얻을 필요가 있습니다. 위와 같이 티스토리의 아이피는 180.70.93.117 이네요. 그렇지만 우리가 원하는 정보는 이 IPv4에 해당하는 숫자만 필요합니다. 즉, 프로그램적으로 앞부분의 'history.com has address ' 이 부분을 날려버리면 됩니다. 혹은 뒷 부부만 선택적으로 받아들이게 하면 됩니다. 1. 아이피를 얻기위해 위와같이 파일을 만들어 줍니다. 2. 위의 터미널에서 보여진대로 특정 정보만 취사선택 하기위해 이번에도 os 를 임포트 해줍니다. 3. 아이피 정보를 얻기 위한 함수를 선언. 4. 위의 터미널에서의 명령을 파이썬으로 프로그램적으로 구동 시키기 위한 방법.. 더보기