Dede: Delphi Decompiler

This is an interesting tools i've got from my partner in Surabaya. An application used to decompile executable files created from Delphi. I've been so long waiting for this since it has special feature that never exist yet from others previous similar tools.

So,what is the special feature? Dede can completely rebuild the projects (DPR), forms (DFM) & units (PAS) files from an existing uncompressed EXE. The previous tools named ExeScope & ResHacker doing only retrieving the DFM meta informations.

I've tried to rebuild all of this from a sample i made from Delphi. It consist of a single form named Test & a unit files named UUtama.pas. I compiled until it created an executable Test.exe file. Then, i open this executable from Dede:

Click to enlarge...

Next, i tried saved to Delphi projects space:

Click to enlarge...

Then below is the result:



I re-open the DPR files over Delphi & this below is the result pasted from the editor:

{This file is generated by DeDe Ver 2.43 Copyright (c) 1999-2000 DaFixer}
Project Test;
Uses
UUtama in 'UUtama.pas' {TForm1};
{$R *.RES}
begin
{
0044DD9C 55 push ebp
0044DD9D 8BEC mov ebp, esp
0044DD9F 83C4F0 add esp, -$10
0044DDA2 B82CDC4400 mov eax, $0044DC2C
|
0044DDA7 E8B887FBFF call 00406564
}
end.
Analyzed by your self & you might be see something ;-). Anyway, by now, you - as the Delphi programmer - should be carefull to secure your public released projects since this application could crack something over your current application.

  Post a Comment

Lazarus: The Cross Platform Compiler (part II)

This article is my last experience about finding out how to make connection to database server within Lazarus application project. Based on my previous article, Lazarus natively support connection into several common database such as Oracle, PostgreSQL & MySQL.



The data components tab offered by Lazarus are so comprehensive & easy to use. My application scenario are planed to create an application over Linux box, connecting into MySQL 4.1.x server, querying a table which have only 5827 records & display it to the grid, also compared it with the same project re-compiled on a Window$ box to determine how long it takes time to display the result query.

At first, I put a button, a grid box, a DB navigator & a status bar components on a form. This button component required to opened the connection, the grid used to display rows, a DB navigator functioned to take a control the database manipulation operation, while the status bar will display the total records counted. There are some non-visual components also needed to link the connection into MySQL such as MySQL41Connection1, SQLTransaction1, SQLQuery1 & Datasource1.



While the complete example code I wrote below has the same structures as Delphi has (without the code completion which Lazarus not supported yet indeed).

unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, Buttons,
DBGrids, ComCtrls, mysql41conn, DB, sqldb, DBCtrls;
type
{ TForm1 }
TForm1 = class(TForm)
Button1: TButton;
Datasource1: TDatasource;
DBGrid1: TDBGrid;
DBNavigator1: TDBNavigator;
MySQL41Connection1: TMySQL41Connection;
SQLQuery1: TSQLQuery;
SQLTransaction1: TSQLTransaction;
StatusBar1: TStatusBar;
procedure Button1Click(Sender: TObject);
procedure StatusBar1DblClick(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
Form1: TForm1;
implementation

{ TForm1 }
procedure TForm1.Button1Click(Sender: TObject);
begin
MySQL41Connection1.Connected:=false;
MySQL41Connection1.HostName:='server';
MySQL41Connection1.Databasename:='test_db';
MySQL41Connection1.UserName:='root';
MySQL41Connection1.Password:='password';
MySQL41Connection1.Connected:=true;
SQLQuery1.Database:=MySQL41Connection1;
DataSource1.DataSet:=SQLQuery1;
SQLQuery1.Close;
SQLQuery1.SQL.Clear;
SQLQuery1.SQL.Add('select count(*) as n from test_table');
SQLQuery1.Open;
StatusBar1.SimpleText:='Jumlah Record: '+SQLQuery1.fieldbyname('n').asstring;
SQLQuery1.Close;
SQLQuery1.SQL.Clear;
SQLQuery1.SQL.Add('select * from test_table');
SQLQuery1.Open;
end;

initialization
{$I unit1.lrs}
end.

Then I compiled & saved the projects named with browse. Lets see how much the ELF executable file size is? 8,78Mb! I re-compiled on Window$ and the EXE file size is more bigger, 10,8Mb!. No big deal, I back to the Linux and tried to run the application. Pressing the button to start the process until it shows rows in a grid would takes estimated 28 seconds. This relative same number happened while I tried to run over the Window$.



Note that on Window$, you have to provide the libmysql.dll referred to the same MySQL version to connecting to MySQL host, just the same you have to do if you open the connection with DBExpress component on Delphi. Just to compared, I also tried to made the same application over Delphi via ODBC connection. The time to processed above takes about 6 seconds!. Overall, this introduction to Lazarus makes me more steady to work on my next nearly incoming projects.

  Post a Comment

Lazarus: The Cross Platform Compiler (part I)

Get checked this out after friend of friend told me about the (very) multi platform compiler existed. It named Lazarus, an open source compiler project published at sourceforge.net. The developers are too serious to work on it since it released on 3 different OS platform simultaneously! Window$, Linux (RPM & Debian packages) & Mac OS.

The latest version are 0.9.2 & the whole stuffs is available to download. I tried to download the both version Window$ & Linux since it is important to support my incoming projects. I'd like to compared, make a short reviews & this is my first article.

Window$ setup file come in a single exe package. The size is quite small for ordinary compiler, it's only 49Mb. While Linux version are come in 2 packages. One package are the Lazarus RPM core with the size of 48Mb & the rest is the compiler source, nearly 18Mb.

Generally, I guessed that this product was designed on top of the Free Pascal Compiler (FPC) but it was true indeed. I had installed on both machine Window$ XP & Fedora Core 4 Linux (with custom kernel 2.6.17), there were no problem at all. The Lazarus splash shown continued by it IDE’s loading progress. The IDE's is similarly look like Delphi but it’s not compatible with the Delphi Projects DPR files. There are multiple window covered the monitor. The components tabs are arranged & so comprehensive included it’s native support with common database server such as Oracle, PostgreSQL & MySQL (version 4.0, 4.1, 5.x).



I tried to analyzed a default project loaded & I found that the source architectures was completely same as Delphi had. Off course there was a little bit differences with the initialization header & the compiler directives. I tried to put a button on the form and added a Delphi close application syntax. The compilation command are followed by a shortcut key Ctrl+F9, an usual way with Pascal.

The compilation result will created an EXE file on Window$, while Linux will created an ELF binary executable file. The next interesting part is the executable file size. It was 600% larger than an executable file created with Delphi. 6700Kb compared to 300Kb with it’s default form equipped a button & a close command. I though that the problem was related to the incomplete code optimization or something.

Tomorrow, I’ll post the next article regarding to database link within Lazarus native component

  Post a Comment

Tricks to Bypassing the IRC Service & Forbidden Website from Your Network

Have you worked in a completely "closed" network on your office? This "closed" terms referring to the limitations of your network ability. For example, your network only support for mail & safe browsing (without adult web content materials). Your network administrator has been currently locking off some of the computer port numbers related to other services. No chatting, no p*rn sites, no ftp access, it's real suck!

I'd been made an underground research how to bypassing all of this (since I was the victims in my network too). All you have to do is preparing the Linux box and create it as the local web server connected to the active network (direct connection without proxy). There is no special requirement about what kind of Linux you may use. I am currently using Fedora Core 4 by now with the latest kernel version of 2.6.17.

For the limitation of web content browsing, you need to download third party web based software named PHProxy and make it online to your local web server. Before you start to browse the forbidden address, open your browser and link it to the local PHProxy index page. Type the address on a address box and voila! You can bypass the proxy which blocked you directly. Notes that the PHP have to be in version 4.x.x in order to work correctly. Since this application is still in development, you may experience un-interpretated JavaScript at some website.

Meanwhile, for the lacks of chat connections via IRC, you may need Gaim application package. Make an usual process to connect as mIRC did, and yes! You're online to the channel you'd like to enter.

For others instant messages, try to use IM application package. By default, the jabber protocol which compatible to Google Talk using different port with Yahoo IM. So, it is become not a matter anymore to having private chat within jabber compatible protocol such as ICQ or Google Talk.

May this tricks beneficial for you. Do it by your own research.

  Post a Comment

Global IT Threats & Cyber Crime


I was in the middle of workshop held on Jakarta Borobudur hotel last thursday. The topics as shown as the header above are still hot in recent days. This is not only because that the government are not too seriously producing the cyber crime laws yet, but also many aspects are related to it too.

There were lots of cyber crime categorize cases happened in Indonesia. It might be a kind of fraud, illegal carding, phising, web deface, software piracy until local viruses attack. So and so soon or late impedes the Indonesia economics growth, caused the investors hesitant out from Indonesia and decrease the numbers of software produced by local developers because they too worried that the products become the next of crime target.

Well, in spite from several technologies against the cyber crime such as security box, firewall, antivirus products and others, I think the operating system become the first prime target you have to watch out. Lots of desktop out there installed with Window$ which are primarily targeted for viruses.

I'm not going to screw you about this, but you better have to see what "viruses" are resident on Linux comparing the same situation with Window$ at this link. Indeed, the Linux viruses is not as danger as the Window$, because it just only a Trojan or something.

Also, the strong fundamental of operating system depends on what architecture it used. Get it? The last is talking about the overall (licenses) prices. I'm not so naïf about this, but you can measured it by your self.

  Post a Comment

Google Talk: Tips & Tricks


Here below are some tips & tricks of Google Talk you can apply. I've collected it out of somewhere on the internet.

Shortcuts


* CTRL + Mousewheel up/down over input textbox: Change the font size of the textbox.
* F9: Open Gmail to send an email to your friend
* F11: Start a call with your friend
* F12: Stop the current call
* ESC: Close the current window
* ALT + ESC: Minimize the current window
* TAB: Switch between multiple chat windows
* CTRL + I: Same as TAB
* SHIFT + TAB: Same as TAB but in reverse order
* CTRL + TAB: Same as SHIFT + TAB
* Windows + ESC: Open Google Talk (if it's minimized, or in the tray)

Conversation Text

* A message can be 32767 characters long.
* Certain smileys are recognized by Google Talk and will be shown in blue.
:-| :-O :-x :-P :-D ;-) :-( :| :O :x :P :D :) :( ;-| ;-O ;-x ;-P ;-D ;-) ;-( ;| ;O ;x ;P ;D ;) ;( B-| B-O B-x B-P B-D B-) B-( B'( BO Bx BD B) B( B) And you can put a ' between the characters to get another one shown in blue.
* To write text in bold, put it between *asteriks*
* To write text in italic, put it between _underscores_
* You can insert special characters like ♥♫☺ with 'Start / Programs / Accessories / System Tools / Character Maps'.

Conversation Window

* Drag a conversation window on top of another and they will dock together.
* Drag a file onto the chat history and you'll send the file to the selected contact.
* When you see a message notification, you can right click it to close it without focusing the conversation window.

Conference Calls

* What you need to do to have conference calls: Open up a copy of Google Talk on all computers with which you wish to conference. After one copy is opened make a new shortcut for Google Talk but at the end of it add /nomutex. If you installed it to the default folder then your shortcut should read "C:\Program Files\Google\Google Talk\googletalk.exe" /nomutex. Open 2 instances of the software on every user's computer. After this start a chain: User 1 should connect on one instance to user 2. User 2 will connect on his second instance to user 3. User 3 will connect using his second instance back to user 1. With this chain everyone is connected to everyone.

Nickname & Status Message

* You can change your name in the Google Account page.
or To change the nickname need to go to your Gmail account and change the name there. Choose Settings, Accounts, and then Edit info. Click on the second radio button, and enter your custom name.
As a result all of your emails will have that nick as well, there is no way to seperate the two.
* You can add a website in your custom message, it will be clickable when someone opens a conversation window with you.

Contacts

* You don’t need to say Yes or No when someone wants to add you as a friend; you can simply ignore it, the request will go away. (On the other hand, someone with whom you chat often will automatically turn to be your friend, unless you disable this).
* The Gmail account 'user@gmail.com' can't be invited as your friend.

Sound & Video

* It's possible to broadcast music, MP3, etc.. through Google Talk.
Unplug your microphone. Double click on the speaker icon in the lower right corner. This will open
up "Volume Control". Select "Options" and then "Properties". Then check the button
next to "Recording" then click OK. You may also have to change your setting under
Mixer Device. Now the Recording Control screen should be up. On my computer I selected "Wave Out Mix". Click on the green phone in Google Talk and call your friend.

Secret Startup Parameters

* /nomutex: allows you to open more than one instance of Google Talk
* /autostart: when Google Talk is run with this parameter, it will check the registry settings to see if it needs to be started or not. If the "Start automatically with Windows" option is unchecked, it won't start.
* /forcestart: same as /autostart, but forces it to start no matter what option was set.
* /S upgrade: Used when upgrading Google Talk
* /register: registers Google Talk in the registry, includig the GMail Compose method.
* /checkupdate: check for newer versions
* /plaintextauth: uses plain authentication mechanism instead then Google's GAIA mechanism. Used for testing the plain method on Google's servers.
* /nogaiaauth: disables GAIA authentication method. The same as above.
* /factoryreset: set settings back to default.
* /gaiaserver servername.com: uses a different GAIA server to connect to Google Talk. Used for debug purposes only, there are no other known GAIA servers.
* /mailto email@host.com: send an email with Gmail
* /diag: start Google Talk in diagnostic mode
* /log: probably has something to do with the diagnostic logging
* /unregister: ?
* /embedding: ?

Others

* If there’s something you think is missing in Google Talk, send off a message to Google.
* There was a hidden game in Google Talk. In the about screen you could see 'play 23 21 13 16 21 19 . 7 1 13 5'. Each number represented a letter. a=1, b=2, c=3 .... When you translated this message it said: 'play wumpus.game'. To play this game you had to invite wumpus.game@gmail.com as a friend. wumpus.game@gmail.com is always offline now. You can still play Hunt the Wumpus here.
* Google Talk can dock into the Google Desktop Sidebar. Doubleclick on the titlebar in the Google Talk main window and it docks as a panel into the GDS and slides out when you click the top of the docked panel.

Source: http://www.customizetalk.com

  Post a Comment

U.S Market Stocks Exchange: Impressive Google!

For couple weeks, I’ve been following several international IT companies tracks stock exchange registered in U.S market such NASDAQ or NYSE (New York Stock Exchange). I pluck up my courage and begin writing this article after I’ve seriously interesting on these exchange titles especially to the high-rank IT's related companies.

I was literally focused on Google, Microsoft & Red Hat companies this time and here is my first trial reviews. Your comments - if any - are widely welcome.

Google with it's strong fundamental strategy was established to intercept both Yahoo and MSN paths. Fortunately, they did it. After doing acquisition with others dot com-ers companies (the last is YouTube.com) and having a great success with their innovative products (GMail, GoogleMaps, GoogleTalk, GoogleDocs, etc), Google's position are over the wind now and tend to rising for more.



Check it out it's stock exchange histories recorded by Yahoo Finance and get the facts that Google stocks are in their stable-increase revolving nearly $500 per stock at current week. It was raised more than 100% more from the previous year. What an awesome struggle, even for the limited stocks available.

Anyway, Microsoft corp. are in stand position. There are optimistic market which running it's under slow but sure progress. The histories said that the alteration was not changes significantly, but they are truly rising. The price offered 20x less than Google's but the stocks amounts are plentiful.



Meanwhile, Red Hat stocks are not so well. As the leader of open source company, they have to announce a competitive market so that the stockers will pay attention for it. Either the world is not too intensively watching out the current market of open source industry.



I'm not a real stocker, I’m just an ordinary commentator who excited about the Google stocks in the U.S market. I wonder if I had much money and bought the Google stocks in the past. So that I’ll have wide smiley in this recent months! Earning money passing my boss salary, of course.

  Post a Comment

Depth First Search with Visual Basic

Depth First Search (DFS) is a kind of tracking method implemented in artificial intelligence. The goal is to finding a way out from some deviate paths. There are various examples solved with this method such Labyrinth. Labyrinth – as we all know – is a brain game that playing a rule getting an exit door by entering a confusing tracks map.

For couples years ago (2001?), I was excited with this theory. And finally realized to did it by made an application with the rule of Labyrinth. But, first, I’d like to tell you a little about DFS. The DFS tracking process begin from the root node and continued to the next level node below as sequentially.



As the picture shown above, the real path solved with DFS method are A-B-D-E-C. In a short, the core processes explained by the following priorities direction formulas: left, down, right and up. Let’s see the core code written on Visual Basic 6 below:
Public Sub cekMap()
lpKeyName = Str(dum_pos)
baca = GetPrivateProfileString(lpAppName, lpKeyName, lpDefault, temp, Len(temp), lpFileName)
lpString = Trim(temp)
nilai = Val(lpString)
End Sub

Public Sub analisa_1() 'OTAK ANALISA DEPTH FIRST SEARCH
kiri = False
bawah = False
kanan = False
atas = False

'cek kiri
dum_pos = posisi
dum_pos = dum_pos - 1
cekMap
If berikutnya_adalah_jalan Then
kiri = True
ElseIf berikutnya_adalah_pintu_keluar Then
X = MsgBox("Aha, jalan keluar ditemukan", vbInformation, "Perhatian")
End If

'cek bawah
dum_pos = posisi
dum_pos = dum_pos + 20
cekMap
If berikutnya_adalah_jalan Then
bawah = True
ElseIf berikutnya_adalah_pintu_keluar Then
X = MsgBox("Aha, jalan keluar ditemukan", vbInformation, "Perhatian")
End If

'cek kanan
dum_pos = posisi
dum_pos = dum_pos + 1
cekMap
If berikutnya_adalah_jalan Then
kanan = True
ElseIf berikutnya_adalah_pintu_keluar Then
X = MsgBox("Aha, jalan keluar ditemukan", vbInformation, "Perhatian")
End If

'cek atas
dum_pos = posisi
dum_pos = dum_pos - 20
cekMap
If berikutnya_adalah_jalan Then
atas = True
ElseIf berikutnya_adalah_pintu_keluar Then
X = MsgBox("Aha, jalan keluar ditemukan", vbInformation, "Perhatian")
End If
End Sub
And this is my application run-time pictures:

Click to enlarge

Click to enlarge

Click to enlarge

  Post a Comment

Updating Fedora Core 4 Kernel: 2.6.11 to 2.6.17

Last month before I got vacation, I had a self chance to updating the fedora core 4 kernel from it's standard version 2.6.11 into the latest 2.6.17 on my laptop. I had done this since there were problems appeared in branches computers relating to unknown hardware devices detection in older kernel. And this is the step by step ways to do (the indonesian version you could find at this page):

1. Download the latest kernel version at here (40 MB)
2. From console (or terminal in X), install the rpm ball by command
rpm -ivh kernel-2.6.17...

3. Then after, a new directory exist at /usr/src/redhat
cd /usr/src/redhat/SOURCES

4. Find linux-2.6.17.tar.bz2 file in the current directory, unpack the tar ball by command
tar xjfv linux-2.6.17.tar.bz2

5. Make a new link to the new kernel
ln -s /usr/src/redhat/SOURCES/linux-2.6.17 /usr/src/linux

6. Type this to change to the directory
cd /usr/src/linux

7. This removes the current .config and other files
make mrproper

8. For ncurses GUI in the terminal
make menuconfig

9. Don't forget to add module support and kernel support for future hardware in menuconfig. Exit and Save to build the config file.
10. To clean the sources for they compile correctly
make clean

11. To make the kernel image, compile and creates compressed image of kernel
make bzImage

12. Compile selected modules
make modules

13. To install newly compile modules (default heads to /lib/modules/linux.2.6.17)
make modules_install

14. Copy the newly created kernel to /boot
cp /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinuz-2.6.17

15. Also copy the newly created System.map to /boot
cp /usr/src/linux/System.map /boot/System.map-2.6.17

16. Make the new link to vmlinuz
ln -s /boot/vmlinuz-2.6.17 /boot/vmlinuz

17. Alse make the new link to System.map
ln -s /boot/System.map-2.6.17 /boot/System.map

18. Create the new one initrd.img according to latest kernel installed
/sbin/mkinitrd /boot/initrd-2.6.17.img 2.6.17

19. Edit the grub.conf found at /boot/grub.conf
File Before:
default=0
timeout=5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.11-1.1369_FC4)
root (hd0,0)
kernel /boot/vmlinuz-2.6.11-1.1369_FC4 ro root=LABEL=/ rhgb quiet
initrd
/boot/initrd-2.6.11-1.1369_FC4.img
title windows
rootnoverify (hd0,4)
chainloader +1
File After:
default=0
timeout=5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
title Kernel Anyar FC4 (2.6.17)
root (hd0,0)
kernel
/boot/vmlinuz-2.6.17 ro root=LABEL=/ rhgb quiet
initrd
/boot/initrd-2.6.17.img

title Fedora Core (2.6.11-1.1369_FC4)
root
(hd0,0)
kernel /boot/vmlinuz-2.6.11-1.1369_FC4 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.11-1.1369_FC4.img
title windows
rootnoverify
(hd0,4)
chainloader +1
(The changes are followed by the bold marked, go editing the files within the rules)
20. Exit and save grub.conf. Re-install it
/sbin/grub-install hd0

21. Finish! Reboot
22. Finally, prove that you have a new kernel
uname -r
If you are doing the right thing, your system will replied with this one
2.6.17

  Post a Comment

Joining the KDE Project

Finally, my spare time jobs on KDE had already continued. I am being an Indonesian translator team there which doing translating for next KDE releases. I am so exciting to contribute these projects after several years having debt of kindness using LINUX in order to support my works.
Currently, KDE having lacks of Indonesian translator (take a look at: http://l10n.kde.org/team-infos.php?teamcode=id or http://www.kde.web.id/wiki/). I was in as volunteer to bring life the Indonesian page existences. Before my submition into the team, I was in the middle of email conversation with Mr. David Fraue (email) regarding to my question about the projects he developed. In his last email, he offered me joining the Indonesian team since no one contributors present at that time. It was happened couple months ago.

Then after, he forwarding me to met Ariya Hidayat (now as team coordinator at kde team and ad-interim "official" replacing I Made Wiryana position for a while at http://tech.groups.yahoo.com/group/id-kde/).

Nowadays, i've been seriously taking a part of kdelibs translation. Hopefully 100% completed at the end of this month as was planned before.

  Post a Comment