컴퓨터
-
Cosmopolitan: Python, C 언어 크로스 플랫폼 사용컴퓨터/C & C++ 2022. 8. 23. 20:29
Cosmopolitan GitHub - jart/cosmopolitan: build-once run-anywhere c library build-once run-anywhere c library. Contribute to jart/cosmopolitan development by creating an account on GitHub. github.com 소개 Cosmopolitan Libc는 C를 자바처럼 한번 빌드하면 어디서든 실행할 수 있게 해주는 라이브러리이다. (VM이나 인터프리터 없음) Linux, Mac, Windows, FreeBSD, OpenBSD, NetBSD, BIOS 등 운영체제를 지원하고 성능도 좋다. 사용법 리눅스 기준 wget https://justine.lol/cosmopoli..
-
Rust: HashMap 값 for 문에서 update하기컴퓨터/Rust 2022. 8. 10. 19:41
할 것 여기서는 처음 HashMap 만들 때 Key는 지정해놨지만 Value는 나중에 업데이트하는 식으로 되어있다. Rust에서 HashMap을 key,value로 for 문을 돌면서 value를 업데이트 하는 방법이다. 코드 for (key, value) in my_hash_map.iter_mut() { let new_value = generate_random_value(); *value = new_value; } // Key sorted 출력 방법 for (ssid, password) in my_hashmap.iter().sorted() { println!("Wifi: {}, Password: {}", ssid, password); } iter_mut()로 HashMap을 iterate하면 key는 ..
-
Windows: 저장된 WIFI 와이파이 비밀번호 보기컴퓨터/Rust 2022. 8. 10. 19:35
WiFI 정보 Extract Windows Wi-Fi Passwords Extract Windows Wi-Fi Passwords with Rust. github.com 소개 윈도우 PC에 저장된 모든 WIFI 비밀번호를 보는 방법이다. 코드 netsh wlan show profiles 위 명령어를 입력하면 저장된 모든 WIFI가 나온다. netsh wlan show profile mywifi key=clear 여기서 위 명령어 mywifi 부분에 원하는 wifi 이름을 입력하면 Key Content 부분에 비밀번호가 나온다. 아래 regex로 캡처할 수 있다. # 와이파이 프로파일 regex pattern = r"All User Profile\s+:\s(?P.*)$" # 비밀번호 regex pattern..
-
wsl: USB 장치 연결하기 (Connect usb devices to wsl)컴퓨터 2022. 7. 16. 15:40
WSL에서 USB 장치를 연결하는 방법 1. usbipd 설치 호스트 OS, 윈도우에서 설치한다. Releases · dorssel/usbipd-win Windows software for sharing locally connected USB devices to other machines, including Hyper-V guests and WSL 2. - dorssel/usbipd-win github.com 2. WSL 에서 usbip 설치 WSL 콘솔에서 입력한다. sudo apt install linux-tools-virtual hwdata sudo update-alternatives --install /usr/local/bin/usbip usbip `ls /usr/lib/linux-tools/*/..
-
Python: 일정 시간마다 subprocess 실행 중인지 체크하기컴퓨터/파이썬 2022. 7. 13. 20:29
특정 프로세스가 살아있는지 매 초마다 확인하고 죽어있다면 재실행하는 예제 Python Advanced Scheduler rocketry.readthedocs.io pip install rocketry import shlex import subprocess from os import setpgrp from rocketry import Rocketry app = Rocketry() @app.task("every 1 second") def check_db_updater(): """ updater 라는 프로세스 매 초마다 체크함""" cmd = "ps cax | grep updater > /dev/null; if [ $? -eq 0 ]; then echo '1'; else echo '0'; fi" ps = su..
-
dismember: 메모리 탐색기컴퓨터/Go language 2022. 7. 6. 16:07
GitHub - liamg/dismember: Scan memory for secrets and more. Maybe eventually a full /proc toolkit. :knife: Scan memory for secrets and more. Maybe eventually a full /proc toolkit. - GitHub - liamg/dismember: Scan memory for secrets and more. Maybe eventually a full /proc toolkit. github.com 리눅스 계열 OS에선 /proc/pid/something에 이런저런 메모리 정보들이 저장된다. 로그인을 한다고 했을 때 여러가지 사이트 정보 네이버 비밀번호 ./dismember grep '..
-
Wails: Go언어를 이용해 크로스 플랫폼 앱 만들기컴퓨터/Go language 2022. 6. 26. 12:38
Wails The Wails Project | Wails Build beautiful cross-platform applications using Go wails.io 소개 Wails는 Go언어를 이용하여 크로스 플랫폼 앱을 만들게 도와준다. (MacOS/Windows/Linux) 프런트엔드는 Svelete, React 등을 사용해서 할 수 있고, wails는 Go언어로 빌드나 함수 -> JS를 도와준다. 설치는 쉬우니 공식 사이트를 확인하면 된다. @공식 문서 만들면서 배운 것 Svelte랑 프런트엔드 쪽은 많이 안 해봐서 쉬운 것부터 시작했다. 대학교 공지 홈페이지에서 각 카테고리별로 Go언어로 파싱하고 앱에 뿌리는 것이다. Go언어 Struct -> TypeScript 우선 Go언어로 짠 struc..
-
Rust: actix-rs에서 HTML tera 엔진 렌더링컴퓨터/Rust 2022. 6. 24. 11:24
actix-rs Actix Web | A powerful, pragmatic, and extremely fast web framework for Rust. Request Routing The built-in Actix Web request router can be used with or without macros attached to handlers, and always provides flexible and composable methods of creating routing tables. Includes support for matching dynamic path segments, path prefix actix.rs 소개 이 글에선 Python django 처럼 HTML 엔진을 이용해서 코드를 HT..