Search This Blog
Tuesday, March 25, 2008
Arabic Android - Free Class to enable Arabic
today I have released some source code at the WM_SupportArabic My Open source project, now I have added new class, but this time not for windows mobile it is for JAVA Android developers, I hope the guys uses it and make use of it, here is link for the code
http://wm-arabic.cvs.sourceforge.net/wm-arabic/
with this code, the developer will only need to install the font that has Arabic character shapes
Thanks for your time
BR
Ahmed Essam
P.S: I didn't test the code at all, I hope it works, sorry for that but I really have no time to do that.
P.S: Thanks for NarNouri for his push to do this code,
Saturday, March 22, 2008
dot NET Performance is not that good
How are you guys? I hope that everyone is OK.
Of course all of you know that VS.NET 2008 had released, and there is lots of guys downloaded it, and most of them until now are very happy with the nice IDE and the new features, I liked one thing about the new VS, it is the ability to debug in the .NET framework 3.5 , I have downloaded the new version of VS.NET (2008), I installed it and I start doing the thing that interest me which is debugging in the GREAT DOT NET FRAMEWORK, actually I was trying something so simple, I wanted to change the window title, the code was nothing as I think
this.Text = "New Title";
then I got into the code, and I got shocked, there is hell of processing happen to just set the window title, I didn't imagine that it is like that, I though that there is something wrong, so I go and write some code to test the performance
After I wrote the code I run the application in very normal way, and here is the result (I will explain what did that application do)
simply the application changes the window name 10000 times, and count the ticks using (GetTickCount)
it uses 2 techniques framework code "this.Text" and the Native Method which is using the API "SetWindowText"
and as you can see the snapshot, native is faster than the framework with about 70%,
the point here that the dot NET framework have lots of checks before doing the command, somehow it is necessary, in same time it is time consuming, as I think at certain point if you are really seeking for the performance you will get to the Native as your saver, I know that what I am talking about is not new, but many people are ignoring the performance issue, I am sure that .NET has many performance weakness, for many reasons, now I hope that you like this post and do some tests your self to see what I am talking about , I hope that the post was informative, thanks for your time
BR
Ahmed Essam
Friday, March 14, 2008
RFID-> Security Flaw in Mifare Classic
today post is so short and for some people it is shocking, some guys in "Radboud University" I think it is located in Netherlands have hacked into the RFID for "Mifare Classic" here is video and the link
Link: http://www.ru.nl/ds/research/rfid/
Thanks for your time
BR
Ahmed Essam
Sunday, March 09, 2008
Windows Mobile Hack Videos
How are you guys? someone suggest that I should publish the video of the "Turning windows mobile into spying device" in English, because some people get here in language other than arabic so here it is the videos in Arabic and English and I hope that you like it.
P.S: Sorry for my poor English :)
Original post link : http://www.ahmed-essam.com/2008/02/turning-windows-mobile-device-to-spying.html
English Demo
Link : http://www.youtube.com/watch?v=hESMx8zs8lM
Arabic Demo
Link : http://www.youtube.com/watch?v=ydotWSkX8PA
Thanks for your time :)
BR
Ahmed Essam
Saturday, March 08, 2008
Adding code to Singularity
Yesterday, I have publish post about starting up the Singularity project, today I was seeking for more, in my opinion more is get my self into it, here what I have done, I have start a debug session with the virtual machine, and I go with code, step by step execution, and I found that there is file called shell where all code get back to it, guess what is this, it is the main loop, where the system receive its commands. I have added a few lines, the lines that I have added is, adding the new command name ,description and the call back function that will be used when the user enter the command, so I have write few lines for it, and I rebuild the project in "Tiny" configuration , here is snapshots for what I have got
Here is the command that I have added to the command list that is available in singularity
Here is the result when call the command.
What I have done is not fully right :D, I should read more about the architecture the documents are available at this path
%Singularity Folder%\docs\Design Notes
soon I will try to add more effective code, like showing some Arabic characters on the screen, I hope that I got some time to do that, Thanks for your time
BR
Ahmed Essam
Friday, March 07, 2008
Singularity Step by Step
Today I will go with you in something "from my point of view" is very cool and really nice idea, Microsoft Research guys was working on something called Singularity, this project aim to do operating system that highly safe, what does it mean"Highly Safe OS"? it means that the operating system will not has memory problems that was exist before(before means current days), Buffer over flow, memory leaks and so on, if you have history with development you will know that memory mistakes is the source of all evilness (Viruses and Worms) every evil thing depend on some kind of problem in the operating system or some application.
Now What Microsoft research guys have done is very cool, they made Operating System that uses .NET Framework as base for it, they did everything run above the framework, even the hardware drivers it run above the .NET framework, as they said before 95% of the Kernel is written in C#, 3% C/C++, 2% Assembly.
this Operating System "Singularity" make things run more safe, if this idea works out, in near future writing a virus will need lots of work and real genius, because being above the .NET framework means that the assembly "Application" that is running will have certain permissions and can't be just broken like what happen now, some how it will be hard to be hacked, it doesn't mean that all Operating System will be fully safe or it will not have memory problems, it will just prevent the memory problems from happen, it means that you will not have crashes "it will be very rare", now after this long introduction let us get our hands dirty with some work.
Required tools to have Singularity OS working
first you have to have some tools let us sort it,
- Microsoft Debugging Tools for Windows
- Microsoft Virtual PC
- Dot NET framework 1.1
Building Singularity OS
First of all install .NET framework 1.1After unzipping the Downloaded file from codeplex "Please be sure to put the files in folder without any spaces in its name", click start-> Run
write"cmd" then press Enter
press enter again when you see this stuff show up on the screen
After that you will have a shortcut on your desktop for the RDK
After that right click on "My computer" -> click "Properties" -> click on "Advanced" tab -> click on "Environment Variables"
in the "System Variables" click on "New", in the "Variable Name" enter "SINGULARITY_ROOT" and in the value write "%Path where you unzip the file%\base"
double click on the "Singularity RDK 1.1" icon on your desktop, now you have command line window that is ready to receive commands and prepared for building the Singularity OS
write this commands in the command window
cd build
msb /t:build ..\Distro\World.proj
"world.proj" as described in the documentation has everything in the project, which means that you will build all the code, if you want to do something quick, use Tiny.proj
This operation may take lots of time, on my machine it took 50 minutes
after that in the last few lines, you will have the path of the .iso file "bootable" written in the log file
the log file name is written at the end of the screen log, when you open the log with notepad or what ever you use, search for ".iso"
Here is the files, this image is ready to be used and burnt on CD, to start it on real machine
Preparing the Loopback adapter
We need the Loopback adapter to allow the Microsoft Virtual PC to connect with the Real PC, in our case we need it because we will use the Network boot to start up the Singularity.
Go to control panel and double click on "Add Hardware"
Welcome screen, just click on Next
Select "Yes, I have connected my hardware" and press Next
at the bottom of the list select "Add a new hardware device" and press Next
Select "Network Adapters" from the categories list and press Next
From the left menu select "Microsoft" and from the right list Select "Microsoft Loopback Adapter" and press Next
Press"Next"
Now you have the loopback adapter and ready to be consumed
Now you have the new connection appears on "Network Connections"
Select properties of "Loopback adapter connection" and select "Internet Protocol" and press "Properties"
Enter the IP address "10.99.99.1" and the network mask is "255.255.255.0"
Preparing the Virtual PC
Press"New"
Welcome Screen Just press "Next"
Select "Create a virtual machine" and press Next
Enter the Machine name
Select the type "Other",
Select RAM size needed, I don't think we will need more than what is allocated as recommended
Select "new Virtual hard disk" and press "Next"
select the path and the name of the Virtual PC hard disk file name
press finish.
from the Virtual PC, click on "CD" Menu and click on "Capture ISO image"
after that the system will start as you can see, but I faced some problem with the keyboard, it wasn't working, I think there is a problem, or something wrong I have done :D, but it will work when I boot from the network, wait and I will show you.
Preparing for booting and debugging the system
open "Singularity RDK 1.1" from your desktop, enter this commands
cd boot
bootd /dhcp /tftp
this command open port and do some kind of network boot,
open anther "Singularity RDK 1.1" and write this commands
cd build
boottest ..\boot\pxe.vmc
the last command loads the floppy disk image, all what it does is load the operating system from the network from the ip "10.99.99.1" that's why we setup the loopback adapter
In this snapshot I tried to open the WinDbg but it didn't work, because the command can't find windbg.exe
Here I have added the path of the Windbg to the system path , the I tried again using the this command
cd build
dbg /pipe
after that the debugger started and as you can see there is 2 parts, part for the debug strings, this strings are coming out as trace log, down there the code where you are working on, use the command "break" in the "singularity" windows
when you use "Break" command, it cause a break point in the debugger, you can use this debugger to navigate through everything, stack, memory, current registers and so on
at this point, I wanted to show, how to start his stuff to be able to add our code, the code that i am planing to add and I hope that I success in that is adding Arabic Support to output screen, please pray for me, thanks for your time, it was really exhausting to write such topic, it takes lot of time, anyways it is good as long as you read it, thanks for your time
I forgot to tell you about the Network boot loading,
open the "Singularity RDK 1.1"
write this command
.\built\boottest.cmd /Net .\boot\pxe.vmc
here is the result in the command window, it will be pop anther window
here is the window, it is preparing and listening to the upcoming requests
here it is, now it is feeding the Virtual machine with booting needs,
P.S: in this network booting, I have used the Tiny build of the project
BR
Ahmed Essam