Install rungetty:
apt-get install rungetty
I don't expect anybody to read this. I'm just storing these notes in the cloud so I find them again. Easier than storing them on my machine, where I might lose them.
sudo aticonfig -f --initial --adapter=all
sudo reboot
struct timeval tv1; uint64_t timestamp; ... gettimeofday( &tv1, NULL ); timestamp=tv1.tv_sec*1000000 + tv1.tv_usec;
#include <stdio.h> #include <stdint.h> #include <sys/time.h> int main() { struct timeval tv1; uint64_t timestamp; for (;;) { gettimeofday(&tv1, NULL); timestamp = tv1.tv_sec * 1000000 + tv1.tv_usec; printf("+%llx\n", timestamp); timestamp = tv1.tv_sec * 1000000UL + tv1.tv_usec; printf(" %llx\n", timestamp); sleep(1); } }
+ffffffffe78b00d5 e78b00d5 +ffffffffe79a6a3d e79a6a3d +ffffffffe7a9d355 e7a9d355 +ffffffffe7b932e0 e7b932e0 +ffffffffe7c87784 e7c87784 +ffffffffe7d7c11a e7d7c11a +ffffffffe7e70493 e7e70493 +ffffffffe7f65dc1 e7f65dc1
- timestamp=tv1.tv_sec*1000000 + tv1.tv_usec; + timestamp=tv1.tv_sec*1000000UL + tv1.tv_usec;
I then call it after it receives the broadcast probe:void nuke_essid(uchar* packet, int length) { int offset=0; while( offset+2 < length ) { int tag_length = packet[offset+1]; if( packet[offset] == 0 ) packet[offset] = 230; offset += 2 + tag_length; } }
if(opt.verbose) { PCT; printf("Got broadcast probe request from %02X:%02X:%02X:%02X:%02X:%02X\n", smac[0],smac[1],smac[2],smac[3],smac[4],smac[5]); } //store the tagged parameters and insert the fixed ones buffer = (uchar*) malloc(length-z); memcpy(buffer, packet+z, length-z); + nuke_essid(buffer, length-z); memcpy(packet+z, "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", 12); //fixed information packet[z+8] = (apc->interval) & 0xFF; //beacon intervalTo fix the QoS problem I simply add the following two lines near the beginning of packet_recv():
Ticketspthread_mutex_unlock( &mx_cap ); z = ( ( packet[1] & 3 ) != 3 ) ? 24 : 30; + if(packet[0] == 0x88) + z += 2; /* handle QoS field */ if(length < z) {
update-rc.d networking defaults
sshd-generate
update-rc.d ssh defaults
apt-get install rungettyEdit /etc/event.d/tty1 and change last line:
#exec /sbin/getty 38400 tty1Edit /root/.bash_profile:
exec /sbin/rungetty tty1 --autologin root
startx
apt-get update
apt-get install aircrack-ng
gatewayip=`route -n | grep 'UG[ \t]' | awk '{print $2}'`