Contents tagged with Tweaks
-
Obfuscation - Making Reverse Engineering Harder
In a previous article I have demonstrated how easy it is to decompile and reverse engineer .NET assemblies using Reflector and Reflexil. I've also shown that applying a strong name to your assembly does not protect your code from reverse engineering. So, what else is left?
-
Efficient Compound Index Usage
Today I was made aware by Filip, a colleague of mine, about the importance of columns used in a where clause with a compound index. I decided to investigate this a bit more in detail, with proper profiling and comparisons on a large data set.
-
String Concatenation vs Memory Allocation
Over the years, plenty has been written about string performance, lots of comparisons between String.Concat and StringBuilder. Today I decided to do some of my own research into the subject and contribute to the knowledge already out there. More specifically, I'll be taking a look at the memory usage for various concatenation methods and compiler optimizations used to generate the IL.
-
Code Signing as Reverse Engineering Protection
In my last post I spoke about reverse engineering .NET assemblies upon which Gregory asked how to protect his code against it.
-
Reverse Engineering with Reflector and Reflexil
I've always been a big fan of Reflector, allowing me to have a look in assemblies to learn new things, debug in case of problems and provide usefull information when creating bug reports. Combined with the Reflexil Add-in it's now easy to also modify assemblies yourself.
-
Personalizing Outlook Today
Do you find Outlook Today too boring? I do! Let's have a look at how we can transform it into something more visually appealing, something like this: (click the image for a full view)
-
Visual Studio 2008 and PHP Coloring
Long ago, I write a post about Visual Studio.NET and PHP Coloring. Today I'm revisting the approach for Visual Studio 2008, with screenshots, updated keyword files and ready to use registry files.
-
Searching inside SQL Files
This post has been moved to http://blog.cumps.be/search-file-contents/
-
Changing Pocket PC Language
The Pocket PC I recently received was completely in French, so I figured 'I'll just change this to English'.
It can't be that hard, can it? Apparently it was trickier then I thought.
The Pocket PC has the OS in it's ROM, and it has limited ROM, so no multilanguages in there.
It quickly became obvious to me the ROM had to be flashed with an English version, but where to get it?
I didn't buy the Pocket PC, so asking Dell to give me an English one probably would fail, and from various messageboards I discovered they won't do it anyway.
So, where to get it? From the Dell site I guessed, in the download section there was an English update for Windows Mobile 2003 Second Edition.
Since this update just flashes the ROM and puts the new version in it, I guessed this was ok.
But when trying to flash it, it started complaining about being the wrong language.
Apparently French can only be upgraded to French, and since I don't speak French fluently this wasn't practical :)
So, search engine to the rescue. I found this post on Aximsite, a site dedicated to Dell Axim resources.
It seemed logical, get the English and French ROM, make the updater believe the English ROM is actually a French language, and flash.
The process looked obvious to me, so, let's get started!
I opened up the French ROM and English ROM in a hex editor and located the differences:
Note:
This is different from the forum post! It's not the first 7 lines you have to copy paste.
Pasting the first 7 lines results in an Integrity Check error. It's enough to change everything before the "AXIM30".
After having modified the English ROM with the new header, I saved it to the French updated directory, overwriting the original French ROM update. (So, now you have a filename which indicates it's a French ROM, but it's actually the English ROM with the French header)
I did the same for the other image (there is a C and an N image).
Now I ran the updater, which did not give me an error about Integrity Check anymore, and also not about wrong language.
It succesfully updated the ROM and after the Pocket PC restarted, everything was English!
So, now I have an English Pocket PC :)
Ofcourse, the disclaimer on my blog applies especially to this post, as this is not something you should do quickly if you have no technical skills.
So: I (David Cumps) cannot be held responsible for any damage what-so-ever that might come from this post. You do this at your own risk. -
Adding Search to my Blog
Important Notice:
If you want to add this to your blog, read:
http://www.google.com/services/terms_free.html
http://www.google.com/stickers.html
http://www.google.com/permissions/guidelines.html
As noted in the comments to this post, the code below violates their agreement. You can fix this by putting a Google logo of the stickers site next to your search, you can't modify the logo! If you use a search, you can only put Google on your site, not together with MSN.
If you do all of this, you're fine. Now you have three choices:
1. You don't care and use it like this in minmalistic form, some say your site will be removed from Google when doing so.
2. You make the changes I just said, and everything is fine, it just doesn't look that much finished anymore :)
3. You remove it all together. (my choice)
The choice is yours, never complain to me if Google removes your site :p
Now back to the post.
After reading Heather's post about searching and taking a look at Geoff Appleby's JavaScript function I decided to add a Search box to my blog as well.
Here's a step by step explanation on how to add it:
- Go to your blog's Admin section.
- Go to Options.
- Go to Configure.
- Add the following to 'Static News/Announcement':
1<h3>Search</h3>
2<input class="BlogSearch" type="text" name="searchBox" id="blogSearchText" value="" onkeypress="return blogSearch(event, this);">
3<input type="button" value="Search" onclick="return blogSearch2('blogSearchText');" class="BlogSearchButton">
4<script type="text/javascript">
5
6function blogSearch(event, oInput) {
7 var keyCode = (event) ? event.keyCode : keyStroke.which;
8 if (keyCode == 13) {
9 top.location = 'http://www.google.be/search?q=' + escape(oInput.value) + '+inurl%3Acumpsd+site%3Aweblogs.asp.net';
10 return false;
11 } return true;
12}
13
14function blogSearch2(oInputId) {
15 var oInput = document.getElementById(oInputId);
16 top.location = 'http://www.google.be/search?q=' + escape(oInput.value) + '+inurl%3Acumpsd+site%3Aweblogs.asp.net';
17 return false;
18}
19</script> - Replace cumpsd with your blog url.
- Save.
- Admire your new search.
1<h3>Search</h3>
Update: Fixed script to work with Firefox as well (removed window.navigate and fixed event parameter and keyCode)
2<input class="BlogSearch" type="text" name="searchBox" id="blogSearchTextMSN" value="" onkeypress="return blogSearchMSN(event, this);">
3<input type="button" value="Search" onclick="return blogSearchMSN2('blogSearchTextMSN');" class="BlogSearchButton">
4<script type="text/javascript">
5
6function blogSearchMSN(event, oInput) {
7 var keyCode = (event) ? event.keyCode : keyStroke.which;
8 if (keyCode == 13) {
9 top.location = 'http://search.msn.com/advresults.aspx?q=' + escape(oInput.value) + '%20cumpsd&FORM=SMCA&adv_f=all&adv_dom=weblogs.asp.net&adv_depth=&adv_dt=html&adv_dt=pdf&adv_dt=ppt&adv_dt=msword&adv_dt=x';
10 return false;
11 } return true;
12}
13
14function blogSearchMSN2(oInputId) {
15 var oInput = document.getElementById(oInputId);
16 top.location = 'http://search.msn.com/advresults.aspx?q=' + escape(oInput.value) + '%20cumpsd&FORM=SMCA&adv_f=all&adv_dom=weblogs.asp.net&adv_depth=&adv_dt=html&adv_dt=pdf&adv_dt=ppt&adv_dt=msword&adv_dt=x';
17 return false;
18}
19</script>
Update2: Added escape(), MSN version and site: restriction
Update3: Fixed MSN version, had a typo in the function name and id
Update4: Added important notice about Google terms. (This does mean I have informed you of it and you don't have to comment here about legal issues...)