사실 Python이나 C#쓰면 겁나쉬운건데 살면서 처음다뤄보는 CPP 라고쓰고 C로 해보는 첫 프로젝트입니다
정말 쓸모없는 여담이지만 여자친구 노래 완전좋아요 ㄹㅇ ㅜㅜ
라이브러리같은거 키우는 취미없어요. 오직 노가다 뿐이죠.
사실 라이브러리 쓸줄몰라서 이러는건 안비밀!
뭐 복잡한거 없어요! 겁나게 쉬워요 , 간지나게 터미널 빡 하고 켜주세요. 이렇게 쳐주세요!
그리고 PCAP Assembler가 있는 경로를 들어가서 ./Fpcap
빡 누르면 에러가 뿜뿜 할거에요.그러니까 ./Fpcap Desktop/doghunnyjam.pcap
요로코롬 하세요
참 쉽죠?
pcap fileheader
__________________________________________________________________________
| 4 | 2 | 2 | 4 |
__________________________________________________________________________
| magic(0xa1b2c3d4) | maj.ver | min.ver | gmt to localcorrection |
__________________________________________________________________________
| 4 | 4 | 4 |
_________________________________________________________________________
| 캡쳐한 시각 | snap의 최대 길이 | datalink type |
_________________________________________________________________________
pcapheader
_______________________________________________________________________________
| 8 | 4 | 4 |
______________________________________________________________________________
| seconds(4) | micro seconds(4) | 캡쳐한 길이 | 패킷 길이 |
_______________________________________________________________________________
ethernet protocol stack
____________________________________________________________________________
| 6 | 6 | 2 |
____________________________________________________________________________
| dest mac address | src mac address | type |
____________________________________________________________________________
IPv4 protocol stack
_____________________________________________________________________________________
| 4 | 4 | 8 | 16 |
_____________________________________________________________________________________
| version | HLEN | service type | total length |
_____________________________________________________________________________________
| 16 | 3 | 13 |
_____________________________________________________________________________________
| identification | Flags | Fragment offset |
_____________________________________________________________________________________
| 8 | 8 | 16 |
_____________________________________________________________________________________
| Time To Live | Protocol | Header Checksum |
____________________________________________________________________________________
| 32 |
____________________________________________________________________________________
| Source IPv4 Address |
____________________________________________________________________________________
| 32 |
____________________________________________________________________________________
| Destination IPv4 Address |
____________________________________________________________________________________
| 0~320(40 바이트) |
____________________________________________________________________________________
| Options and Padding |
____________________________________________________________________________________
##ARP ARP
____________________________________________________________________________
| 4 | 4 | 8 | 16 |
___________________________________________________________________________
| version | HLEN | Type Of Service | total length |
| H/W length(8) | Pro length(8) | OP code (16) |
____________________________________________________________________________
| Sender H/W Address (가변 , Ethernet 48bits, 6Bytes) |
____________________________________________________________________________
| Sender Protocol Address (가변 , IP 32bits, 4Bytes) |
____________________________________________________________________________
| Target H/W Address (가변 , Ethernet 48bits, 6Bytes) |
____________________________________________________________________________
| Target Protocol Address (가변 , IP 32bits, 4Bytes) |
____________________________________________________________________________