Archive for gennaio, 2010
Google Wifi DB
by Nick on gen.31, 2010, under Hacks, Sicurezza
Try compiling this form with a wifi MAC Address and press Enter (iframe):
The source code is:
#!/usr/bin/python # Copyright (C) 2010 Kees Cook# License: GPLv3 # Find location of a MAC address via Google Location Services # http://code.google.com/p/gears/wiki/GeolocationAPI import cgi import sys, urllib2 import simplejson import pprint form = cgi.FieldStorage() if not form: print "Content-type: text/html" print "" print "" print "Enter MAC address to locate: " print 'source' print "" sys.exit(0) #try: if True: loc_req = { 'version': '1.1.0', 'request_address': True, 'address_language': 'en', 'wifi_towers': [] } bssid = form['mac'].value loc_req['wifi_towers'] += [{ 'mac_address': bssid.replace(':','-'), 'signal_strength': 1 } ] data = simplejson.JSONEncoder().encode(loc_req) output = urllib2.urlopen('https://www.google.com/loc/json', data).read() output = simplejson.loads(output) print "Content-type: text/plain" print "" pprint.pprint(output) if output['location']['accuracy'] >= 22000: print "# N.B. Accuracy of 22000 or higher seems to indicate unknown location..." else: print "Content-type: text/html" print "" print "" print "Sorry, something went wrong" print ""
Think at the possibility for somebody to bruteforce Google DB and retrieve these infos.
Starting from http://standards.ieee.org/regauth/oui/oui.txt, for example, i can try 16^6 mac addresses starting from 00-18-84 to get info about FON hotspots and achieve locations in a day or less.
I think this is not illegal as this is what my GPhone actually does. PS: I have not checked against any bruteforce prevention.
Thanks to Kees Cook.
Hack foto pubbliche nei profili Facebook
by Nick on gen.23, 2010, under Hacks
Ricopio questo interessantissimo codice che, inserito nel browser al posto della barra di indirizzo o salvato come segnalibro, ci permette di vedere le foto pubbliche dei profili di facebook.
javascript:(function(){function%20y(){if(x.readyState==4){q=x.responseText.substring(9);p=eval('('+q+')');document.getElementById('tab_canvas').innerHTML=p.payload.tab_content;}}x=window.XMLHttpRequest?new%20window.XMLHttpRequest:(window.ActiveXObject?new%20ActiveXObject("MSXML2.XMLHTTP"):null);x.onreadystatechange=y;x.open('POST','http://www.facebook.com/ajax/profile/tab.php',true);x.send('id='+ProfileURIController._profileId+'&v=photos&__a=1');})()
Come fare? Semplice:
- salviamo questo link – Cerca Foto Facebook – nei nostri segnalibri;
- visitiamo il profilo pubblico di una persona (ci troveremo alla pagina info);
- clicchiamo sul link e al posto del profilo ci appariranno album e foto pubblic he.
Tratto da: theharmonyguy.com
Formattazione Output XML con PHP
by Nick on gen.15, 2010, under Programming
Funzione molto utile per formattare il testo XML in uscita (ad esempio da DomDocument).
function formatXmlString($xml, $indentBase = 0, $indentString = ' ') {
// add marker linefeeds to aid the pretty-tokeniser (adds a linefeed between all tag-end boundaries)
$xml = preg_replace('/(>)(<)(\/*)/', "$1\n$2$3", $xml);
// now indent the tags
$token = strtok($xml, "\n");
$result = ''; // holds formatted version as it is built
$pad = ($indentBase > 0) ? $indentBase : 0; // initial indent
$matches = array(); // returns from preg_matches()
// scan each line and adjust indent based on opening/closing tags
while ($token !== false):
// test for the various tag states
// 1. open and closing tags on same line - no change
if (preg_match('/.+<\/\w[^>]*>$/', $token, $matches)):
$indent = 0;
// 2. closing tag - outdent now
elseif (preg_match('/^<\/\w/', $token, $matches)):
$pad--;
// 3. opening tag - don't pad this one, only subsequent tags
elseif (preg_match('/^<\w[^>]*[^\/]>.*$/', $token, $matches)):
$indent = 1;
// 4. no indentation needed
else:
$indent = 0;
endif;
// pad the line with the required number of leading spaces
$line = str_pad($token, strlen($token) + $pad, $indentString, STR_PAD_LEFT);
$result .= $line . "\n"; // add to the cumulative result, with linefeed
$token = strtok("\n"); // get the next token
$pad += $indent; // update the pad size for subsequent lines
endwhile;
return $result;
}
Tratta (e modificata) da recurser.com.
Big Bang Theory
by Nick on gen.08, 2010, under Cinema
Big Bang Theory (The Big Bang Theory) è una situation comedy americana creata da Chuck Lorre e Bill Prady, e prodotta dalla Warner Bros. Television e dalla Chuck Lorre Productions. L’episodio pilota è andato in onda il 24 settembre 2007 sul canale statunitense CBS. Sono state realizzate finora tre stagioni.
In Italia, la serie viene trasmessa dal 19 gennaio 2008 su Steel, canale presente all’interno del pacchetto televisivo Premium Gallery di Mediaset Premium. Attualmente, sono state trasmesse le prime due stagioni, mentre la terza verrà trasmessa, sempre in anteprima, nel corso del 2010[senza fonte].
In chiaro, la serie andrà in onda prossimamente su Italia 1. (Fonte: Wikipedia)
Ecco una delle puntate:
Sebbene non rientri esattamente fra i miei telefilm preferiti, a tratto si dimostra davvero divertente. Vi consiglierei la versione originale in inglese, visto che la traduzione sembra davvero scadente.
Moblin: sistema operativo nettop
by Nick on gen.05, 2010, under Tools
Nel panorama dei Sistemi operativi open source negli ultimi anni si sono viste molte novità. Alcune hanno avuto e stanno avendo notevole successo, si pensi al sistema Android. Alcune, probabilmente, l’avranno (Chrome OS).
Oggi vi segnalo Moblin.
Moblin è un progetto open source che si focalizza sullo sviluppo di applicativi per Dispositivi internet portatili (MID, Mobile Internet Device) e altre nuove categorie di dispositivi come netbook e nettop. Intel lanciò il sito Moblin.org nel luglio 2007 e ha significativamente aggiornato il sito nell’aprile 2008 con il lancio della famiglia di processori Intel Atom all’Intel Developer Forum di Shangai. @Wikipedia
Seppur sia giovane e supporti una quantità di hardware abbastanza limitata ha il pregio, come quasi tutte le distribuzioni linux moderne, di poter essere avviato da chiavetta USB o da CD in modo da provarlo senza intaccare i dati all’interno del PC.
Su eeePC 900A l’installazione si è rivelata estremamente semplice. Il sistema operativo è tra i più veloci che abbia mai visto (anche se la versione Ubuntu 9.10 è una scheggia).
Durante le prove ci si può accorgere che il lavoro da fare sia ancora molto. Tuttavia il sistema si mostra già pronto ad essere utilizzato in molte situazioni.
Link a:
Ps: durante l’installazione o tramite i menu di impostazione è possibile selezionare la lingua italiana.
