Skip to content

Instantly share code, notes, and snippets.

View iDanielLaw's full-sized avatar

Daniel Law iDanielLaw

  • Imagine No Limit Technology
View GitHub Profile
@glennzw
glennzw / fcs.txt
Last active June 4, 2019 14:09
FCS - Frame Check Sequence
I'm capturing 802.11 frames - probe requests to be exact. I'm noticing occasional garbled data, so would to incorporate the Frame Check Sequence (FCS) to ensure frame integrity. I'd expect the card to dump failed checksum frames, but maybe this doesn't happen in promisc mode. We can see the FCS in action with tshark like so:
# tshark -i mon0 -R 'wlan.fcs' -T fields -e wlan.fcs_good -e wlan.fcs
1 0x5c1eecd5
0 0x8d425ccf
1 0xb28bb592
1 0xd2cb1bf6
...where wlan.fcs is the calculated checksum, and wlan.fcs_good is the boolean of the result.
DEFAULT ramdisk
LABEL ramdisk
kernel /casper/vmlinuz
append boot=casper initrd=/casper/initrd.img
LABEL isotest
kernel /casper/vmlinuz
append boot=casper integrity-check initrd=/casper/initrd.img
LABEL memtest
kernel /install/memtest
append -
@ikautak
ikautak / pi_generator.py
Created May 14, 2011 01:53
calculate pi using python generator.
#!/usr/bin/env python
def pi():
# Wallis' product
numerator = 2.0
denominator = 1.0
while True:
yield numerator/denominator
if numerator < denominator:
numerator += 2