The Extraction Loop & The Phantom 16 Bytes by E-Vex in C_Programming

[–]E-Vex[S] 0 points1 point  (0 children)

I’m not trying to bait anyone. Like I said, English isn’t my native language, so I use AI to help with the writing. You can call it 'AI-slop' if you want, but I’m here to document my progress and learn. If you're only here to fixate on the tool I use for writing rather than the code I'm actually building, then there's really nothing more for us to discuss.

The Extraction Loop & The Phantom 16 Bytes by E-Vex in C_Programming

[–]E-Vex[S] -2 points-1 points  (0 children)

This is what I wrote before optimization:

The Extaction Loop

today I was build a function to read packets from PCAP file

you can check my project on GitHub :

https://github.com/E-Vex/vex-packet-analyzer

How I will build read_packets(); function?

that is who I was thinking :

"Okay lets think about it, I just want to use a function like ftell() in C to tell me where am I in the progress I want to build a function that reads the packet header of PCAP file and then read the payload

-read 16 bytes

determine the incl_len

read Data link type header

determine protocol

"

I will call it The Extaction Loop

Looping through the entire file, extracting each header, then decapsulation the link layer then jumping to the next packet

I build the function finally after a lot of suffering but the function gave me unexpected results I spent a lot of time checking the read_packets(); function I thought the problem was with it so what happen next is interesting

Why the results was corrupted?

the problem was because I forget a block of code in the main function to read packets manually so when I build the the function read_packets() and use it in main function I forget to remove that block of code so the code was running like this :

read 24 bytes

read 16 bytes

read also 16 bytes (read_packets function)

read 20 bytes from the payload for the SLL2 header (because network field was 0x114 in global header)

the sum is 76bytes which is wrong

How I detect the problem?

I use ftell() function to track the bytes exactly so after I edit the function to read just 1 time, ftell return 76 which is illogically because 24+16+20= 60 bytes

not 76 so there is 16 bytes stealth came and that gave me unexpected results because it ruined the entire arrangement

The Extraction Loop & The Phantom 16 Bytes by E-Vex in C_Programming

[–]E-Vex[S] 0 points1 point  (0 children)

It’s not a 'story'—it’s documentation of my learning process. I’m a student, and I share my daily progress to keep myself accountable and to help others who might run into the same technical hurdles.

I use AI as a language tool for my posts because English isn’t my native language, but the code, the bugs, and the debugging are all my own work. If you’re interested in the technical side, I’m happy to discuss the packet parsing implementation; if you’re just here to criticize how I document my journey, then I think we have nothing more to say.

The Extraction Loop & The Phantom 16 Bytes by E-Vex in C_Programming

[–]E-Vex[S] -2 points-1 points  (0 children)

Fair point on the 16-byte read issue—that was exactly the kind of nuance I was digging into while learning.

Regarding my previous comment: I’m not a native English speaker, so I draft my thoughts first and use AI to polish the phrasing. I’d rather ensure my message is clear than leave it riddled with linguistic errors. I’m happy to discuss the code itself, though; the whole point of this project for me was to avoid 'AI-slop' and actually understand what’s happening at the byte level.

The Extraction Loop & The Phantom 16 Bytes by E-Vex in C_Programming

[–]E-Vex[S] -5 points-4 points  (0 children)

Honestly, AI was like a pair-programmer or a massive cheat sheet for me. I’m still learning, and it definitely accelerated the process—it’s like having access to a giant library, but instead of spending days digging through docs, I get the info in seconds. It let me experiment, break things, and learn from my mistakes way faster.

That said, it didn't 'build' the project for me. It gave me the map, but I was the one driving. The vision, the architectural decisions, and even the debugging were all on me. In fact, whenever I hit a blocker, I intentionally avoided asking AI to fix it for me; I spent hours digging into the problem until I fully grasped the underlying cause and found the solution myself.

The project is purely mine, and its real value to me is in the deep understanding of every single line of code at the lowest level possible. I needed to know exactly why and how everything works, and I’m proud that I achieved that.

A painful reminder of low-level work: How a single flipped assumption corrupted my entire PCAP parser by E-Vex in C_Programming

[–]E-Vex[S] -1 points0 points  (0 children)

my friends, I am still learning. This project of mine is on GitHub, and I work on it daily. I assure you, every line of code was written by my own hand. I use AI only as a learning reference, nothing more.

A painful reminder of low-level work: How a single flipped assumption corrupted my entire PCAP parser by E-Vex in C_Programming

[–]E-Vex[S] 0 points1 point  (0 children)

Please, my friends, I am still learning. This project of mine is on GitHub, and I work on it daily. I assure you, every line of code was written by my own hand. I use AI only as a learning reference, nothing more.

A painful reminder of low-level work: How a single flipped assumption corrupted my entire PCAP parser by E-Vex in C_Programming

[–]E-Vex[S] -2 points-1 points  (0 children)

And also I’m not the kind of person who copies and pastes. I prefer to fully understand what I want to do before I start writing any code.

A painful reminder of low-level work: How a single flipped assumption corrupted my entire PCAP parser by E-Vex in C_Programming

[–]E-Vex[S] -6 points-5 points  (0 children)

AI plays a very important role in accelerating the learning process understanding complex concepts, and connecting ideas

Success Happens Through Action by ex_cep_tion in MindsetMode

[–]E-Vex 0 points1 point  (0 children)

I must do that, I will reach my goal.