메뉴 건너뛰기

그외 팁들


라즈베리파이에서 WiFi 혹은 이더넷 패킷을 캡쳐하기 위해 파이선 라이브러리 - pcapy 를 설치하는 방법입니다.

(The way to install pcapy library for capturing the packet with Python On Raspberry Pi 3)


1. 필요한 도구 설치 (Install several tools and libraries that you might need)

$ sudo apt-get install python-setuptools
$ sudo apt-get install python-dev
$ sudo apt-get install libpcap-dev
$ sudo pip install pcapy


2. 아래 경로에서 pcapy 라이브러리 다운로드 (To install pcapy you'll need to download the latest version of its source code from following url)

> https://pypi.python.org/pypi/pcapy


3. 호스트로 다운로드 받은 라이브러리를 라즈베리파이로 옮기기 (Move the downloaded file to Raspberry Pi)

host $ scp pcapy-0.xx.x.tar.gz pi@111.111.111.111:/home/pi


4. 압축 해제 (Decompress the downloaded file)

$ tar vxfz [filename].tar.gz


5. 압축이 해제된 파일이 있는 경로로 이동 (Move a path to the location of decompressed files)

$ cd pcapy-0.x.x


6. 아래 명령 실행 (Run the following command)

sudo python setup.py install


2. 파이선에서 pcapy 사용이 가능한지 확인해 보기 (Check if pcapy is available in Python)

$ python
> import pcapy


3. 간단한 패킷 캡쳐 예제 (Try simple examples)

> 라즈베리파이에서 무선랜은 'wlan0', 유선랜은 'eth0' 입니다. 보통은~ (WiFi interface is 'wlan0' and ethernet interface is 'eth0')

> https://www.binarytides.com/code-a-packet-sniffer-in-python-with-pcapy-extension/





번호 제목 날짜 조회 수
공지 [TIP] 라즈베리파이 3를 AP로 만들기 (How to make Raspberry Pi 3 to Access point device) 2018.01.22 8879
공지 [TIP] ASR 오픈소스 프로젝트 - Kaldi 로 나만의 STT 서비스 구축해 보기 2018.07.26 6974
공지 [TIP] 무슨 짓을 해도 토렌트가 동작 안 할 때 [8] 2024.08.03 6765
134 [TIP] 무슨 짓을 해도 토렌트가 동작 안 할 때 [8] 2024.08.03 6765
133 [TIP] Windows 11에 QGroundControl 시뮬레이션 환경 구성 방법 file 2023.12.01 855
132 [TIP] 페이스북과 서비스 연동을 위한 권한 요청 검수 절차를 시작하기 전에 2022.10.19 319
131 [TIP] Google Cloud API 호출시 No 'Access-Control-Allow-Origin' header is present on the requested resource. 오류가 발생할 때 2021.06.13 523
130 [TIP] DJI Mobile SDK(Android)를 사용시 SDK 등록이 잘 안되거나 멈추는 등의 오류가 발생할 때 2020.10.17 488
129 [TIP] GitHub Public Page의 Hidden directory를 노출시키는 방법 2020.02.07 477
128 [TIP] 머신러닝 기반의 이상탐지(Anomaly Detection)를 위한 자료 모음 2020.01.25 2356
127 [TIP] Mac에서 /usr/local/bin/bundle: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby: bad interpreter: No such file or directory 오류 발생시 2019.10.16 1481
126 [TIP] 영상처리에 도움이 되는 머신러닝, 딥러닝 사이트 모음 입니다 2019.10.15 1183
125 [TIP] DJI Windows SDK의 연결이 잘 안될때 [12] 2019.10.01 1433
124 [TIP] 맥북의 스토리지에서 시스템이 차지하는 용량 줄이기 2019.04.20 3894
123 [TIP] PHP extension 모듈이 로드 되지 않거나 php.ini 파일을 변경해도 설정이 반영되지 않을때 2018.08.03 1673
122 [TIP] Raspberry Pi 3 에 파이선 SIP클라이언트 모듈- pjsua 설치하기 2018.07.27 1902
121 [TIP] ASR 오픈소스 프로젝트 - Kaldi 로 나만의 STT 서비스 구축해 보기 2018.07.26 6974
120 [TIP] 파이선 2.7에서 NAVER TTS(CSS) API 사용하기 2018.07.16 1608
119 [TIP] 호스팅중인 GitLab에 접속하면 'Forbidden' 메시지가 표시될 때 2018.06.18 4676
118 라즈베리파이에대하여질문은어디에?? [1] 2018.05.30 559
117 [TIP] Android Studio에서 DJI SDK로 안드로이드 앱 개발시 유용한 디버깅 환경 갖추기 2018.05.20 1599
» [TIP] Raspberry Pi 3 에서 파이선으로 패킷 캡쳐해 보기 (The way to install pcapy library for capturing the packet with Python On Raspberry Pi 3) file 2018.04.12 1668
115 [TIP] Raspberry Pi 3를 위한 Android 빌드 하기 (Compile and install Android for Raspberry Pi 3) [2] 2018.03.20 4252
위로