Sunday, October 22, 2017

Ostinato & packETH

Ostinato

Need traffic generator that can generate vlan traffic - trying out Ostinato

Build:

https://devguide.ostinato.org/BuildingFromSource.html

git clone https://github.com/pstavirs/ostinato.git

On Ubuntu 16.04, install deps:
sudo apt-get install qt4-dev-tools libqt4-dev

sudo apt install protobuf-compiler protobuf-c-compiler libprotobuf-dev libpcap-dev

qmake
make
sudo make install

/usr/local/bin/ostinato

Note:
- Does seems to work with wifi interface. Only can see bluetooth adaptor. Didn't investigate further.

packETH

http://packeth.sourceforge.net/packeth/Home.html

sudo apt install libgtk2.0-dev
./configure
make
sudo packETH

packETH is more straightforward, and work with wifi interface.
Build the packet and use Gen-b to send


Thursday, October 12, 2017

Wifi Wireshark debug

Filter out beacon and data:
(wlan.fc.type_subtype != 0x08 && wlan.fc.type_subtype != 0x28)


Sunday, October 08, 2017

Quick GDB dump

gdb

set solib-search-path
set sysroot

dir
keep adding to the source

ctl-x a to toggle view to browse code

bt full
up/down
info locals
info variables
p *data
p *data->xxx etc

x/100 addr

print a c++ string:


(gdb) p fName
$9 = {
  static npos = ,
  _M_dataplus = {
    > = {
      <__gnu_cxx::new_allocator char="">> = {}, },
    members of std::basic_string, std::allocator >::_Alloc_hider:
    _M_p = 0x958dec ""
  }
}
(gdb) p *(char **)fName._M_dataplus._M_p
$10 = 0x0