<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2enclosuresfull.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-8964007124326996693</atom:id><lastBuildDate>Mon, 21 May 2012 06:16:32 +0000</lastBuildDate><category>mobile</category><category>virtualization</category><category>Visual Studio</category><category>technology</category><category>plug-ins</category><category>obfuscation</category><category>xaml</category><category>cryptography</category><category>chevronwp7</category><category>javascript</category><category>web</category><category>3d</category><category>rsa</category><category>domain names</category><category>windows phone 7</category><category>skype</category><category>bloginto</category><category>hacking</category><category>Security</category><category>chrome</category><category>windows 7</category><category>c#</category><category>firefox</category><category>reflector</category><category>iphone</category><category>expression studio 3</category><category>augmented reality</category><category>wp7</category><category>css</category><category>Samsung omnia 7</category><category>browser</category><category>tips</category><category>corewar</category><category>video</category><category>email</category><category>windows</category><category>virtual machine</category><category>.net</category><category>openSUSE</category><category>troiseSVN</category><category>lesson</category><category>cpu</category><category>vb.net</category><category>techdays</category><category>safari</category><category>class diagram</category><category>facebook</category><category>huffman</category><category>google wave</category><category>linq</category><category>silverlight</category><category>php</category><category>programming</category><category>tutorial</category><category>Opera</category><category>games</category><category>F#</category><category>integer factorization</category><category>algorithm</category><category>themes</category><category>vb</category><category>gps</category><category>linqtotwitter</category><category>jquery</category><category>windows 8</category><category>Bing</category><category>Virtual pc</category><category>android</category><category>blogger</category><category>unix</category><category>wpf</category><category>Linux</category><category>twitter</category><category>languages</category><category>beta sms</category><category>functional programming</category><category>visual studio 2010</category><category>virus</category><category>microsoft</category><category>ocaml</category><category>vigenere</category><category>sql injections</category><category>IE</category><category>opera unite</category><category>ubuntu</category><category>XSS</category><category>gmail</category><category>svn</category><category>google</category><title>&lt;Martani/&gt; Tech</title><description>If the facts don't fit the theory, change the facts.
"Albert Einstein"</description><link>http://www.martani.net/</link><managingEditor>noreply@blogger.com (fakhrou martani)</managingEditor><generator>Blogger</generator><openSearch:totalResults>137</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/MartaniTechBlog" /><feedburner:info uri="martanitechblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><itunes:owner><itunes:email>noreply@blogger.com</itunes:email></itunes:owner><itunes:explicit>no</itunes:explicit><itunes:subtitle>If the facts don't fit the theory, change the facts. "Albert Einstein"</itunes:subtitle><itunes:summary>If the facts don't fit the theory, change the facts. "Albert Einstein"</itunes:summary><feedburner:emailServiceId>MartaniTechBlog</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8964007124326996693.post-4403782288981607577</guid><pubDate>Sat, 28 Apr 2012 12:36:00 +0000</pubDate><atom:updated>2012-04-28T14:39:31.374+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ocaml</category><title>Fun(c) with OCaml and Mazes</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;So today I stumbled upon a post I've wrote almost 3 years ago about solving mazes using OCaml (with graphics yes), and it was actually cool to download the code, type the compiling command and see it run without any issues (C programmers! behold).&lt;br /&gt;&lt;br /&gt;So I decided to put the code on github for anyone to test and use (and fall in love with OCaml probably afterwards).&lt;br /&gt;&lt;br /&gt;The code is available here&amp;nbsp;&lt;a href="https://github.com/martani/ocaml-maze"&gt;https://github.com/martani/ocaml-maze&lt;/a&gt;, and it requires no more than a command to compile and run, it solves mazes with square and hexagon shapes.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-uVJGmktbFX8/T5vjTnsZYOI/AAAAAAAAD7I/hYRyqQ52krg/s1600/honey.png" imageanchor="0" style="display: inline !important; margin-left: 1em; margin-right: 1em; text-align: center;"&gt;&lt;img border="0" height="327" src="http://2.bp.blogspot.com/-uVJGmktbFX8/T5vjTnsZYOI/AAAAAAAAD7I/hYRyqQ52krg/s400/honey.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-9xbG_5p2Rk4/T5vjUuHW1UI/AAAAAAAAD7Q/1tkJDGaE_ro/s1600/square.png" imageanchor="1" style="display: inline !important; margin-left: 1em; margin-right: 1em; text-align: center;"&gt;&lt;img border="0" height="400" src="http://4.bp.blogspot.com/-9xbG_5p2Rk4/T5vjUuHW1UI/AAAAAAAAD7Q/1tkJDGaE_ro/s400/square.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8964007124326996693-4403782288981607577?l=www.martani.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MartaniTechBlog/~4/nchu4x7AcSE" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/MartaniTechBlog/~3/nchu4x7AcSE/func-with-ocaml-and-mazes.html</link><author>noreply@blogger.com (fakhrou martani)</author><media:thumbnail url="http://2.bp.blogspot.com/-uVJGmktbFX8/T5vjTnsZYOI/AAAAAAAAD7I/hYRyqQ52krg/s72-c/honey.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.martani.net/2012/04/func-with-ocaml-and-mazes.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8964007124326996693.post-9222718825490172676</guid><pubDate>Fri, 20 Apr 2012 22:46:00 +0000</pubDate><atom:updated>2012-04-21T00:46:52.621+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">windows phone 7</category><category domain="http://www.blogger.com/atom/ns#">wp7</category><category domain="http://www.blogger.com/atom/ns#">android</category><title>Twitter on Windows Phone vs Twitter on Android</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;They say A picture is worth a thousand words, here is a&amp;nbsp;comparison of the twitter app on Windows Phone and on Android. If they were both application on a desktop Windows computer for example!&lt;br /&gt;&lt;br /&gt;&lt;table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-gEaftHagaSE/T5Hme_mv4CI/AAAAAAAAD4g/jIJJGc7dRQo/s1600/twitter+vs.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="241" src="http://3.bp.blogspot.com/-gEaftHagaSE/T5Hme_mv4CI/AAAAAAAAD4g/jIJJGc7dRQo/s640/twitter+vs.png" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Twitter on Windows Phone vs Android (Click to enlarge)&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8964007124326996693-9222718825490172676?l=www.martani.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MartaniTechBlog/~4/kEoiGd3kNvg" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/MartaniTechBlog/~3/kEoiGd3kNvg/twitter-on-windows-phone-vs-twitter-on.html</link><author>noreply@blogger.com (fakhrou martani)</author><media:thumbnail url="http://3.bp.blogspot.com/-gEaftHagaSE/T5Hme_mv4CI/AAAAAAAAD4g/jIJJGc7dRQo/s72-c/twitter+vs.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.martani.net/2012/04/twitter-on-windows-phone-vs-twitter-on.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8964007124326996693.post-2067145852838280664</guid><pubDate>Tue, 10 Apr 2012 20:29:00 +0000</pubDate><atom:updated>2012-04-10T22:29:59.875+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">hacking</category><title>Stealing Private Data of Facebook Messenger Users</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;I've received a few moments ago a message prompt on my facebook profile informing me that I can chat with my friends using the all new Facebook Messenger app on Windows. Lovely I said! something exciting should be behind this app.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/-Qea4sphfH3g/T4SW2UVN2kI/AAAAAAAADzk/wrBGXFxPe5s/s1600/fbmessenger.PNG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="400" src="http://1.bp.blogspot.com/-Qea4sphfH3g/T4SW2UVN2kI/AAAAAAAADzk/wrBGXFxPe5s/s400/fbmessenger.PNG" width="136" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Firstly my aim was to see if the app is stealing any data from its users (it turns out that it hashes the username and the mac address of the user to construct a unique identifier but this seems to be of no use after being hashed). After a little playing around, I've found that Facebook Messenger saves the UserID and the AccessToken in a file in the local application directory! Level of protection? facebook!&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;A quick look at the facebook&lt;a href="https://developers.facebook.com/docs/reference/api/" target="_blank"&gt; graph API&lt;/a&gt; shows how easy it is to do whatever you want once you are armed with an AccessToken. Better yet! this application has by nature permissions to read the most&amp;nbsp;sensitive&amp;nbsp;piece of information on facebook, which is users' private messages.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Following are few lines of code that extract the UserId and the AccessToken used by the Facebook Messenger and then send a request to extract the user's favorite books, you can simply replace the &lt;b&gt;&lt;i&gt;fbObject &lt;/i&gt;&lt;/b&gt;variable with the value "&lt;b&gt;&lt;i&gt;Threads&lt;/i&gt;&lt;/b&gt;" to read all the user's private messages!&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;All one needs is access to a victim machine where Facebook Messenger is installed.&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;script src="https://gist.github.com/2354219.js?file=gistfile1.cs"&gt;&lt;/script&gt;&lt;/div&gt;Example of this code running on my machine: &lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-LDltLThil90/T4SW1c3X6xI/AAAAAAAADzc/LfZsaU_9xjA/s1600/Capture.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="193" src="http://2.bp.blogspot.com/-LDltLThil90/T4SW1c3X6xI/AAAAAAAADzc/LfZsaU_9xjA/s320/Capture.PNG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8964007124326996693-2067145852838280664?l=www.martani.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MartaniTechBlog/~4/U8UjmbAnUfs" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/MartaniTechBlog/~3/U8UjmbAnUfs/stealing-private-data-of-facebook.html</link><author>noreply@blogger.com (fakhrou martani)</author><media:thumbnail url="http://1.bp.blogspot.com/-Qea4sphfH3g/T4SW2UVN2kI/AAAAAAAADzk/wrBGXFxPe5s/s72-c/fbmessenger.PNG" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.martani.net/2012/04/stealing-private-data-of-facebook.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8964007124326996693.post-6452324339939424274</guid><pubDate>Mon, 09 Apr 2012 00:00:00 +0000</pubDate><atom:updated>2012-04-09T02:21:22.194+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">android</category><title>Panoramic View of Paris [Xperia Arc S]</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;I've received the &lt;a href="http://www.sonymobile.com/gb/products/phones/xperia-arc-s/" target="_blank"&gt;Xperia™ arc S&lt;/a&gt; yesterday which I love very much. One of the features I like about this phone is the fact that one can take panoramic photos on the fly, and the great HD video shots along with the great screen.&lt;br /&gt;&lt;br /&gt;Here are some shots I took today around Paris, &lt;i&gt;use the mouse to navigate left/right&lt;/i&gt;; enjoy.&lt;br /&gt;(You can view the pics in better dimensions &lt;a href="http://viewat.org/?i=en&amp;amp;id_aut=5891&amp;amp;sec=pn" target="_blank"&gt;here&lt;/a&gt;.)&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;iframe allowfullscreen="" frameborder="0" height="440" scrolling="no" src="http://viewat.org/?i=en&amp;amp;sec=pn_frm&amp;amp;id=Nw1cd5bClnZE" width="600"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;iframe allowfullscreen="" frameborder="0" height="440" scrolling="no" src="http://viewat.org/?sec=pn_frm&amp;amp;id=NentCyWNh03c" width="600"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;iframe allowfullscreen="" frameborder="0" height="440" scrolling="no" src="http://viewat.org/?sec=pn_frm&amp;amp;id=Nu2DmkHhc3vg" width="600"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;iframe allowfullscreen="" frameborder="0" height="440" scrolling="no" src="http://viewat.org/?sec=pn_frm&amp;amp;id=NnUpRWKUMPd8" width="600"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;iframe allowfullscreen="" frameborder="0" height="440" scrolling="no" src="http://viewat.org/?sec=pn_frm&amp;amp;id=NmViGkR2irqI" width="600"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8964007124326996693-6452324339939424274?l=www.martani.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MartaniTechBlog/~4/cRlcLqbLmbo" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/MartaniTechBlog/~3/cRlcLqbLmbo/panoramic-view-of-paris-xperia-arc-s.html</link><author>noreply@blogger.com (fakhrou martani)</author><thr:total>0</thr:total><feedburner:origLink>http://www.martani.net/2012/04/panoramic-view-of-paris-xperia-arc-s.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8964007124326996693.post-2275200500246805979</guid><pubDate>Fri, 02 Mar 2012 02:33:00 +0000</pubDate><atom:updated>2012-03-02T03:37:06.490+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">windows 8</category><title>Workaround to Access Windows 8 Start Menu Programs Again</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;If you have already tried the Windows 8 consumer preview, you have surely noticed that &lt;a href="http://www.theverge.com/microsoft/2012/2/5/2768471/windows-8-start-button-removed-consumer-preview" target="_blank"&gt;there is no start button anymore&lt;/a&gt;, which means no easy way to access your programs using the start menu as we used to do since forever.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-xlSwkN84dw8/T1Ar5O4zKkI/AAAAAAAADqY/943la0wRn0o/s1600/super+bar.PNG" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="121" src="http://3.bp.blogspot.com/-xlSwkN84dw8/T1Ar5O4zKkI/AAAAAAAADqY/943la0wRn0o/s320/super+bar.PNG" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Start Button missing in Windows 8&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;This is impractical since it means: whether you have to put some shortcuts on the desktop, or go to the metro start screen each time hoping to find the application icon there.&lt;br /&gt;&lt;br /&gt;However, you can do a simple trick to access the whole start menu again.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;br /&gt;To do this, right click the Super Bar and choose&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;b&gt; Toolbars -&amp;gt; New toolbar&lt;/b&gt;&lt;/span&gt;. In the dialog, choose the folder&lt;span style="font-family: Verdana, sans-serif;"&gt;&lt;b&gt; C:\ProgramData\Microsoft\Windows\Start Menu\Programs &lt;/b&gt;&lt;/span&gt;and click "Select folder".&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-DGJe2wi-qrY/T1Att1DQ43I/AAAAAAAADqo/x_sbCrbYpLU/s1600/add+toolbar.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="195" src="http://1.bp.blogspot.com/-DGJe2wi-qrY/T1Att1DQ43I/AAAAAAAADqo/x_sbCrbYpLU/s400/add+toolbar.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Once added, you can click the arrows to&amp;nbsp;access&amp;nbsp;the programs and folders of the start menu, you can also drag it to the left so that it takes the start button's original place.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-C1mNgmsh61E/T1AwbXEEL1I/AAAAAAAADrA/oDbAMV6fMMs/s1600/start+menu1.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="352" src="http://3.bp.blogspot.com/-C1mNgmsh61E/T1AwbXEEL1I/AAAAAAAADrA/oDbAMV6fMMs/s640/start+menu1.png" width="580" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Start Menu items without a start button on Windows 8&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;You can also still access some parameters without having to go through the Control Panel shortcuts etc. by hovering over the left bottom corner of the screen and right clicking to get the following menu :&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-60U4XaF_Jg8/T1Avo2NLFPI/AAAAAAAADq4/T6LeWWKrxgc/s1600/params.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://4.bp.blogspot.com/-60U4XaF_Jg8/T1Avo2NLFPI/AAAAAAAADq4/T6LeWWKrxgc/s320/params.png" width="280" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8964007124326996693-2275200500246805979?l=www.martani.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MartaniTechBlog/~4/1sWmNNHww9s" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/MartaniTechBlog/~3/1sWmNNHww9s/workaround-to-access-windows-8-start.html</link><author>noreply@blogger.com (fakhrou martani)</author><media:thumbnail url="http://3.bp.blogspot.com/-xlSwkN84dw8/T1Ar5O4zKkI/AAAAAAAADqY/943la0wRn0o/s72-c/super+bar.PNG" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.martani.net/2012/03/workaround-to-access-windows-8-start.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8964007124326996693.post-3162728756501231603</guid><pubDate>Wed, 08 Feb 2012 23:29:00 +0000</pubDate><atom:updated>2012-02-09T00:40:35.669+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">rsa</category><category domain="http://www.blogger.com/atom/ns#">cryptography</category><category domain="http://www.blogger.com/atom/ns#">integer factorization</category><title>Factoring Large Numbers With Distributed Quadratic Sieve</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div style="text-align: justify;"&gt;Integer&amp;nbsp;factorization&amp;nbsp;is a problem that has its roots in the very far history, it is a fascinating problem (to me especially) that has gained a lot of attention in the recent years for cracking the &lt;i&gt;RSA&lt;/i&gt; cryptosystem for example.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;While having no time to blog about the internals of one of the very&amp;nbsp;efficient&amp;nbsp;methods to factorize relatively large numbers, I present here a simple implementation I have&amp;nbsp;developed&amp;nbsp;of the &lt;a href="http://en.wikipedia.org/wiki/Quadratic_sieve" target="_blank"&gt;Quadratic Sieve&lt;/a&gt; to factorize relatively big RSA numbers. For a reference about the mathematical premises, the 6th chapter&amp;nbsp;entitled&amp;nbsp;&lt;i&gt;&lt;b&gt;&lt;a href="http://www.springerlink.com/content/pu0172kr11x61684/" target="_blank"&gt;Subexponential Factoring Algorithms&lt;/a&gt;&lt;/b&gt;&lt;/i&gt;&amp;nbsp;of the&amp;nbsp;&lt;i&gt;&lt;b&gt;Prime Numbers, A Computational Perspective&lt;/b&gt;&lt;/i&gt; book is pretty great.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The &lt;a href="https://github.com/martani/Quadratic-Sieve" target="_blank"&gt;program available here&lt;/a&gt; is composed of 4 different versions, 3&amp;nbsp;centralized (sequential)&amp;nbsp;and 1 distributed using &lt;i&gt;MPI&lt;/i&gt;. The distributed version needs to be run on at least 2 nodes. The centralized versions consist of different implementation experiments :&amp;nbsp;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="https://github.com/martani/Quadratic-Sieve/blob/master/qs_exponent_vector.c" target="_blank"&gt;The first one&lt;/a&gt; keeps the&amp;nbsp;exponent&amp;nbsp;vector of each smooth number (impractical due to the huge memory needed to keep the vectors).&lt;/li&gt;&lt;li&gt;&lt;a href="https://github.com/martani/Quadratic-Sieve/blob/master/qs_center_n.c" target="_blank"&gt;The second one&lt;/a&gt; sieves at an interval centralized at &lt;i&gt;&lt;b&gt;sqrt(N)&lt;/b&gt;&lt;/i&gt;; according to my testing, this has no visible improvements over the standard one.&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;a href="https://github.com/martani/Quadratic-Sieve/blob/master/qs.c" target="_blank"&gt;The last version&lt;/a&gt; which is the same as the first one but which uses only a binary&amp;nbsp;exponent&amp;nbsp;vector (saving one bit for each prime in the base) for the smooth numbers.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;One of the caveats of this implementation is the linear algebra step that performs the Gaussian elimination. The method I am using is the most naive one (though goes pretty fast using &lt;i&gt;XOR&lt;/i&gt; operations on &lt;i&gt;GMP&lt;/i&gt; integers) which keeps an &lt;i&gt;identity matrix&lt;/i&gt; besides the&amp;nbsp;effective&amp;nbsp;matrix while performing the Gaussian elimination, and hence the&amp;nbsp;program&amp;nbsp;needs twice the memory needed for the matrix.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;a href="https://github.com/martani/Quadratic-Sieve/blob/master/qs_distributed.c" target="_blank"&gt;The distributed version&lt;/a&gt; spawns as many nodes as needed and makes them all perform the sieving step, after some very&amp;nbsp;hundreds&amp;nbsp;of thousands of steps, the slaves communicate their found smooth numbers to the master which decides if they must stop or should continue sieving for more numbers. Sending &lt;i&gt;GMP&lt;/i&gt; integers &lt;i&gt;&lt;b&gt;mpz_t &lt;/b&gt;&lt;/i&gt;over &lt;i&gt;MPI&lt;/i&gt; was very challenging due to the way &lt;i&gt;MPI&lt;/i&gt; handles the string representation of these numbers (sometimes &lt;i&gt;'\0'&lt;/i&gt; are included at the end and the length returned does not represent&amp;nbsp;exactly&amp;nbsp;the number of characters in the string). &amp;nbsp;You can take a look at the functions doing the &lt;i&gt;MPI&lt;/i&gt; send/receive&amp;nbsp;of &lt;i&gt;&lt;b&gt;mpz_t&lt;/b&gt;&lt;/i&gt; &lt;a href="https://github.com/martani/Quadratic-Sieve/blob/master/gmp_mpi_lib.c" target="_blank"&gt;here&lt;/a&gt;.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;You will need the &lt;a href="http://www.mpfr.org/" target="_blank"&gt;mpfr&lt;/a&gt; library too (for logarithm calculations) in case you want to test the programs, for the distributed version, compile with &lt;i&gt;mpicc&lt;/i&gt; and run with &lt;i&gt;mpirun&lt;/i&gt; as usual.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size: large;"&gt;&lt;i&gt;Results:&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;i&gt;Centralized version:&lt;/i&gt;&lt;/div&gt;&lt;script src="https://gist.github.com/1775353.js?file=qs_cent.sh"&gt;&lt;/script&gt;&lt;i&gt; Distributed version (60 intel i7 nodes): &lt;/i&gt;&lt;script src="https://gist.github.com/1775391.js?file=qs.sh"&gt;&lt;/script&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8964007124326996693-3162728756501231603?l=www.martani.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MartaniTechBlog/~4/g3jIlarUvSQ" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/MartaniTechBlog/~3/g3jIlarUvSQ/factoring-large-numbers-with.html</link><author>noreply@blogger.com (fakhrou martani)</author><thr:total>0</thr:total><feedburner:origLink>http://www.martani.net/2012/02/factoring-large-numbers-with.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8964007124326996693.post-6734341120225685138</guid><pubDate>Wed, 21 Dec 2011 00:31:00 +0000</pubDate><atom:updated>2011-12-21T01:41:17.127+01:00</atom:updated><title>Factoring Integers: Part 1 - Pollard's rho Method</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;I'll be developing a program for factoring numbers (especially&amp;nbsp;RSA numbers), the goal is to have a parallel quadratic&amp;nbsp;sieve&amp;nbsp;program running on GPUs (using CUDA or OpenCL) to factorize RSA numbers.&lt;br /&gt;&lt;br /&gt;I have just started playing around &lt;a href="http://gmplib.org/" target="_blank"&gt;GMP&lt;/a&gt; so I implemented a naive version (in C) of the &lt;a href="http://en.wikipedia.org/wiki/Pollard's_rho_algorithm" target="_blank"&gt;Pollard's rho&lt;/a&gt; factoring method, it uses the &lt;a href="http://en.wikipedia.org/wiki/Pollard's_rho_algorithm#Variants" target="_blank"&gt;optimisation technique&lt;/a&gt; proposed by Pollard and Brent, however it doesn't check for cases that may cause the algorithm to fail.&lt;br /&gt;&lt;br /&gt;In order to compile this program, you need to have GMP installed.&lt;br /&gt;You can invoke the program with&amp;nbsp;&lt;i&gt;&lt;b&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;./pollard-rho&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt; NUMBER&lt;/span&gt;&lt;/b&gt;&lt;/i&gt; or&amp;nbsp;&lt;b&gt;&lt;i&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;./pollard-rho p q&lt;/span&gt; &lt;/i&gt;&lt;/b&gt;where the number to factorize is &lt;i&gt;&lt;b&gt;p*q&lt;/b&gt;&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;Compile :&amp;nbsp;&lt;i&gt;&lt;b&gt;gcc pollard-rho.c -o pollard-rho -lgmp -lm&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;b&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;script src="https://gist.github.com/1503934.js?file=pollard-rho.c"&gt;&lt;/script&gt; Results:&lt;br /&gt;&lt;script src="https://gist.github.com/1503951.js?file=gistfile1.sh"&gt;&lt;/script&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8964007124326996693-6734341120225685138?l=www.martani.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MartaniTechBlog/~4/V51iYs6-q98" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/MartaniTechBlog/~3/V51iYs6-q98/factoring-integers-part-1-pollards-rho.html</link><author>noreply@blogger.com (fakhrou martani)</author><thr:total>0</thr:total><feedburner:origLink>http://www.martani.net/2011/12/factoring-integers-part-1-pollards-rho.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8964007124326996693.post-1304674605421941930</guid><pubDate>Sat, 08 Oct 2011 12:39:00 +0000</pubDate><atom:updated>2011-10-08T14:39:55.593+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">windows phone 7</category><category domain="http://www.blogger.com/atom/ns#">wp7</category><title>Rolling Back a Project to Windows Phone OS 7.0 After an Upgrade to 7.1 (Mango)</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;If you had a project that was developed before the Mango SDK was available, or a project that was created with the Windows Phone 7.0 as the target platform and wanted to upgrade to 7.1, then there is no way to roll back to 7.0 again, which means that your app will be available only for those who have Mango updated devices.&lt;br /&gt;&lt;br /&gt;On creating a new Windows Phone project with the Mango 7.1 SDK tools installed, Visual Studio prompts you for the target platform:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-I_4RL8SwU-M/TpBCELp_jDI/AAAAAAAADCM/cWz6zKWryIU/s1600/os.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="188" src="http://4.bp.blogspot.com/-I_4RL8SwU-M/TpBCELp_jDI/AAAAAAAADCM/cWz6zKWryIU/s400/os.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;If for any reason, you want to upgrade the app to take advantage of the 7.1 SDK (use background agents, live tiles' animations etc..), you go to &lt;b&gt;&lt;i&gt;Project -&amp;gt; Project properties&lt;/i&gt;&lt;/b&gt; and set the target to OS7.1:&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-tWIfH4UeoKc/TpBCdWsOlqI/AAAAAAAADCQ/jzEfoI_6rlE/s1600/os2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="217" src="http://4.bp.blogspot.com/-tWIfH4UeoKc/TpBCdWsOlqI/AAAAAAAADCQ/jzEfoI_6rlE/s400/os2.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Once the Windows Phone OS7.1 version is selected, Visual Studio shows the following warning stating that once upgraded, the application cannot roll back to Windows Phone OS 7.0 anymore :&lt;/div&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-numLiIFV8hY/TpBCtNWet1I/AAAAAAAADCU/d846NKGeMY8/s1600/upgrade+warning.PNG" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="237" src="http://1.bp.blogspot.com/-numLiIFV8hY/TpBCtNWet1I/AAAAAAAADCU/d846NKGeMY8/s400/upgrade+warning.PNG" width="400" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;Because the referenced projects are not upgraded with the app, there is actually a way to roll back anyways, even if Visual Studio warns it is not possible.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;First in the &lt;b&gt;&lt;i&gt;WPAppManifest.xml&lt;/i&gt; &lt;/b&gt;you need to change the&amp;nbsp;&lt;i&gt;&lt;b&gt;AppPlatformVersion &lt;/b&gt;&lt;/i&gt;back to &lt;i&gt;&lt;b&gt;"7.0"&lt;/b&gt;&lt;/i&gt;. Then unload the project from Visual Studio and open your &lt;i&gt;&lt;b&gt;*.csproj&lt;/b&gt;&lt;/i&gt; with a text editor. Locate&amp;nbsp;&lt;i&gt;&lt;b&gt;&amp;lt;TargetFrameworkProfile&amp;gt;WindowsPhone71&amp;lt;/TargetFrameworkProfile&amp;gt;&lt;/b&gt;&lt;/i&gt; and change it to&amp;nbsp;&lt;i&gt;&lt;b&gt;&amp;lt;TargetFrameworkProfile&amp;gt;WindowsPhone&amp;lt;/TargetFrameworkProfile&amp;gt;&lt;/b&gt;&lt;/i&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Reload the project in Visual Studio, and voila, it's back to version 7.0.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Hope this helps.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8964007124326996693-1304674605421941930?l=www.martani.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MartaniTechBlog/~4/8ivOpOqEGC8" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/MartaniTechBlog/~3/8ivOpOqEGC8/rolling-back-project-to-windows-phone.html</link><author>noreply@blogger.com (fakhrou martani)</author><media:thumbnail url="http://4.bp.blogspot.com/-I_4RL8SwU-M/TpBCELp_jDI/AAAAAAAADCM/cWz6zKWryIU/s72-c/os.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.martani.net/2011/10/rolling-back-project-to-windows-phone.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8964007124326996693.post-5881746151765117632</guid><pubDate>Fri, 23 Sep 2011 20:53:00 +0000</pubDate><atom:updated>2011-09-23T22:54:12.724+02:00</atom:updated><title>Bloginto 2.1 Now Available</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Bloginto 2.1 is available for download from the &lt;a href="https://chrome.google.com/webstore/detail/jppmcmbnmodlmgbfdddmeopgagancoak?hc=search&amp;amp;hcp=main"&gt;Google Chrome Web Store&lt;/a&gt;, the 2.1 version is a patch to the 2.0 version after the (abrupt) changes of Bloginy Algeria.&lt;br /&gt;&lt;br /&gt;Bloginto is a Chrome extension that brings Bloginy Algeria and Morocco feeds to the browser. With Bloginto you can:&lt;br /&gt;&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;Read the live feeds of Bloginy Algeria and Morocco&lt;/li&gt;&lt;li&gt;Keep track of the new feeds and get notified whenever newer news are available&lt;/li&gt;&lt;li&gt;Keep track of the read and unread feed entries&lt;/li&gt;&lt;li&gt;Vote for the feed entries directly from the browser with 1 mouse click&lt;/li&gt;&lt;li&gt;Tweet directly through the extension&lt;/li&gt;&lt;/ul&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-OafXHLpK0Bg/Tnzxv4eBm5I/AAAAAAAAC7A/qlZ446Twi08/s1600/Untitled.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://2.bp.blogspot.com/-OafXHLpK0Bg/Tnzxv4eBm5I/AAAAAAAAC7A/qlZ446Twi08/s400/Untitled.png" width="285" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Bloginto is an open source extension, you can grab the source code from here&amp;nbsp;&lt;a href="https://github.com/martani/BlogInto-Chrome"&gt;https://github.com/martani/BlogInto-Chrome&lt;/a&gt;, you can suggest&amp;nbsp;amelioration&amp;nbsp;and patches too.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8964007124326996693-5881746151765117632?l=www.martani.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MartaniTechBlog/~4/0fSBzjER4_w" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/MartaniTechBlog/~3/0fSBzjER4_w/bloginto-21-now-available.html</link><author>noreply@blogger.com (fakhrou martani)</author><media:thumbnail url="http://2.bp.blogspot.com/-OafXHLpK0Bg/Tnzxv4eBm5I/AAAAAAAAC7A/qlZ446Twi08/s72-c/Untitled.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.martani.net/2011/09/bloginto-21-now-available.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8964007124326996693.post-3785103340686965362</guid><pubDate>Wed, 21 Sep 2011 02:00:00 +0000</pubDate><atom:updated>2011-09-21T04:02:54.856+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Security</category><category domain="http://www.blogger.com/atom/ns#">wp7</category><title>Mass Spamming WP7 Users by Taking Advantage of the Chrome to WP7 App</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Send to WP7 (previously Chrome to WP7) is an app on Windows Phone 7 that allows users to send text, web links, images etc. to their WP7 handsets directly from the browser. It resembles in it's purpose Google's Chrome to Phone utility, however, its security model is way poorer, and even insecure by default.&lt;br /&gt;&lt;br /&gt;While Google Chrome to Phone uses OAuth to authenticate users along with their Google accounts, Send to WP7 generates a 6 chars hex number which is calculated from a random GUID generated when the app is started for the first time. This code is then used by the&amp;nbsp;extension&amp;nbsp;to send data back to&amp;nbsp;&lt;i&gt;daveamenta.com&lt;/i&gt; server, waiting to be served when the WP7 client fetches the updates.&lt;br /&gt;&lt;br /&gt;Since there is absolutely no validation process on the server and the design of the app that makes it impossible to verify who is sending to who depending only on the randomly generated code, abusing this app is just like taking a walk on the shore.&lt;br /&gt;&lt;br /&gt;Sending data to a WP7 device is done by a POST request to&amp;nbsp;&lt;i&gt;&lt;a href="http://draft.blogger.com/#"&gt;http://www.daveamenta.com/wp7api/com.davux.ChromeToWindowsPhone/ &lt;/a&gt;&lt;/i&gt; with the random code of the user as the only piece identifying him.&lt;br /&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: x-small;"&gt;&lt;b&gt;Request URL&lt;/b&gt;: http://www.daveamenta.com/wp7api/com.davux.ChromeToWindowsPhone/&lt;br /&gt; &lt;b&gt;Request Method&lt;/b&gt;: &amp;nbsp;POST&lt;br /&gt; &lt;b&gt;Query String Parameters&lt;/b&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;title&lt;/b&gt;: some title&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;url&lt;/b&gt;: http://martani.net&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;b&gt;sel&lt;/b&gt;:&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;b&gt;type&lt;/b&gt;: page&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;b&gt;passcode&lt;/b&gt;: ABCDEF&lt;/span&gt;&lt;/blockquote&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;The server th&lt;/span&gt;&lt;span class="Apple-style-span" style="white-space: pre-wrap;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;en returns &lt;i&gt;"Client Not Found.  Check Pair Code."&lt;/i&gt; if the code used is not &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="white-space: pre-wrap;"&gt;associated&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-style-span" style="white-space: pre-wrap;"&gt; to any device, or &lt;i&gt;"OK - No notification"&lt;/i&gt; upon success. Using these information, we can run a large scale "&lt;i&gt;empty message&lt;/i&gt;" spamming to retrieve the valid codes associated to actual devices, or send a wave of spams directly without having to check for validity.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Theoretically, there are over 16777216 different available codes for a 6 char hex number, a naive method would be to iterate through all these and fetch the correct ones:&lt;br /&gt;&lt;br /&gt;&lt;script src="https://gist.github.com/1230963.js?file=gistfile1.cs"&gt;&lt;/script&gt;This above program would do -a very lengthy- sequential&amp;nbsp;probing&amp;nbsp;to check for all the codes that return &lt;i&gt;"OK"&lt;/i&gt; in the response and list them on the console.&lt;br /&gt;&lt;br /&gt;As you can see, you can send any message and even links to your apps on the WP7 Marketplace (which once clicked would open the Marketplace directly) to all the users of "Send to WP7", and of course retain their codes for future spamming eventually.&lt;br /&gt;&lt;br /&gt;On the other hand, it is not clear how the data users exchange with their devices is handled. Does it get archived in the server forever? Does a deletion from the WP7 client entail a deletion from the server etc. I believe users of this app should get answers of all these questions and of course must expect a minimum of security where only them could eventually send data to their phones.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;//I cannot be held responsible for any abusive use of information I present here, this post is&amp;nbsp;merely&amp;nbsp;a showcase of bad security design.&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8964007124326996693-3785103340686965362?l=www.martani.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MartaniTechBlog/~4/AMULKZ5HorE" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/MartaniTechBlog/~3/AMULKZ5HorE/mass-spamming-wp7-users-by-taking.html</link><author>noreply@blogger.com (fakhrou martani)</author><thr:total>0</thr:total><feedburner:origLink>http://www.martani.net/2011/09/mass-spamming-wp7-users-by-taking.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8964007124326996693.post-4057567530478946051</guid><pubDate>Wed, 03 Aug 2011 13:59:00 +0000</pubDate><atom:updated>2011-08-11T14:12:03.348+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">skype</category><category domain="http://www.blogger.com/atom/ns#">XSS</category><category domain="http://www.blogger.com/atom/ns#">hacking</category><title>Skype XSS Made Easy</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;I was so deprived of&amp;nbsp;caffeine&amp;nbsp;today so I couldn't do any work except erring in the dark sides of the internet till I got to the skype home page. Once there, the first thing I tried was of course some XSS injection, that's just a 'weby' thing, I can't help it.&lt;br /&gt;&lt;br /&gt;I was amused to see that after 3 characters, the skype home page started to show beatiful html code where it should not, a very good sign for an XSS injection.&lt;br /&gt;&lt;br /&gt;Here you go, on the home page, locate the "See how little it costs to call phones and mobiles with Skype" search box and type &lt;b style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;-"&amp;amp;gt;&lt;/span&gt; &lt;/b&gt;,&amp;nbsp;you should get something like this :&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-kT-xqmN99pg/TjlTlLMcEmI/AAAAAAAAC4c/Z9aBg1WYmAA/s1600/Screenshot-1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="110" src="http://3.bp.blogspot.com/-kT-xqmN99pg/TjlTlLMcEmI/AAAAAAAAC4c/Z9aBg1WYmAA/s400/Screenshot-1.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Now type in your favorite XSS verse, I use &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;&amp;amp;lt; script &amp;amp;gt; alert(document.cookie) &amp;amp;lt; /script &amp;amp;gt;&lt;/b&gt;&lt;/span&gt;, Voilà! the result:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-Z-6ZHPZ6ku4/TjlTqSQqn7I/AAAAAAAAC4g/JFiIYQtMda8/s1600/Screenshot-2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="281" src="http://1.bp.blogspot.com/-Z-6ZHPZ6ku4/TjlTqSQqn7I/AAAAAAAAC4g/JFiIYQtMda8/s400/Screenshot-2.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8964007124326996693-4057567530478946051?l=www.martani.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MartaniTechBlog/~4/fxswS0TFNXU" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/MartaniTechBlog/~3/fxswS0TFNXU/skype-xss-made-easy.html</link><author>noreply@blogger.com (fakhrou martani)</author><media:thumbnail url="http://3.bp.blogspot.com/-kT-xqmN99pg/TjlTlLMcEmI/AAAAAAAAC4c/Z9aBg1WYmAA/s72-c/Screenshot-1.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.martani.net/2011/08/skype-xss-made-easy.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8964007124326996693.post-8847016354574167671</guid><pubDate>Tue, 26 Jul 2011 18:08:00 +0000</pubDate><atom:updated>2011-07-26T20:16:16.531+02:00</atom:updated><title>nanosleep(), usleep() and sleep() Precision Tests</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Working on some Amazon EC2 benchmarks I run through few problems of having my processes to run with a high time precision where a more than 1ms shift between operations is not acceptable.&lt;br /&gt;&lt;br /&gt;My program accumulates work time and sleep time,&amp;nbsp;ideally, it would work for &lt;b&gt;&lt;i&gt;time t&lt;/i&gt;&lt;/b&gt;, sleeps for &lt;b&gt;&lt;i&gt;T - t microseconds&lt;/i&gt;&lt;/b&gt; and loop again. The problem is that in the sleep routine, a shift of few microseconds can be accumulated to become a shift of milliseconds after few loops.&lt;br /&gt;&lt;br /&gt;After investigating the problem a little, I did some tests on how precise are the sleep functions in C, here is the code I used to test &lt;i&gt;nanosleep()&lt;/i&gt;, &lt;i&gt;usleep()&lt;/i&gt; and &lt;i&gt;sleep()&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;&lt;script src="https://gist.github.com/1107330.js"&gt;  &lt;/script&gt;&lt;br /&gt;&lt;br /&gt;Running these tests on my machine with Fedora 15 gives me these results :&lt;br /&gt;&lt;br /&gt;&lt;script src="https://gist.github.com/1107347.js"&gt;  &lt;/script&gt;&lt;br /&gt;As you can see, there is always an overhead of 100µs to 180µs, a call to &lt;b&gt;&lt;i&gt;printf&lt;/i&gt;&lt;/b&gt; inside the function will take about 70&amp;nbsp;µs more to execute. The call to the function itself (the &lt;i&gt;nsleep&lt;/i&gt; function) takes at worst 1µs. With this accumulation of &amp;nbsp;microseconds, a program would get to a state where it is late by some milliseconds after a dozen of iterations and calls to these sleep functions.&lt;br /&gt;&lt;br /&gt;On the other side &lt;i&gt;gettimeofday()&lt;/i&gt; behaves pretty well considering precision, the&amp;nbsp;benchmark below&amp;nbsp;(found &lt;a href="http://stackoverflow.com/questions/6498972/faster-equivalent-of-gettimeofday/6499061#6499061"&gt;here&lt;/a&gt;) gives the following results:&lt;br /&gt;&lt;script src="https://gist.github.com/1107371.js"&gt;  &lt;/script&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;$ ./gettimeofday_benchmark&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;50000000 cycles in 2315879542 ns = 46.317591 ns/cycle&lt;/span&gt;&lt;/blockquote&gt;Which is satisfying for its precision.&lt;br /&gt;&lt;br /&gt;A solution (that is not applicable in all cases) is to have a global program independent clock regarding to which the sleep period is adapted. For example instead of waiting &lt;b&gt;&lt;i&gt;T - t&lt;/i&gt;&lt;/b&gt; microseconds, one will use every second tick on the system as a landmark, and thus any microseconds lost in the last loop iteration are discarded in the next one since the wait time is not dependent on the time the loop has started.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8964007124326996693-8847016354574167671?l=www.martani.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MartaniTechBlog/~4/2S5MUtiRQf0" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/MartaniTechBlog/~3/2S5MUtiRQf0/nanosleep-usleep-and-sleep-precision.html</link><author>noreply@blogger.com (fakhrou martani)</author><thr:total>0</thr:total><feedburner:origLink>http://www.martani.net/2011/07/nanosleep-usleep-and-sleep-precision.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8964007124326996693.post-422602423936663316</guid><pubDate>Mon, 25 Jul 2011 21:29:00 +0000</pubDate><atom:updated>2011-07-25T23:35:18.233+02:00</atom:updated><title>"How To Win A Nobel Prize In 2 Easy Steps"</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;i&gt;"3 types of social media douchebaggery strategies to become the next Zuckerberg"&lt;/i&gt;, "&lt;i&gt;5 best cats videos EVAR"&lt;/i&gt;, "&lt;i&gt;how to win a Nobel prize in 2 easy steps"&lt;/i&gt;, "&lt;i&gt;3 things that shift you from a panhandler to the next most famous&amp;nbsp;billionaire&amp;nbsp;(hint: retweet this post.)"&lt;/i&gt; and so on...&lt;br /&gt;&lt;br /&gt;&lt;div&gt;The internet has been suffering from this type of article-bullying with the wake of social media&amp;nbsp;evangelist-community-manager-douchebags and such, the title incites you to read the content-empty article because it makes you feel that you can acquire information more quickly.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Short story, everything in the form:&amp;nbsp;&lt;/div&gt;&lt;div style="text-align: center;"&gt;[&lt;b&gt;&lt;i&gt;Number&lt;/i&gt;&lt;/b&gt;][&lt;b&gt;&lt;i&gt;Adjective&lt;/i&gt;&lt;/b&gt;][&lt;b&gt;&lt;i&gt;Noun&lt;/i&gt;&lt;/b&gt;] [&lt;b&gt;&lt;i&gt;Verb&lt;/i&gt;&lt;/b&gt;] [&lt;b&gt;&lt;i&gt;Noun&lt;/i&gt;&lt;/b&gt;..]&amp;nbsp;&lt;/div&gt;&lt;div&gt;or&amp;nbsp;&lt;/div&gt;&lt;div style="text-align: center;"&gt;[&lt;b&gt;&lt;i&gt;Number&lt;/i&gt;&lt;/b&gt;] [&lt;b&gt;&lt;i&gt;Easy&lt;/i&gt;&lt;/b&gt; | &lt;b&gt;&lt;i&gt;Awesome&lt;/i&gt;&lt;/b&gt; | &lt;b&gt;&lt;i&gt;Quick&lt;/i&gt;&lt;/b&gt; | &lt;b&gt;&lt;i&gt;Short&lt;/i&gt;&lt;/b&gt;] &lt;b&gt;steps&lt;/b&gt; &lt;b&gt;to&lt;/b&gt; [&lt;b&gt;&lt;i&gt;Verb&lt;/i&gt;&lt;/b&gt;] [&lt;b&gt;&lt;i&gt;Noun&lt;/i&gt;&lt;/b&gt;..]&amp;nbsp;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;needs to be flagged as&amp;nbsp;spammy fake ads for gaining easy visits.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://draft.blogger.com/#" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="330" id=":current_picnik_image" src="http://4.bp.blogspot.com/-EReu7ycQ9Ag/Ti3effXiW4I/AAAAAAAAC3c/JiR42hOSD04/s400/Screenshot1.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8964007124326996693-422602423936663316?l=www.martani.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MartaniTechBlog/~4/B0m39AFdY9Y" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/MartaniTechBlog/~3/B0m39AFdY9Y/how-to-win-nobel-prize-in-2-easy-steps.html</link><author>noreply@blogger.com (fakhrou martani)</author><media:thumbnail url="http://4.bp.blogspot.com/-EReu7ycQ9Ag/Ti3effXiW4I/AAAAAAAAC3c/JiR42hOSD04/s72-c/Screenshot1.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.martani.net/2011/07/how-to-win-nobel-prize-in-2-easy-steps.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8964007124326996693.post-6955759036775321601</guid><pubDate>Mon, 27 Jun 2011 09:42:00 +0000</pubDate><atom:updated>2011-06-27T12:48:20.665+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">windows phone 7</category><category domain="http://www.blogger.com/atom/ns#">wp7</category><title>NYTimes Newsreader and LeParisien Journal for #WP7</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;I've developped lately two new Windows Phone apps which are newsreaders based on RSS for the New York Times newspaper and LeParisien.fr Journal.&lt;br /&gt;&lt;br /&gt;The two apps come in two versions,a free version which is ad-powered and a paid version which is ad-free. Following is a brief description and download links for the two apps.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;NY Times Newsreader :&lt;/h3&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', tahoma, sans-serif; font-size: 15px; line-height: 17px;"&gt;&lt;span class="Apple-style-span" style="color: #444444;"&gt;Read the NY Times newspaper directly on your Windows Phone device.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #444444; font-family: 'Segoe UI', tahoma, sans-serif; font-size: 15px; line-height: 17px;"&gt; &lt;br /&gt;The NYTimes Newsreader gives you access to all the major sections of the NY Times newspaper organized in categories for easy and fast navigation with full articles view using the NYTimes' RSS feature.&lt;br /&gt;&lt;br /&gt;Features:&lt;br /&gt;- Browse news by categories (7 categories and more than 40 sections)&lt;br /&gt;- Front page news&lt;br /&gt;- Articles thumbnails&lt;br /&gt;- Share articles by email and SMS&lt;br /&gt;- Favorite your articles to read them later&lt;br /&gt;- Read full articles directly from NYTimes Newsreader&lt;br /&gt;&lt;br /&gt;Categories:&lt;br /&gt;- World&lt;br /&gt;- Op-Extra (Opinion, Columnists, Editorials, Magazine ...)&lt;br /&gt;- Technology&lt;br /&gt;- Science&lt;br /&gt;- Sports&lt;br /&gt;- Arts&lt;br /&gt;- Business&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;img border="0" height="320" id=":current_picnik_image" src="http://2.bp.blogspot.com/-t-zV9oRva_g/TghMf09RP3I/AAAAAAAACrI/tFm10Q1xICw/s320/1.png" style="display: inline;" width="180" /&gt;&amp;nbsp;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/-2WS_4mr5rdM/TghMgVjqm_I/AAAAAAAACrM/zHoZ0aXFed0/s320/3.png" style="display: inline;" width="180" /&gt;&amp;nbsp;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/-sBSFKbElGh4/TghMg3zK6PI/AAAAAAAACrQ/pn4VX3mHT3Y/s320/4.png" style="display: inline;" width="180" /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;Download (FREE version)&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="zune://navigate?phoneAppID=7a872daa-7293-e011-986b-78e7d1fa76f8" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_MIqc395dv38/TXuNyPozngI/AAAAAAAACns/Xh3fADXiGgw/wp7_English_278x92_blue%5B3%5D.png?imgmax=800" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: 19px; font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: 19px; font-weight: bold;"&gt;LeParisien :&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #666666; font-family: 'Segoe UI', tahoma, sans-serif; font-size: 15px; line-height: 17px;"&gt;Suivez toute l'actualité française et internationale avec LeParisien.fr Journal sur votre Windows Phone&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #666666; font-family: 'Segoe UI', tahoma, sans-serif; font-size: 15px; line-height: 17px;"&gt; &lt;br /&gt;Accédez à l’intégralité des articles de leParisien.fr classés par rubrique (5 rubriques et plus de 30 catégories)&lt;br /&gt;&lt;br /&gt;&amp;gt; Sauvegardez vos articles favoris pour une consultation ultérieure&lt;br /&gt;&amp;gt; Partagez l’information avec vos amis via Email ou SMS&lt;br /&gt;&lt;br /&gt;Accédez en un clic aux dernières news :&lt;br /&gt;- L'info du Parisien&lt;br /&gt;* Politique&lt;br /&gt;* International&lt;br /&gt;* Faits divers&lt;br /&gt;* Economie&lt;br /&gt;* Société&lt;br /&gt;* Loisirs et spectacles&lt;br /&gt;* Médias et people&lt;br /&gt;* Automobile&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;img border="0" height="320" src="http://3.bp.blogspot.com/-GUcDH9qFJwA/TghOSYcOhfI/AAAAAAAACrU/P1SkvESGENk/s320/1.png" style="display: inline;" width="180" /&gt;&amp;nbsp;&lt;img border="0" height="320" src="http://2.bp.blogspot.com/-QHK3-uzxkyI/TghOS_3p1WI/AAAAAAAACrY/HvukXb_zdHM/s320/3.png" style="display: inline;" width="180" /&gt;&amp;nbsp;&lt;img border="0" height="320" src="http://4.bp.blogspot.com/-Nn5B_ZlInmE/TghOTNl1gqI/AAAAAAAACrc/cD-kP8Jw7d8/s320/4.png" style="display: inline;" width="180" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;Download (FREE version)&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="zune://navigate?phoneAppID=aed8d599-dc96-e011-986b-78e7d1fa76f8" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_MIqc395dv38/TXuNyPozngI/AAAAAAAACns/Xh3fADXiGgw/wp7_English_278x92_blue%5B3%5D.png?imgmax=800" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8964007124326996693-6955759036775321601?l=www.martani.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MartaniTechBlog/~4/HJ_n5yKC7s0" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/MartaniTechBlog/~3/HJ_n5yKC7s0/nytimes-newsreader-and-leparisien.html</link><author>noreply@blogger.com (fakhrou martani)</author><media:thumbnail url="http://2.bp.blogspot.com/-t-zV9oRva_g/TghMf09RP3I/AAAAAAAACrI/tFm10Q1xICw/s72-c/1.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.martani.net/2011/06/nytimes-newsreader-and-leparisien.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8964007124326996693.post-4868256270725286665</guid><pubDate>Sun, 08 May 2011 12:38:00 +0000</pubDate><atom:updated>2011-05-08T14:38:11.162+02:00</atom:updated><title>Beta SMS 2.0 Now Available On Windows Phone 7</title><description>&lt;p align="justify"&gt;Beta SMS 2.0 is now available on the Windows Phone 7 Market place with a lot of enhancements and new features.&lt;/p&gt; &lt;p align="justify"&gt;Beta SMS lets you send very cheap and even free^ short text messages internationally by using your favorite web SMS or VoIP provider. It offers a very intuitive way to send SMS directly from your Windows Phone, without having to log into your provider's website each time you want to send an SMS.&lt;/p&gt; &lt;p align="justify"&gt;&lt;font size="5"&gt;Features&lt;/font&gt;&lt;br&gt;&lt;br&gt;- SMS History&lt;br&gt;- Contacts support&lt;br&gt;- Balance check on all the supported services&lt;br&gt;- Managing and sending SMS from multiple providers at the same time&lt;br&gt;- Switch between multiple account in one tap&lt;br&gt;- A beautiful user interface that looks and feels like the native WP7 SMS app.&lt;br&gt;&lt;/p&gt;&lt;font size="5"&gt;&lt;/font&gt; &lt;p&gt;&lt;font size="5"&gt;Supported services&lt;/font&gt;&lt;br&gt;&lt;br&gt;In order to user Beta SMS, you need an account with one of the following providers:&lt;br&gt;&lt;br&gt;- &lt;strong&gt;SMS Global&lt;/strong&gt;&lt;br&gt;- &lt;strong&gt;Cherry-SMS&lt;br&gt;&lt;/strong&gt;- &lt;strong&gt;Sloono&lt;/strong&gt;&lt;br&gt;- 12voip.com&lt;br&gt;- Actionvoip.com&lt;br&gt;- Calleasy.com&lt;br&gt;- Cheapvoip.com&lt;br&gt;- Dialnow.com&lt;br&gt;- Freecall.com&lt;br&gt;- Internetcalls.com&lt;br&gt;- Intervoip.com&lt;br&gt;- Justvoip.com&lt;br&gt;- Lowratevoip.com&lt;br&gt;- Netappel.fr&lt;br&gt;- Nonoh.net&lt;br&gt;- Poivy.com&lt;br&gt;- Powervoip.com&lt;br&gt;- Rynga.com&lt;br&gt;- Sipdiscount.com&lt;br&gt;- Smartvoip.com&lt;br&gt;- Smsdiscount.com&lt;br&gt;- Smslisto.com&lt;br&gt;- Sparvoip.de&lt;br&gt;- Voipbuster.com&lt;br&gt;- Voipbusterpro.com&lt;br&gt;- Voipcheap.co.uk&lt;br&gt;- Voipcheap.com&lt;br&gt;- Voipdiscount.com&lt;br&gt;- Voipgain.com&lt;br&gt;- Voipraider.com&lt;br&gt;- Voipstunt.com&lt;br&gt;- Voipwise.com&lt;br&gt;- Voipzoom.com&lt;br&gt;- Webcalldirect.com&lt;/p&gt; &lt;p&gt;&lt;br&gt;If your favorite service is not supported yet by Beta SMS, please request it here.&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh4.ggpht.com/_MIqc395dv38/TcaOnfrkuRI/AAAAAAAACo8/YI9p5xzL4b8/s1600-h/s1%5B5%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="s1" border="0" alt="s1" src="http://lh5.ggpht.com/_MIqc395dv38/TcaOnwHjFHI/AAAAAAAACpA/iHtvUhKEgMk/s1_thumb%5B1%5D.png?imgmax=800" width="148" height="244"&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href="http://lh6.ggpht.com/_MIqc395dv38/TcaOoQOO3TI/AAAAAAAACpE/87SkOAW_w3s/s1600-h/s2%5B5%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="s2" border="0" alt="s2" src="http://lh5.ggpht.com/_MIqc395dv38/TcaOo0uXlKI/AAAAAAAACpI/h-6hML4Kw9A/s2_thumb%5B1%5D.png?imgmax=800" width="148" height="244"&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href="http://lh4.ggpht.com/_MIqc395dv38/TcaOpmF733I/AAAAAAAACpM/KatfCdyo8VE/s1600-h/s3%5B5%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="s3" border="0" alt="s3" src="http://lh6.ggpht.com/_MIqc395dv38/TcaOqHjfCiI/AAAAAAAACpQ/AAM3QpTdxDI/s3_thumb%5B1%5D.png?imgmax=800" width="148" height="244"&gt;&lt;/a&gt;&lt;a href="http://lh5.ggpht.com/_MIqc395dv38/TcaOqkV4_dI/AAAAAAAACpU/zrY1TrKbzFo/s1600-h/s4%5B5%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="s4" border="0" alt="s4" src="http://lh6.ggpht.com/_MIqc395dv38/TcaOrAmDWtI/AAAAAAAACpY/opouO2B32P4/s4_thumb%5B1%5D.png?imgmax=800" width="148" height="244"&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href="http://lh4.ggpht.com/_MIqc395dv38/TcaOr26qoUI/AAAAAAAACpc/OXb7_VyuZlI/s1600-h/History%20new%5B5%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="History new" border="0" alt="History new" src="http://lh5.ggpht.com/_MIqc395dv38/TcaOsoUUAaI/AAAAAAAACpg/AmM0Rid4yjk/History%20new_thumb%5B1%5D.png?imgmax=800" width="148" height="244"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;You can download Beta SMS from here :&lt;br&gt;&lt;a href="zune://navigate?phoneAppID=b32c70b6-b127-e011-854c-00237de2db9e"&gt;&lt;img style="margin: 8px 0px 9px" title="Downlaod Beta SMS" border="0" alt="Downlaod Beta SMS" src="http://lh3.ggpht.com/_MIqc395dv38/TXuNyPozngI/AAAAAAAACns/Xh3fADXiGgw/wp7_English_278x92_blue%5B3%5D.png?imgmax=800" width="244" height="83"&gt;&lt;/a&gt;&lt;br&gt;&lt;a href="http://wp7applist.com/en-US/app/9904/beta-sms"&gt;More info&lt;/a&gt; on WP7applist.com.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8964007124326996693-4868256270725286665?l=www.martani.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MartaniTechBlog/~4/DfPM6eMchdI" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/MartaniTechBlog/~3/DfPM6eMchdI/beta-sms-20-now-available-on-windows.html</link><author>noreply@blogger.com (fakhrou martani)</author><media:thumbnail url="http://lh5.ggpht.com/_MIqc395dv38/TcaOnwHjFHI/AAAAAAAACpA/iHtvUhKEgMk/s72-c/s1_thumb%5B1%5D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.martani.net/2011/05/beta-sms-20-now-available-on-windows.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8964007124326996693.post-2590744172449724948</guid><pubDate>Tue, 03 May 2011 20:11:00 +0000</pubDate><atom:updated>2011-05-06T17:12:34.312+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">cryptography</category><title>Win a Free Domain Name (Registered For 3 Years), 3rd &amp; Last Message</title><description>&lt;p&gt;This is the 3rd and last message of the series to win a domain name registered for 3 years.&lt;/p&gt; &lt;p&gt;Once decoded, send the clear message and your email from the “contact me” page, remember, first to decipher the 3 messages wins.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Message:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font size="4" face="Bookman Old Style"&gt;ADACACACBDXCCAAABCABBACAXCCCAABCCDC&lt;br&gt;BXAACACBCCXBXDXDAAADACBABDACABXXAAB&lt;br&gt;AXCAXAABCDAACAACBDACADBACDXBXXCACCC&lt;br&gt;CAACCAABCCBDXAADBDBX&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Instructions :&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font size="4" face="Bookman Old Style"&gt;YJAV CWQ : LMJAFY, LJSFKHGKALAGF CWQ : CAFVA.&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;You need to decipher the first (fairly easy) two messages (the second is easier than the first). Message 1 &lt;a href="http://www.martani.net/2011/04/win-free-domain-name-registered-for-3.html" target="_blank"&gt;here&lt;/a&gt;, message 2 &lt;a href="http://www.martani.net/2011/04/win-free-domain-name-registered-for-3_19.html" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;font color="#ff0000"&gt;(competition &lt;strike&gt;always open&lt;/strike&gt; closed)&lt;/font&gt;&lt;/p&gt; &lt;p align="center"&gt;&lt;font size="4"&gt;Winner : Mohieddine Abd-kader, &lt;/font&gt;&lt;a href="http://mitgux.com/" target="_blank"&gt;&lt;font size="4"&gt;http://mitgux.com/&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8964007124326996693-2590744172449724948?l=www.martani.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MartaniTechBlog/~4/fXW2wzaD3tk" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/MartaniTechBlog/~3/fXW2wzaD3tk/win-free-domain-name-registered-for-3.html</link><author>noreply@blogger.com (fakhrou martani)</author><thr:total>0</thr:total><feedburner:origLink>http://www.martani.net/2011/05/win-free-domain-name-registered-for-3.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8964007124326996693.post-7648288401812965331</guid><pubDate>Wed, 27 Apr 2011 16:08:00 +0000</pubDate><atom:updated>2011-04-27T21:20:29.685+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">cryptography</category><category domain="http://www.blogger.com/atom/ns#">vigenere</category><title>Cracking The Vigenere Cipher</title><description>&lt;div align="justify"&gt;I wanted to use Vigenere as the cipher system for the 3rd message on &lt;a href="http://www.martani.net/2011/04/win-free-domain-name-registered-for-3.html" target="_blank"&gt;the competition to win a domain name&lt;/a&gt;, but changed my mind due to the number of online tools that might help decode the message easily even if you know nothing about how Vigenere works.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;Before you start reading about how deciphering Veginere works, I invite you to take a look how Vigenere is used to cipher messages from the &lt;a href="http://en.wikipedia.org/wiki/Vigen%C3%A8re_cipher" target="_blank"&gt;Wikipedia article here&lt;/a&gt;, in fact Vigenere was called “&lt;i&gt;le chiffre indéchiffrable&lt;/i&gt;” or the undecipherable cipher, because any means of cryptanalysis invented before it was defeated, till Charles Babbage found a clever, very clever, way to crack it.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;After finishing reading the Code Book the last week, I started decoding the different enigmas proposed at the end of the book, and yesterday I started deciphering the 4th enigma which is a Vigenere cipher (that I finished yesterday too), and I find it pretty amazing for starters to try. I must notify you that this short article will contain the solution to the enigma.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;I chose to go old way while deciphering this, finding the key by hand, then decoding the message step by step.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3&gt;0. The message to decode :&lt;/h3&gt;&lt;span style="font-family: 'Courier New'; font-size: medium;"&gt;K Q O W E F V J P U J U U N U K G L M E K J I&lt;br /&gt;N M W U X F Q M K J B G W R L F N F G H U D W&lt;br /&gt;U U M B S V L P S N C M U E K Q C T E S W R E&lt;br /&gt;E K O Y S S I W C T U A X Y O T A P X P L W P&lt;br /&gt;...&lt;/span&gt;&lt;br /&gt;The complete message can be &lt;a href="http://www.simonsingh.net/cryptography/cipher-challenge/the-ciphertexts/stage-4/" target="_blank"&gt;found here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;1. Finding the length of the key :&lt;/h3&gt;&lt;div&gt;Babbage’s method for finding the key length was that the repeated text in the ciphered message is probably produced from the same repeated letters from the clear message that are ciphered with the same part of the key. Hence finding an estimate between the repeated series of letters in the ciphered message would give us a good hint about the length of the key&lt;/div&gt;&lt;div align="justify"&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;strong&gt;&lt;span style="color: red;"&gt;&lt;span style="color: black;"&gt;Clear :&lt;/span&gt; T H I&lt;/span&gt; S I S A C L &lt;span style="color: #9b00d3;"&gt;E A&lt;/span&gt; R T E X T &lt;span style="color: red;"&gt;T H I&lt;/span&gt; S C A N B E &lt;span style="color: #9b00d3;"&gt;E A&lt;/span&gt; S L Y D E C &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;strong&gt;&lt;span style="color: blue;"&gt;&lt;span style="color: black;"&gt;Key :&lt;/span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: black;"&gt;&lt;span style="color: red;"&gt;C O D&lt;/span&gt; E &lt;span style="font-family: 'Courier New';"&gt;C O D E &lt;span style="font-family: 'Courier New';"&gt;C &lt;span style="color: #9b00d3;"&gt;O D&lt;/span&gt; E &lt;span style="font-family: 'Courier New';"&gt;C O D E &lt;span style="font-family: 'Courier New';"&gt;&lt;span style="color: red;"&gt;C O D&lt;/span&gt; E &lt;span style="font-family: 'Courier New';"&gt;C O D E &lt;span style="font-family: 'Courier New';"&gt;C &lt;span style="color: #9b00d3;"&gt;O D&lt;/span&gt; E &lt;span style="font-family: 'Courier New';"&gt;C O D E &lt;span style="font-family: 'Courier New';"&gt;C &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New';"&gt;&lt;strong&gt;&lt;span style="color: red;"&gt;&lt;span style="color: black;"&gt;Crypt :&lt;/span&gt; V V L&lt;/span&gt; W K G D G N &lt;span style="color: #9b00d3;"&gt;S D&lt;/span&gt; V V S A X &lt;span style="color: red;"&gt;V V L&lt;/span&gt; W E O Q F G &lt;span style="color: #9b00d3;"&gt;S D&lt;/span&gt; W N M G I E &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;div align="justify"&gt;&lt;br /&gt;As you can see the series of latters &lt;strong&gt;T,H,I&lt;/strong&gt; is ciphered to the same series &lt;strong&gt;V,V,L&lt;/strong&gt;, because it was situated at the same relative position according the key, also &lt;strong&gt;E,A&lt;/strong&gt; is ciphered to the same &lt;strong&gt;S,D&lt;/strong&gt;.&lt;/div&gt;&lt;div align="justify"&gt;The key length is at worst the spacing between these repetitions in the ciphered text, and usually it is the greatest common divisor of the spacing of (most) the repetitions (why? give it a second thought.).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_MIqc395dv38/Tbg2oSkL1wI/AAAAAAAACoo/wrVClzA0lXE/s1600-h/285181560%5B3%5D.png"&gt;&lt;img alt="285181560" border="0" height="323" src="http://lh5.ggpht.com/_MIqc395dv38/Tbg2uLx0LrI/AAAAAAAACos/0GHDsHcBuMM/285181560_thumb%5B1%5D.png?imgmax=800" style="background-image: none; border-bottom-color: initial; border-bottom-style: initial; border-bottom-width: 0px; border-left-color: initial; border-left-style: initial; border-left-width: 0px; border-right-color: initial; border-right-style: initial; border-right-width: 0px; border-top-color: initial; border-top-style: initial; border-top-width: 0px; cursor: move; display: block; float: none; margin-left: auto; margin-right: auto; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="285181560" width="294" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;/div&gt;This is the table of the distances from the Vigenere message (done by hand)&lt;br /&gt;&lt;br /&gt;&lt;table border="1" cellpadding="2" cellspacing="0" style="width: 601px;"&gt;&lt;tbody&gt;&lt;tr&gt; &lt;td valign="top" width="82"&gt;&lt;div align="center"&gt;&lt;strong&gt;Anchor&lt;/strong&gt;&lt;/div&gt;&lt;/td&gt; &lt;td valign="top" width="81"&gt;&lt;div align="center"&gt;&lt;strong&gt;Repetition&lt;/strong&gt;&lt;/div&gt;&lt;/td&gt; &lt;td valign="top" width="101"&gt;&lt;div align="center"&gt;&lt;strong&gt;Distances&lt;/strong&gt;&lt;/div&gt;&lt;/td&gt; &lt;td valign="top" width="335"&gt;&lt;div align="center"&gt;&lt;strong&gt;Divisors&lt;/strong&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td valign="top" width="83"&gt;WXIZAYG&lt;/td&gt; &lt;td valign="top" width="85"&gt;2&lt;/td&gt; &lt;td valign="top" width="100"&gt;190&lt;/td&gt; &lt;td valign="top" width="333"&gt;&lt;pre&gt;1 | 2 |&lt;strong&gt; &lt;span style="color: red;"&gt;5&lt;/span&gt;&lt;/strong&gt; | 10 | 19 | 38 | 95 | 190&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td valign="top" width="83"&gt;EFVJ&lt;/td&gt; &lt;td valign="top" width="88"&gt;2&lt;/td&gt; &lt;td valign="top" width="100"&gt;220&lt;/td&gt; &lt;td valign="top" width="332"&gt;&lt;pre&gt;1 | 2 | 4 | &lt;span style="color: red;"&gt;5&lt;/span&gt; | 10 | 11 | 20 | 22 …&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td valign="top" width="82"&gt;WUU&lt;/td&gt; &lt;td valign="top" width="90"&gt;3&lt;/td&gt; &lt;td valign="top" width="99"&gt;95&lt;/td&gt; &lt;td valign="top" width="332"&gt;&lt;pre&gt;1 | &lt;strong&gt;&lt;span style="color: red;"&gt;5 &lt;/span&gt;&lt;/strong&gt;| 19 | 95&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td valign="top" width="82"&gt;EEK&lt;/td&gt; &lt;td valign="top" width="91"&gt;3&lt;/td&gt; &lt;td valign="top" width="99"&gt;200&lt;/td&gt; &lt;td valign="top" width="332"&gt;&lt;pre&gt;1 | 2 | 4 | &lt;strong&gt;&lt;span style="color: red;"&gt;5&lt;/span&gt;&lt;/strong&gt; | 8 | 10 | 20 | 25 …&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td valign="top" width="82"&gt;UUN&lt;/td&gt; &lt;td valign="top" width="91"&gt;2&lt;/td&gt; &lt;td valign="top" width="99"&gt;130&lt;/td&gt; &lt;td valign="top" width="332"&gt;&lt;pre&gt;1 | 2 | &lt;strong&gt;&lt;span style="color: red;"&gt;5&lt;/span&gt;&lt;/strong&gt; | 10 | 13 | 26 | 65 | 130&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td valign="top" width="82"&gt;MEK&lt;/td&gt; &lt;td valign="top" width="91"&gt;2&lt;/td&gt; &lt;td valign="top" width="99"&gt;135&lt;/td&gt; &lt;td valign="top" width="332"&gt;..&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td valign="top" width="82"&gt;EKJ&lt;/td&gt; &lt;td valign="top" width="91"&gt;2&lt;/td&gt; &lt;td valign="top" width="99"&gt;515&lt;/td&gt; &lt;td valign="top" width="332"&gt;..&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td valign="top" width="82"&gt;UXF&lt;/td&gt; &lt;td valign="top" width="91"&gt;2&lt;/td&gt; &lt;td valign="top" width="99"&gt;135&lt;/td&gt; &lt;td valign="top" width="332"&gt;..&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td valign="top" width="82"&gt;JBJ&lt;/td&gt; &lt;td valign="top" width="91"&gt;2&lt;/td&gt; &lt;td valign="top" width="99"&gt;60&lt;/td&gt; &lt;td valign="top" width="332"&gt;..&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td valign="top" width="82"&gt;GFB&lt;/td&gt; &lt;td valign="top" width="91"&gt;2&lt;/td&gt; &lt;td valign="top" width="99"&gt;30&lt;/td&gt; &lt;td valign="top" width="332"&gt;&lt;pre&gt;1 | 2 | 3 |&lt;strong&gt; &lt;span style="color: red;"&gt;5 &lt;/span&gt;&lt;/strong&gt;| 6 | 10 | 15 | 30&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td valign="top" width="82"&gt;PNT&lt;/td&gt; &lt;td valign="top" width="91"&gt;2&lt;/td&gt; &lt;td valign="top" width="99"&gt;35&lt;/td&gt; &lt;td valign="top" width="333"&gt;&lt;pre&gt;&lt;strong&gt; &lt;span style="color: red;"&gt;5 &lt;/span&gt;&lt;/strong&gt;| 7&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;div align="justify"&gt;As you can see, all the repetitions have 5 as a common divisor, so we will suppose that the key length is 5.&lt;/div&gt;&lt;br /&gt;&lt;h3&gt;2. Breaking the text into (key-length) sets:&lt;/h3&gt;&lt;br /&gt;&lt;div align="justify"&gt;Now that we know the key length, we will make sets from the coded text, so that we group every letter codes with the first letter of the key together, the second group will be the one coded with the second letter of the key etc…&lt;/div&gt;&lt;br /&gt;&lt;table border="1" cellpadding="2" cellspacing="0" style="width: 597px;"&gt;&lt;tbody&gt;&lt;tr&gt; &lt;td valign="top" width="92"&gt;&lt;span style="font-family: 'Courier New'; font-size: medium;"&gt;C &lt;span style="color: red;"&gt;O&lt;/span&gt; D &lt;span style="color: blue;"&gt;E&lt;/span&gt;&lt;/span&gt;&lt;/td&gt; &lt;td valign="top" width="503"&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td valign="top" width="95"&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New'; font-size: medium;"&gt;T &lt;span style="color: red;"&gt;H&lt;/span&gt; I &lt;span style="color: blue;"&gt;S&lt;/span&gt; &lt;br /&gt;I &lt;span style="color: red;"&gt;S&lt;/span&gt; A &lt;span style="color: blue;"&gt;C&lt;/span&gt; &lt;br /&gt;L &lt;span style="color: red;"&gt;E&lt;/span&gt; A &lt;span style="color: blue;"&gt;R&lt;/span&gt; &lt;br /&gt;T &lt;span style="color: red;"&gt;E&lt;/span&gt; X &lt;span style="color: blue;"&gt;T&lt;/span&gt; &lt;br /&gt;T &lt;span style="color: red;"&gt;H&lt;/span&gt; I &lt;span style="color: blue;"&gt;S&lt;/span&gt; &lt;br /&gt;C &lt;span style="color: red;"&gt;A&lt;/span&gt; N &lt;span style="color: blue;"&gt;B&lt;/span&gt; &lt;br /&gt;E &lt;span style="color: red;"&gt;E&lt;/span&gt; A &lt;span style="color: blue;"&gt;S&lt;/span&gt; &lt;br /&gt;L &lt;span style="color: red;"&gt;Y&lt;/span&gt; D &lt;span style="color: blue;"&gt;E&lt;/span&gt; &lt;br /&gt;C &lt;/span&gt;&lt;/td&gt; &lt;td width="500"&gt;&lt;br /&gt;&lt;div align="justify"&gt;Each group is ciphered with one letter of the key, and better yet, the resulting group is ciphered with a simple Caesar cipher. (notice that we group the ciphered text, not the clear one –do we have the clear one anyway?-)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;div align="justify"&gt;Here is a sample code that takes a ciphered text and a key length and returns a list of simple Ceasar ciphers from the Vigenere cipher (C# code):&lt;/div&gt;&lt;br /&gt;&lt;script src="https://gist.github.com/944949.js?file=gistfile1.cs"&gt;&lt;/script&gt;&lt;br /&gt;&lt;h3&gt;3. Deciphering the Ceasar groups:&lt;/h3&gt;&lt;br /&gt;&lt;div align="justify"&gt;Now that we have the groups from the Vigenere cipher, it’s very easy to decipher each one apart (each one has a 26 possibility, so a key length of 5 gives us a 26^5 case to try).&lt;/div&gt;&lt;br /&gt;&lt;div align="justify"&gt;But we can do better with frequency analysis, we need only to locate the Caesar key for each group, so if the text if for example in French or English, we can locate the letter &lt;strong&gt;“e”&lt;/strong&gt; (most frequent one) and deduce the key from this letter.&lt;/div&gt;&lt;br /&gt;&lt;div align="justify"&gt;If for example in the first group, the letter &lt;strong&gt;“s”&lt;/strong&gt; is the most repeated one, we know that &lt;strong&gt;“e”&lt;/strong&gt; is replaced by &lt;strong&gt;“s”&lt;/strong&gt; and hence the key is &lt;strong&gt;“s”&lt;/strong&gt; – &lt;strong&gt;“e”&lt;/strong&gt; = &lt;strong&gt;“m”&lt;/strong&gt;.&lt;/div&gt;&lt;br /&gt;&lt;div align="justify"&gt;The following piece of code, analyses the frequencies and tries to find the key (supposing that the text is long enough and that the letters are distributed uniformly)&lt;/div&gt;&lt;br /&gt;&lt;script src="https://gist.github.com/944963.js?file=gistfile1.cs"&gt;&lt;/script&gt;&lt;br /&gt;&lt;h3&gt;4. Cracking Vigenere :&lt;/h3&gt;&lt;br /&gt;The key, is the concatenation of all the Caesar keys we found in each group from the above step. Now that we have the key, reversing Vigenere is a game, here is a sample code that does this:&lt;br /&gt;&lt;br /&gt;&lt;script src="https://gist.github.com/944969.js?file=gistfile1.cs"&gt;&lt;/script&gt;&lt;br /&gt;You can of course try different key lengths with this program and see if the text has any meaning without going through stage one to find the key length. (or you can calculate it directly using Friedman test)&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;5. Source Code :&lt;/h3&gt;&lt;a href="https://gist.github.com/944422"&gt;https://gist.github.com/944422&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I really wanted the last message of the &lt;a href="http://www.martani.net/2011/04/win-free-domain-name-registered-for-3.html" target="_blank"&gt;Win a free domain name&lt;/a&gt; competition to be a Vigenere cipher since it is so much fun, but unfortunately, it won’t be. Have fun ;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8964007124326996693-7648288401812965331?l=www.martani.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MartaniTechBlog/~4/alB3gkEsuEg" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/MartaniTechBlog/~3/alB3gkEsuEg/cracking-vigenere.html</link><author>noreply@blogger.com (fakhrou martani)</author><media:thumbnail url="http://lh5.ggpht.com/_MIqc395dv38/Tbg2uLx0LrI/AAAAAAAACos/0GHDsHcBuMM/s72-c/285181560_thumb%5B1%5D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.martani.net/2011/04/cracking-vigenere.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8964007124326996693.post-5547582441908542898</guid><pubDate>Tue, 19 Apr 2011 21:51:00 +0000</pubDate><atom:updated>2011-05-06T17:11:45.657+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">cryptography</category><title>Win a Free Domain Name (Registered For 3 Years), 2nd Message</title><description>&lt;p&gt;By decrypting the message and following the rules you reveal, or just have fun!  &lt;p&gt;After decrypting the &lt;a href="http://www.martani.net/2011/04/win-free-domain-name-registered-for-3.html" target="_blank"&gt;first one&lt;/a&gt;, you won’t find any difficulty decrypting this one.&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_MIqc395dv38/Ta4IlXMrGCI/AAAAAAAACog/bFgOWuFJT7g/s1600-h/Sans%20titre%5B5%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Sans titre" border="0" alt="Sans titre" src="http://lh6.ggpht.com/_MIqc395dv38/Ta4ImYYqfZI/AAAAAAAACok/UNPB5HrvxT8/Sans%20titre_thumb%5B3%5D.png?imgmax=800" width="548" height="63"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Hint: Phonemic, Linear, starting from the end is a good idea sometimes.&lt;/p&gt; &lt;p&gt;Hint 2 : This was a widely used code (language) in the past.&lt;/p&gt; &lt;p&gt;(if you decode the message, don’t forget to send your answer from the “contact me” page along with your email).&lt;/p&gt; &lt;p&gt;&lt;font color="#008000"&gt;Decoded by : &lt;/font&gt;&lt;a href="http://twitter.com/oh_la_love" target="_blank"&gt;&lt;font color="#0000ff"&gt;@oh_la_love&lt;/font&gt;&lt;/a&gt;&lt;font color="#008000"&gt;, &lt;/font&gt;&lt;a href="https://twitter.com/#!/27_Hope" target="_blank"&gt;&lt;font color="#0000ff"&gt;@27_hope&lt;/font&gt;&lt;/a&gt;, &lt;a href="https://twitter.com/#!/mowahed23"&gt;@mowahed23&lt;/a&gt; ,&lt;font color="#4f81bd"&gt; Mohieddine Abd-kader, &lt;a href="https://twitter.com/#!/zirconias" target="_blank"&gt;@zirconias&lt;/a&gt;&lt;/font&gt;&lt;font color="#008000"&gt;&amp;nbsp;&lt;/font&gt;&lt;font color="#008000"&gt;(&lt;font color="#ff0000"&gt;competition &lt;strike&gt;always open&lt;/strike&gt; closed&lt;/font&gt;).&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p align="center"&gt;&lt;font size="4"&gt;Winner : Mohieddine Abd-kader, &lt;/font&gt;&lt;a href="http://mitgux.com/" target="_blank"&gt;&lt;font size="4"&gt;http://mitgux.com/&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8964007124326996693-5547582441908542898?l=www.martani.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MartaniTechBlog/~4/M1IojVNcvnE" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/MartaniTechBlog/~3/M1IojVNcvnE/win-free-domain-name-registered-for-3_19.html</link><author>noreply@blogger.com (fakhrou martani)</author><media:thumbnail url="http://lh6.ggpht.com/_MIqc395dv38/Ta4ImYYqfZI/AAAAAAAACok/UNPB5HrvxT8/s72-c/Sans%20titre_thumb%5B3%5D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.martani.net/2011/04/win-free-domain-name-registered-for-3_19.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8964007124326996693.post-7723310053165661487</guid><pubDate>Sun, 10 Apr 2011 11:26:00 +0000</pubDate><atom:updated>2011-04-10T13:34:14.625+02:00</atom:updated><title>TEDxAlger, Reflections</title><description>&lt;p align="justify"&gt;&lt;strong&gt;“Offline”&lt;/strong&gt;, was the only message shown on the &lt;em&gt;supposed-to-be&lt;/em&gt; the live streaming page of the TEDx event that was held yesterday in Algiers. An event that has its prestige around the globe, and which was announced to be a success even before it started [refer to twitter for evidence!].&lt;/p&gt; &lt;p align="justify"&gt;&lt;strong&gt;The excuse&lt;/strong&gt; of the organizers was that there was no internet connection and that it was the CERIST’s fault, not theirs. The most prestigious institute of informatics had no internet connection! and worst, no internet connection during a TEDx event! That same institute that is ranked 7842 among the world’s universities.&lt;/p&gt; &lt;p align="justify"&gt;Internet is not a luxury anymore, but yet, we still see that Algeria cannot provide a reliable internet connection during a &lt;em&gt;supposed-to-be&lt;/em&gt; global event like TED. While &lt;a href="https://twitter.com/#!/h_sattouf/statuses/56658612973604864" target="_blank"&gt;the organizers&lt;/a&gt; deserve a big part of the reproach, the only thing to be said is &lt;em&gt;&lt;strong&gt;Shame on you Algeria&lt;/strong&gt;&lt;/em&gt;, it is 2011 in case you didn’t notice yet!&lt;/p&gt; &lt;p align="justify"&gt;&lt;strong&gt;Identity&lt;/strong&gt; is a crucial part of such global events, and language is the main player in this; A quick look at the &lt;em&gt;TEDxCarthage&lt;/em&gt; or &lt;em&gt;TEDxCairo&lt;/em&gt; shows pretty much how the speakers are using their native language mostly, but unfortunately &lt;em&gt;TEDxAlger&lt;/em&gt; was a pure French spectacle.&lt;/p&gt; &lt;p align="justify"&gt;Some are arguing that as far as we can understand what the speakers say, &lt;a href="https://twitter.com/#!/youknowriad/statuses/56663583924293632" target="_blank"&gt;language is just an illusionary abstract layer&lt;/a&gt;, which is of course scandalously fallacious when it comes to an official statement from a government member (yeah, remember the Algerian ministers and such?), or when a global event is concerned where the city (or the country in Algeria’s case) is to be represented. (We could change the name of the event to TEDxMarseille and no one will notice, trust me)&lt;/p&gt; &lt;p align="justify"&gt;&lt;strong&gt;There was a competition&lt;/strong&gt; where people can vote for the best video and article written about TEDxAlger, and it is not strange at all to know that the video that was ranked 1st &lt;a href="https://twitter.com/#!/schneller00/status/56112320161648640" target="_blank"&gt;is a stolen video&lt;/a&gt;.. from YouTube (seriously)&lt;/p&gt; &lt;p align="justify"&gt;Some have been discussing the fact that more than a half of the speakers are living abroad (&lt;strike&gt;France&lt;/strike&gt;) and the moral impact of this on the event after all. As someone said, “what I can understand from this, is that, the only way to be successful is to leave Algeria [Redacted]”.&lt;/p&gt; &lt;p align="justify"&gt;Once again, that might be a wrong move of the organizers to invite only Francophone speakers (thought I’m sure ALL of them know at least some Algerian Darja), or it was a smart one, who knows.&lt;/p&gt; &lt;p align="justify"&gt;More on the subject :&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://grindaizer.blogspot.com/2011/04/alors-ce-tedx-alger.html?spref=tw" target="_blank"&gt;Grindaizer's Mind: Alors ce #TedxAlger ?&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://lh3.ggpht.com/_MIqc395dv38/TaGUZXNc-AI/AAAAAAAACoQ/5Fc8tI6cuN4/s1600-h/Sans%20titre%5B4%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="Sans titre" border="0" alt="Sans titre" src="http://lh3.ggpht.com/_MIqc395dv38/TaGUaDCNGbI/AAAAAAAACoU/4UUIIbS22jE/Sans%20titre_thumb%5B2%5D.png?imgmax=800" width="377" height="253"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8964007124326996693-7723310053165661487?l=www.martani.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MartaniTechBlog/~4/_M9kpbbKKHk" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/MartaniTechBlog/~3/_M9kpbbKKHk/tedxalger-reflections.html</link><author>noreply@blogger.com (fakhrou martani)</author><media:thumbnail url="http://lh3.ggpht.com/_MIqc395dv38/TaGUaDCNGbI/AAAAAAAACoU/4UUIIbS22jE/s72-c/Sans%20titre_thumb%5B2%5D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.martani.net/2011/04/tedxalger-reflections.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8964007124326996693.post-1864022885258709418</guid><pubDate>Mon, 04 Apr 2011 22:10:00 +0000</pubDate><atom:updated>2011-05-06T17:10:52.626+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">cryptography</category><title>Win a Free Domain Name (Registered For 3 Years)</title><description>&lt;p&gt;By decrypting the message and following the rules you reveal, or just have fun!&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_MIqc395dv38/TZpBuGTwR5I/AAAAAAAACoI/QUaX8BlNMcU/s1600-h/Sans%20titre%5B4%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Sans titre" border="0" alt="Sans titre" src="http://lh4.ggpht.com/_MIqc395dv38/TZpBuhhDnEI/AAAAAAAACoM/BOlgVrmr6Kk/Sans%20titre_thumb%5B2%5D.png?imgmax=800" width="391" height="496"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Hint : People used to love playing Angry Birds in ancient Rome.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;font color="#008000"&gt;Decoded by : &lt;/font&gt;&lt;a href="http://twitter.com/oh_la_love"&gt;&lt;font color="#4f81bd"&gt;@oh_la_love&lt;/font&gt;&lt;/a&gt;&lt;font color="#4f81bd"&gt;, &lt;/font&gt;&lt;a href="https://twitter.com/#!/27_Hope"&gt;&lt;font color="#4f81bd"&gt;@27_hope&lt;/font&gt;&lt;/a&gt;, &lt;a href="https://twitter.com/#!/mowahed23" target="_blank"&gt;@mowahed23&lt;/a&gt;,&lt;font color="#4f81bd"&gt; Mohieddine Abd-kader, &lt;a href="https://twitter.com/#!/zirconias"&gt;@zirconias&lt;/a&gt;&lt;/font&gt;&lt;font color="#008000"&gt; (&lt;font color="#ff0000"&gt;competition &lt;strike&gt;always open&lt;/strike&gt; closed&lt;/font&gt;).&lt;/font&gt;&lt;/p&gt; &lt;p align="center"&gt;&lt;font size="4"&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt; &lt;p align="center"&gt;&lt;font size="4"&gt;Winner : Mohieddine Abd-kader, &lt;/font&gt;&lt;a href="http://mitgux.com/" target="_blank"&gt;&lt;font size="4"&gt;http://mitgux.com/&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8964007124326996693-1864022885258709418?l=www.martani.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MartaniTechBlog/~4/ifouxrtpUAc" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/MartaniTechBlog/~3/ifouxrtpUAc/win-free-domain-name-registered-for-3.html</link><author>noreply@blogger.com (fakhrou martani)</author><media:thumbnail url="http://lh4.ggpht.com/_MIqc395dv38/TZpBuhhDnEI/AAAAAAAACoM/BOlgVrmr6Kk/s72-c/Sans%20titre_thumb%5B2%5D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.martani.net/2011/04/win-free-domain-name-registered-for-3.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8964007124326996693.post-207902694544295114</guid><pubDate>Thu, 31 Mar 2011 22:51:00 +0000</pubDate><atom:updated>2011-04-04T23:39:40.393+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">wp7</category><category domain="http://www.blogger.com/atom/ns#">chevronwp7</category><category domain="http://www.blogger.com/atom/ns#">Samsung omnia 7</category><title>WP7 Samsung Devices Unlocked Forever?</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;b&gt;Update :&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;No they are not ;), You can use&amp;nbsp;&lt;span class="Apple-style-span" style="color: #111111; font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 13px; line-height: 19px;"&gt;Heathcliff74's tool from XDA &lt;a href="http://forum.xda-developers.com/showthread.php?t=1021135"&gt;here &lt;/a&gt;to gain root access to the Registry and change whatever you want&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Most of the WP7 users who unlocked their devices using the ChevronWP7 tool have applied a registry hack to prevent their devices from relocking again, something that I applied myself, but had never thought it would unlock the device forever (till now at least).&lt;br /&gt;&lt;br /&gt;For HTC users, they can use provxml &lt;a href="http://forum.xda-developers.com/showthread.php?t=913748" target="_blank"&gt;to do this&lt;/a&gt;, and the Samsung users have the ability to do the same with a little app that can be found &lt;a href="http://forum.xda-developers.com/showthread.php?t=924497" target="_blank"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The hack is pretty simple actually, it just clears the URLs the phone uses to ring back Microsoft and asks if it should be unlocked or not, there URLs can be found in the Registry at this location :&lt;br /&gt;&lt;div&gt;&lt;div id="codeSnippetWrapper" style="background-color: #f4f4f4; border-bottom: silver 1px solid; border-left: silver 1px solid; border-right: silver 1px solid; border-top: silver 1px solid; cursor: text; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 20px 0px 10px; max-height: 200px; overflow: auto; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: left; width: 97.5%;"&gt;&lt;div id="codeSnippet" style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; [HKEY_LOCAL_MACHINE\Software\Microsoft\DeviceReg]&lt;/pre&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt; &lt;span style="color: #006080;"&gt;"PortalUrlProd"&lt;/span&gt;=&lt;span style="color: #006080;"&gt;"https://developerservices.windowsphone.com/Services/WindowsPhoneRegistration.svc/01/2010"&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt;   3:&lt;/span&gt;  &lt;/pre&gt;&lt;pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt;   4:&lt;/span&gt; PortalUrlInt&lt;span style="color: #006080;"&gt;"="&lt;/span&gt;https://developerservices.windowsphone-int.com/Services/WindowsPhoneRegistration.svc/01/2010"&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;By setting these two values to null (a void string), the phone will never be able to synchronize with Microsoft servers and hence won’t relock again.&lt;br /&gt;&lt;br /&gt;Now if you want&amp;nbsp; to relock your phone again for whatever reason, with HTC device it is just applying a provxml that will revert the process and insert the URLs back, but on Samsung devices it is not that easy. &lt;br /&gt;&lt;br /&gt;Writing on Samsung registry (take a look at &lt;a href="http://www.martani.net/2011/01/wp7-hacks-reading-writing-registry-on.html" target="_blank"&gt;my previous post about this&lt;/a&gt;) is done using the &lt;em&gt;CHybridClass_FCRProxy&lt;/em&gt; class that comes with the native Samsung DLL &lt;em&gt;FCRouterProxy.dll (this DLL has access to some privileged Registry keys)&lt;/em&gt;. &lt;br /&gt;&lt;br /&gt;To write a value on the registry, you basically call something like this :&lt;br /&gt;&lt;div&gt;&lt;div id="codeSnippetWrapper" style="background-color: #f4f4f4; border-bottom-color: silver; border-bottom-style: solid; border-bottom-width: 1px; border-left-color: silver; border-left-style: solid; border-left-width: 1px; border-right-color: silver; border-right-style: solid; border-right-width: 1px; border-top-color: silver; border-top-style: solid; border-top-width: 1px; cursor: text; direction: ltr; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 20px; max-height: 200px; overflow-x: auto; overflow-y: auto; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: left; width: 97.5%;"&gt;&lt;br /&gt;&lt;div id="codeSnippet" style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; overflow-x: visible; overflow-y: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; Samsung.RegistryWrite(Samsung.RegistryKey.LocalMachine, &lt;span style="color: #006080;"&gt;@"Software\Microsoft\DeviceReg"&lt;/span&gt;, &lt;span style="color: #006080;"&gt;"PortalUrlProd"&lt;/span&gt;, &lt;span style="color: #006080;"&gt;"VALUE HERE"&lt;/span&gt;);&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;Strangely, the native Samsung methods don’t allow writing values that are more than 30 characters length, which makes it impossible to write back the original URLs that point to Microsoft servers. &lt;br /&gt;&lt;br /&gt;So if a Samsung user locks its phone after this, he will never be able to unlock it again even with a valid developer account (just happened to me).&lt;br /&gt;&lt;br /&gt;Heathcliff74 over XDA forums &lt;a href="http://forum.xda-developers.com/showthread.php?p=12559781" target="_blank"&gt;has promised&lt;/a&gt; me that his future Registry utility for Samsung devices will have root access, so let’s hope it will come soon. Another solution would be putting a less than 30 chars url that redirects to 127.0.0.1 or &lt;i&gt;https://developerservices.windowsphone.com&lt;/i&gt; something I didn’t try (won’t risk yet) and that would require more work (domain certificates?…)&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8964007124326996693-207902694544295114?l=www.martani.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MartaniTechBlog/~4/pKdKuBCYryM" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/MartaniTechBlog/~3/pKdKuBCYryM/wp7-samsung-devices-unlocked-forever.html</link><author>noreply@blogger.com (fakhrou martani)</author><thr:total>0</thr:total><feedburner:origLink>http://www.martani.net/2011/04/wp7-samsung-devices-unlocked-forever.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8964007124326996693.post-6116837737326405161</guid><pubDate>Sat, 12 Mar 2011 15:14:00 +0000</pubDate><atom:updated>2011-03-24T17:16:31.127+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">windows phone 7</category><category domain="http://www.blogger.com/atom/ns#">wp7</category><category domain="http://www.blogger.com/atom/ns#">beta sms</category><title>Beta SMS for Windows Phone 7 is here</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div align="justify"&gt;I’ve developed Beta SMS for Windows Phone 7 back in January, but due to delays and problems with the GeoTrust registration process to publish apps on the Marketplace, the app has been published only yesterday on the WP7 Marketplace, available for $1.29.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="justify"&gt;Beta SMS allows you to send cheap or free SMS from your favorite &lt;strong&gt;BetaMax&lt;/strong&gt; and &lt;strong&gt;VoIP&lt;/strong&gt; provider directly from your windows Phone 7 device. It supports more than a dozen of SMS services like '&lt;em&gt;WebCallDirect&lt;/em&gt;' and '&lt;em&gt;Voip Discount&lt;/em&gt;' and still counting.&lt;br /&gt;&lt;br /&gt;In order to use Beta SMS, you need to have an account in one of these services:&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;strong&gt;SUPPORTED SERVICES:&lt;/strong&gt;&lt;br /&gt;- webcalldirect.com&lt;br /&gt;- voipdiscount.com&lt;br /&gt;- poivy.com&lt;br /&gt;- voipstunt.com&lt;br /&gt;- voipwise.com&lt;br /&gt;- voipcheap.com&lt;br /&gt;- internetcalls.com&lt;br /&gt;- smslisto.com&lt;br /&gt;- justvoip.com&lt;br /&gt;- voipbuster.com&lt;br /&gt;- freecall.com&lt;br /&gt;- intervoip.com&lt;br /&gt;- smsdiscount.com&lt;br /&gt;- dialnow.com&lt;br /&gt;- telbo.com &lt;br /&gt;&lt;br /&gt;In case your favorite provider is not listed here, please contact me (the contact information are available on the Marketplace with the app description) and I’ll make sure to include them in the coming updates.  &lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href="http://lh6.ggpht.com/_MIqc395dv38/TXuNu8n7E6I/AAAAAAAACnU/2Lqvrsl3-Gs/s1600-h/s1%5B2%5D.png"&gt;&lt;img alt="s1" border="0" height="244" src="http://lh4.ggpht.com/_MIqc395dv38/TXuNvcBjKrI/AAAAAAAACnY/nC_0W9QGU-Y/s1_thumb.png?imgmax=800" style="background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="s1" width="148" /&gt;&lt;/a&gt;&lt;a href="http://lh5.ggpht.com/_MIqc395dv38/TXuNv9Pib4I/AAAAAAAACnc/E52Makm2A2g/s1600-h/s2%5B2%5D.png"&gt;&lt;img alt="s2" border="0" height="244" src="http://lh4.ggpht.com/_MIqc395dv38/TXuNwuTiMYI/AAAAAAAACng/_9kgyuFqBCQ/s2_thumb.png?imgmax=800" style="background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="s2" width="148" /&gt;&lt;/a&gt;&lt;a href="http://lh6.ggpht.com/_MIqc395dv38/TXuNxQEdXSI/AAAAAAAACnk/YKYNn37v6rA/s1600-h/s3%5B2%5D.png"&gt;&lt;img alt="s3" border="0" height="244" src="http://lh3.ggpht.com/_MIqc395dv38/TXuNxqix6tI/AAAAAAAACno/3AU2tjmkDaY/s3_thumb.png?imgmax=800" style="background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="s3" width="148" /&gt;&lt;/a&gt;  &lt;br /&gt;&amp;nbsp; &lt;br /&gt;You can download Beta SMS from here :  &lt;br /&gt;&lt;br /&gt;&lt;a href="zune://navigate?phoneAppID=b32c70b6-b127-e011-854c-00237de2db9e" target="_blank"&gt;&lt;img alt="Downlaod Beta SMS" border="0" height="83" src="http://lh3.ggpht.com/_MIqc395dv38/TXuNyPozngI/AAAAAAAACns/Xh3fADXiGgw/wp7_English_278x92_blue%5B3%5D.png?imgmax=800" style="background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="Downlaod Beta SMS" width="244" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;a href="http://wp7applist.com/en-US/app/9904/beta-sms" target="_blank"&gt;More info&lt;/a&gt; on WP7applist.com.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8964007124326996693-6116837737326405161?l=www.martani.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MartaniTechBlog/~4/5AjcqozZN70" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/MartaniTechBlog/~3/5AjcqozZN70/beta-sms-for-windows-phone-7-is-here.html</link><author>noreply@blogger.com (fakhrou martani)</author><media:thumbnail url="http://lh4.ggpht.com/_MIqc395dv38/TXuNvcBjKrI/AAAAAAAACnY/nC_0W9QGU-Y/s72-c/s1_thumb.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.martani.net/2011/03/beta-sms-for-windows-phone-7-is-here.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8964007124326996693.post-1447835096152256468</guid><pubDate>Sun, 16 Jan 2011 13:27:00 +0000</pubDate><atom:updated>2011-01-16T19:26:23.177+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">windows phone 7</category><category domain="http://www.blogger.com/atom/ns#">chevronwp7</category><title>ChevronWP7 internals, Microsoft advertisement?</title><description>&lt;p&gt;&lt;a href="http://www.chevronwp7.com" target="_blank"&gt;ChevronWP7&lt;/a&gt; is an application that gives the ability for anyone to unlock a WP7 device without a Marketplace developer account.&lt;/p&gt; &lt;p&gt;There have been a lot of fuss about the tool, with Microsoft taking serious moves against the developers of the tool till they took it down (available on &lt;a href="http://forum.xda-developers.com/showthread.php?t=857127" target="_blank"&gt;xda&lt;/a&gt; though).&lt;/p&gt; &lt;p&gt;About a week ago we started &lt;a href="http://forum.xda-developers.com/showthread.php?t=905653" target="_blank"&gt;a thread on xda forums&lt;/a&gt; in order to try to disassemble the code of the ChevronWP7 and try to understand how it works, personally I was totally impressed how they are doing the communication with the phone, and especially how did they discover the series of bytes to send to the device that translates into commands etc.., it was unlikely to be discovered just out of the blue, and with further digging in the obfuscated code, I started to be skeptical about it and the fact that Microsoft could have a hand in this in order to advertise for its brand new phone OS.&lt;/p&gt; &lt;p&gt;But 2 days ago, I discovered that within the WP7 SDK, there is program called Windows Phone Developer Registration, I opened it with reflector, and there was the code as if it is the original source code.&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_MIqc395dv38/TTLyQrhJrmI/AAAAAAAACkA/0qIHBph-iRY/s1600-h/Sans%20titre%5B3%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="Sans titre" border="0" alt="Sans titre" src="http://lh5.ggpht.com/_MIqc395dv38/TTLyRSiVqlI/AAAAAAAACkE/barYAwpRR74/Sans%20titre_thumb%5B1%5D.png?imgmax=800" width="453" height="101"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;The thing is that the similarities with the (weakly) obfuscated ChevronWP7 and the original MS tool are too evident, the same absolute structure of code, and it turns out that the chevronWP7 tool is just that Windows Phone Developer Registration without the authentication to live services!&lt;/p&gt; &lt;p&gt;What the ChevronWP7 guys did, was redirect requests to &lt;em&gt;developerservices.windowsphone.com&lt;/em&gt; to the a local address of the computer and start a http service to send a faked response to the phone when it makes the request to check if it should be unlocked!&lt;/p&gt; &lt;h3&gt;Basically the application works as following :&lt;/h3&gt; &lt;p&gt;It uses a TcpClient to communicate with the phone over port 27077&lt;/p&gt; &lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt; &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.client = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; TcpClient(); &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.client.SendTimeout = 2000; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.client.ReceiveTimeout = 2000; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.client.LingerState.Enabled = &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt;   5:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.client.LingerState.LingerTime = 0; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt;   6:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.client.NoDelay = &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt;   7:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.client.Connect(&lt;span style="color: #006080"&gt;"127.0.0.1"&lt;/span&gt;, 27077);  &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;To check the status of the phone:&lt;br&gt;&lt;/b&gt;&lt;br /&gt;&lt;p&gt;it sends this byte array&lt;/p&gt;&lt;br /&gt;&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;&lt;br /&gt;&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;byte&lt;/span&gt;[] buffer = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; &lt;span style="color: #0000ff"&gt;byte&lt;/span&gt;[4]; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt; buffer[0] = 16; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt; buffer[1] = 1; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.commandData = buffer;  &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;To Unlock the phone :&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;it sends this byte array&lt;/p&gt;&lt;br /&gt;&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;&lt;br /&gt;&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; List&amp;lt;&lt;span style="color: #0000ff"&gt;byte&lt;/span&gt;&amp;gt; list = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; List&amp;lt;&lt;span style="color: #0000ff"&gt;byte&lt;/span&gt;&amp;gt;(); &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt; ASCIIEncoding encoding = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; ASCIIEncoding(); &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;ushort&lt;/span&gt; num = (&lt;span style="color: #0000ff"&gt;ushort&lt;/span&gt;)(((authToken.Length + 3) + 2) + 3); &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt; list.AddRange(&lt;span style="color: #0000ff"&gt;new&lt;/span&gt; &lt;span style="color: #0000ff"&gt;byte&lt;/span&gt;[] { 16, 3 }); &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt;   5:&lt;/span&gt; list.AddRange(BitConverter.GetBytes(num)); &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt;   6:&lt;/span&gt; list.Add(1); &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt;   7:&lt;/span&gt; list.AddRange(BitConverter.GetBytes((&lt;span style="color: #0000ff"&gt;ushort&lt;/span&gt;)authToken.Length)); &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt;   8:&lt;/span&gt; list.AddRange(encoding.GetBytes(authToken)); &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt;   9:&lt;/span&gt; list.Add(2); &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum10"&gt;  10:&lt;/span&gt; list.AddRange(BitConverter.GetBytes((&lt;span style="color: #0000ff"&gt;ushort&lt;/span&gt;)2)); &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum11"&gt;  11:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;ushort&lt;/span&gt; num2 = isInt ? ((&lt;span style="color: #0000ff"&gt;ushort&lt;/span&gt;)0) : ((&lt;span style="color: #0000ff"&gt;ushort&lt;/span&gt;)1); &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum12"&gt;  12:&lt;/span&gt; list.AddRange(BitConverter.GetBytes(num2)); &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum13"&gt;  13:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.commandData = list.ToArray();  &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;An http server is made to listen for any requests that come from the phone (which were redirected in the system\hosts file to 127.0.0.1) and returns as a response :&lt;/p&gt;&lt;br /&gt;&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;&lt;br /&gt;&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ResponseOfRegisteredDeviceStatus&lt;/span&gt; &lt;span style="color: #ff0000"&gt;xmlns&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Microsoft.WindowsMobile.Service.Marketplace"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;xmlns:i&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="http://www.w3.org/2001/XMLSchema-instance"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ResponseCode&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;0x00000000&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ResponseCode&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ResponseMessage&lt;/span&gt; &lt;span style="color: #ff0000"&gt;i:nil&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="true"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Entity&lt;/span&gt; &lt;span style="color: #ff0000"&gt;xmlns:a&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="http://schemas.datacontract.org/2004/07/Microsoft.WindowsMobile.Service.Marketplace.BLLDevPortal.Entities"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;a:DaysLeft&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;365&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;a:DaysLeft&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt;   5:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;a:AppsAllowed&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;10&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;a:AppsAllowed&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt;   6:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Entity&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;The number &lt;em&gt;&amp;lt;a:AppsAllowed&amp;gt;&lt;/em&gt; is the number of allowed apps, discussed &lt;a href="http://thounsell.co.uk/2010/12/chevronwp7-now-without-the-sideload-limit/"&gt;here &lt;/a&gt;in the changed version without the side limit.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;To lock the phone :&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;&lt;br /&gt;&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;internal&lt;/span&gt; LockCommand(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; authToken) &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt; { &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt;     List&amp;lt;&lt;span style="color: #0000ff"&gt;byte&lt;/span&gt;&amp;gt; list = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; List&amp;lt;&lt;span style="color: #0000ff"&gt;byte&lt;/span&gt;&amp;gt;(); &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt;     ASCIIEncoding encoding = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; ASCIIEncoding(); &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt;   5:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;ushort&lt;/span&gt; num = (&lt;span style="color: #0000ff"&gt;ushort&lt;/span&gt;) (authToken.Length + 3); &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt;   6:&lt;/span&gt;     list.AddRange(&lt;span style="color: #0000ff"&gt;new&lt;/span&gt; &lt;span style="color: #0000ff"&gt;byte&lt;/span&gt;[] { 16, 2 }); &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt;   7:&lt;/span&gt;     list.AddRange(BitConverter.GetBytes(num)); &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt;   8:&lt;/span&gt;     list.Add(1); &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt;   9:&lt;/span&gt;     list.AddRange(BitConverter.GetBytes((&lt;span style="color: #0000ff"&gt;ushort&lt;/span&gt;) authToken.Length)); &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum10"&gt;  10:&lt;/span&gt;     list.AddRange(encoding.GetBytes(authToken)); &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum11"&gt;  11:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.commandData = list.ToArray(); &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum12"&gt;  12:&lt;/span&gt; }  &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;Although the guys over ChevronWP7 have done an amazing job with this tool, it sounds a little weird that Microsoft have done a lot of fuss around it when they leave their original “unlocker” in the wild for anyone to check out, also, Chevron guys should have been a little honest about how they took all the internal code of communication with the phone from the original register program.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8964007124326996693-1447835096152256468?l=www.martani.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MartaniTechBlog/~4/St-7Zi7m3wU" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/MartaniTechBlog/~3/St-7Zi7m3wU/chevronwp7-internals-microsoft.html</link><author>noreply@blogger.com (fakhrou martani)</author><media:thumbnail url="http://lh5.ggpht.com/_MIqc395dv38/TTLyRSiVqlI/AAAAAAAACkE/barYAwpRR74/s72-c/Sans%20titre_thumb%5B1%5D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.martani.net/2011/01/chevronwp7-internals-microsoft.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8964007124326996693.post-1854067933919506217</guid><pubDate>Thu, 13 Jan 2011 13:01:00 +0000</pubDate><atom:updated>2011-01-13T14:01:54.717+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">windows phone 7</category><title>#WP7 Hacks, Reading / Writing the registry on Samsung Devices</title><description>&lt;p&gt;The folks over xda are doing a great job with all the new Windows Phone 7 hacks, but it seems that the HTC devices are the ones getting all the fun there.&lt;/p&gt; &lt;p&gt;For instance, the member xboxmod have found a &lt;a href="http://forum.xda-developers.com/showthread.php?t=907169" target="_blank"&gt;way to install provxml on WP7&lt;/a&gt;, and hence total access to the registry, which allowed them to change the &lt;a href="http://s317073502.onlinehome.fr/b.a.s.e/?p=175" target="_blank"&gt;WP7 themes&lt;/a&gt; with custom colors, &lt;a href="http://forum.xda-developers.com/showpost.php?p=10514830&amp;amp;postcount=17" target="_blank"&gt;disable relocking&lt;/a&gt; the phone once unlocked with ChevronWP7 and a lot of other stuff.&lt;/p&gt; &lt;p&gt;On the other hand, a lot of the member have been asking if there is a way to do so on Samsung devices (Omnia 7 and the Focus). While we have access for read/write on the registry for Samsung devices, it is so limited compares to the provxml method on HTC devices.&lt;/p&gt; &lt;p&gt;I developed a simple app showing how to write the registry using the Samsung native DLLs, so hopefully some guys will pick this up till we come up with a full functioning method to manage the registry on Samsung Devices.&lt;/p&gt; &lt;p&gt;This is the link to the application (&lt;a href="http://forum.xda-developers.com/showthread.php?t=910911" target="_blank"&gt;the XAP file with the source code&lt;/a&gt;), you find in the same thread a homebrew registry viewer too which allows the traversal of registry keys.&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_MIqc395dv38/TS73vqCcJ8I/AAAAAAAACj4/dldb7KnjF84/s1600-h/Sans%20titre%5B3%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="Sans titre" border="0" alt="Sans titre" src="http://lh4.ggpht.com/_MIqc395dv38/TS73wYUYqOI/AAAAAAAACj8/Wvrh9sW35no/Sans%20titre_thumb%5B1%5D.png?imgmax=800" width="163" height="306"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Happy hacking!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8964007124326996693-1854067933919506217?l=www.martani.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MartaniTechBlog/~4/5_PSl8qtnHQ" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/MartaniTechBlog/~3/5_PSl8qtnHQ/wp7-hacks-reading-writing-registry-on.html</link><author>noreply@blogger.com (fakhrou martani)</author><media:thumbnail url="http://lh4.ggpht.com/_MIqc395dv38/TS73wYUYqOI/AAAAAAAACj8/Wvrh9sW35no/s72-c/Sans%20titre_thumb%5B1%5D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.martani.net/2011/01/wp7-hacks-reading-writing-registry-on.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8964007124326996693.post-7758202231753037540</guid><pubDate>Tue, 11 Jan 2011 00:31:00 +0000</pubDate><atom:updated>2011-01-11T01:34:17.437+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">huffman</category><category domain="http://www.blogger.com/atom/ns#">ocaml</category><category domain="http://www.blogger.com/atom/ns#">algorithm</category><title>Huffman Compression / Decompression in OCaml</title><description>&lt;p&gt;I worked lately on a simple application in OCaml that compresses files using the Huffman compression algorithms. The application is a showcase of how to use the &lt;a href="http://en.wikipedia.org/wiki/Huffman_coding" target="_blank"&gt;Huffman’s Static&lt;/a&gt; compression, decompression algorithms compared to the &lt;a href="http://en.wikipedia.org/wiki/Adaptive_Huffman_coding" target="_blank"&gt;dynamic (adaptive)&lt;/a&gt; algorithms (Vitter algorithm is used in the application).&lt;/p&gt; &lt;p&gt;The source code is available on github here &lt;a href="https://github.com/martani/Huffman-compression--OCaml-" target="_blank"&gt;https://github.com/martani/Huffman-compression--OCaml-&lt;/a&gt;. Although the code is not as elegant as it should be, we have used excessively the imperative features of OCaml for optimization reasons, especially for the adaptive algorithm where the tree changes with every introduction of a new symbol to code. So it is not really the best place for OCaml beginners who should be baptized with the functional beauty of the language before they see its evil imperative side :).&lt;/p&gt; &lt;p&gt;Although, It might be a great place too to see how the imperative and functional programming could be done on the same land, I don’t promise anything though, since we did the project in the hurry with just few days in our hands to prepare for exams and … you know the rest of the story.&lt;/p&gt; &lt;p&gt;So the project uses only the primitive OCaml modules, there is no libraries to install or anything, there is also an associated Makefile to compile and test the executable.&lt;/p&gt; &lt;p&gt;The Makefile has a make test directive to test the executable on a file named ”input” in the working directory (that you should include yourself obviously), basically it stars a static compression followed by a decompression then compares the original and the decompressed files to ensure the program works correctly. It does the same with the dynamic method too.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;On a side note, we were surprised that while compiling the code with ocamlopt, we get sometimes programs that run 15x times faster than the same program compiled with ocamlc.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;For a file about 5.8 MB we got some executing time around &lt;/p&gt; &lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt; &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; ***@****-Studio-1558:~/workspace/huffman$ make test&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt; Testing... &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; huffman&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt; Compress:&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt;   5:&lt;/span&gt; 1.18 &lt;span style="color: #0000ff"&gt;user&lt;/span&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt;   6:&lt;/span&gt; 0.00 system&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt;   7:&lt;/span&gt; 0:01.19 elapsed &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt;   8:&lt;/span&gt; 99% CPU (0avgtext+0avgdata 5504maxresident)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt;   9:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum10"&gt;  10:&lt;/span&gt; Uncompress&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum11"&gt;  11:&lt;/span&gt; 2.26 &lt;span style="color: #0000ff"&gt;user&lt;/span&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum12"&gt;  12:&lt;/span&gt; 0.00 system &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum13"&gt;  13:&lt;/span&gt; 0:02.27 elapsed &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum14"&gt;  14:&lt;/span&gt; 99% CPU &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum15"&gt;  15:&lt;/span&gt; &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;Compressed = Uncompress ??&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum16"&gt;  16:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum17"&gt;  17:&lt;/span&gt; Testing... &lt;span style="color: #0000ff"&gt;dynamic&lt;/span&gt; huffman&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum18"&gt;  18:&lt;/span&gt; Compress&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum19"&gt;  19:&lt;/span&gt; 8.11 &lt;span style="color: #0000ff"&gt;user&lt;/span&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum20"&gt;  20:&lt;/span&gt; 0.01 system &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum21"&gt;  21:&lt;/span&gt; 0:08.13 elapsed &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum22"&gt;  22:&lt;/span&gt; 99%CPU &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum23"&gt;  23:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum24"&gt;  24:&lt;/span&gt; Uncompress&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum25"&gt;  25:&lt;/span&gt; 4.04 &lt;span style="color: #0000ff"&gt;user&lt;/span&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum26"&gt;  26:&lt;/span&gt; 0.00 system &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum27"&gt;  27:&lt;/span&gt; 0:04.05 elapsed &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum28"&gt;  28:&lt;/span&gt; 99%CPU &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum29"&gt;  29:&lt;/span&gt; &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;Compressed = Uncompress ??&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;As you can notice, the static version of the program is faster than the dynamic one, this is due to the fact that we optimized the the static version to use actual bits on compression / decompression, but we used &lt;strong&gt;lists&lt;/strong&gt; to represent the bits (0’s and 1’s as actual 32 bit integers!!), so that was expected.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Link for the source code : &lt;a href="https://github.com/martani/Huffman-compression--OCaml-"&gt;https://github.com/martani/Huffman-compression--OCaml-&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8964007124326996693-7758202231753037540?l=www.martani.net' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MartaniTechBlog/~4/aMGvFIzPF9E" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/MartaniTechBlog/~3/aMGvFIzPF9E/huffman-compression-decompression-in.html</link><author>noreply@blogger.com (fakhrou martani)</author><thr:total>0</thr:total><feedburner:origLink>http://www.martani.net/2011/01/huffman-compression-decompression-in.html</feedburner:origLink></item><language>en-us</language><media:rating>nonadult</media:rating></channel></rss>

