# cat /proc/cpuinfo
Processor : ARMv7 Processor rev 2 (v7l)
BogoMIPS : 996.74
Features : swp half thumb fastmult vfp edsp neon vfpv3
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x3
CPU part : 0xc08
CPU revision : 2
hostapd_ctrl_iface_receive
- PING
- RELOG
- STATUS
- STATUS-DRIVER
- MIB
- MIB XXXX
- STA-FIRST
- STA XXXX
- STA-NEXT XXXX
kernel: [13603.180152] usb 2-1: new high-speed USB device number 8 using ehci-pci
kernel: [13603.336480] usb 2-1: New USB device found, idVendor=04bb, idProduct=0951
kernel: [13603.336484] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
kernel: [13603.336487] usb 2-1: Product: WN-AC433U
kernel: [13603.336489] usb 2-1: Manufacturer: I-O DATA
kernel: [13603.336490] usb 2-1: SerialNumber: 3476C51C6CF0
kernel: [13603.337278]
kernel: [13603.337278]
kernel: [13603.337278] === pAd = ffffc900159c9000, size = 895280 ===
gopacket の不満点
- パースするたびに構造体をビルドしていくので、オブジェクトの数が多い。 []byteを基底として、タイプコンバージョンだけで行けるようにならないか。
- タイプをうまく使えていない割に、ポインタを濫用している。
- 一列にしかデコードできないが、ツリー状にデコードできて欲しい。
- ビルドがサポートされていないことが多々。
- プラガブルな構造は継続したい。
- デコード時にコンテキスト情報を渡せるようにして、デフラグもできるようにしたい。
- パース時に再帰的にデコーダを呼び出す(ので、deferで締めくくるのが難しくなる)のはやめたい。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
import json | |
info = [] | |
for root,dirs,files in os.walk(sys.argv[1]): | |
for dir in dirs: | |
path = os.path.join(root, dir) | |
info.append({"path": path, "lstat":str(os.lstat(path)})) | |
for file in files: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From feea3fc8c93f9615677432680e4e6865b6c0de09 Mon Sep 17 00:00:00 2001 | |
From: Hiroaki KAWAI <[email protected]> | |
Date: Thu, 26 Mar 2015 16:45:49 +0900 | |
Subject: [PATCH 1/2] Set dot11 payload for InformationElement | |
--- | |
layers/dot11.go | 5 +++++ | |
1 file changed, 5 insertions(+) | |
diff --git a/layers/dot11.go b/layers/dot11.go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "bindata" | |
class D < BinData::Record | |
endian :big | |
uint8 :dd | |
end | |
class E < BinData::Record | |
endian :big | |
uint8 :ee |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask, request | |
app = Flask(__name__) | |
mac2gpio = dict( | |
"00:00:00:00:00:00": 17, | |
"00:00:00:00:00:00": 22, | |
) | |
if os.path.exists("/sys/class/gpio/gpio17"): | |
with open("/sys/class/gpio/unexport", "w") as w: |