Free Tech Forum
It is currently Mon Aug 21, 2017 3:37 pm

Only registered members can access to many hidden very useful forums. Click here to Register for free or Click here to Login

Board index » Tech » Mobiles » Mig33





Post new topic Reply to topic

 [ 1 post ] 

Author Message

Online
Bot

Date:
Posts: n/a

 
#  

  #  

Offline
Site Admin
User avatar

Joined: Wed Mar 17, 2010 4:36 pm
Posts: 142

Tutorial for modifying mig33 application migpro pc tool Post Posted: Fri Mar 26, 2010 2:38 pm 
Top  
Here is the simple Tutorial for modifying the mig33 application migpro pc tool which will help you to create your own mig33 pc tool migpro

I hope the author of migpro won’t get mad because of this hehehe.. Laughing

CHAPTER I – MODIFYING MIGPRO – THE EASY WAY

Tools:
1. UltraEdit
Code:
http://www.ultraedit.com/index.php?name=Downloads&d_op=getit&lid=1


the link above is for downloading the latest version of UltraEdit..
the file size is huge, about 12 MB..

i use the old version of UltraEdit (v6.00c)
here is the link to download the v6.00c whic is only 857 kB..

Code:
http://www.evilshare.com/b3a88588-650a-102b-a14f-000b6aa2a5f8


or u can try Notepad++ instead..

Notepad++
Code:
http://downloads.sourceforge.net/notepad-plus/npp.4.8.5.Installer.exe?modtime=1207960310&big_mirror= 0

2. Resource Hacker
Code:
http://vortexmind.wen.ru/application/reshack.zip?4702

or
Code:
http://www.evilshare.com/16620fbe-6515-102b-a14f-000b6aa2a5f8


(662 kB)

In this way, u don’t need to hang around with compiler application..
Just use those 2 tools above..

1. MODIFYING THE CONFIGURATION SETTING FILE AND THE IP ADDRESS

A. Modifying The IP Address of migpro
In this section we’re gonna change the IP Address defined in migpro.exe file..
The purpose to change this IP is to avoid an antivirus application to take an action, especially the mail scanner feature..

Open ur migpro.exe file with UltraEdit..
Find the the string 66.151.149.102 (don’t forget to check the Find ASCII option in UltraEdit Find dialog box), and the result like the picture below:
Image

Click on "0" in 66.151.149.102 and type "1" like the picture below:
Image
so the result will be like this:
Image

That’s it and save the file..
Until this step we have the new migpro application contains the new IP Address..
You can run it by double-clicking on the migpro.exe file which u’ve just saved.. And don’t forget to edit the setup.ini file before u run the migpro..

If you want to run many migpro, just duplicate the migpro.exe and setup.ini file onto many folder..
Edit each of setup.ini file into all folder and u’re set!

B. Modifying The Configuration Setting File of Migpro
But the previous way is not good since we need several folders..
Here is the way to make ur migpro exist in 1 folder..

Open migpro that u’ve saved earlier and find the string setup.ini like the picture below:
Image

edit the string into the whatever string u like, for example set01.ini, like the picture below:
Image

Remember, don’t edit it more than 5 letters..
Now save ur file with another file name, such as migpro01.exe
And u can repeat those steps above until u have many new migpro files..

For example, after u edit migpro.exe file and edit the string setup.ini into set01.ini and save it to migpro01.exe, u can edit the string again into set02.ini and save it to migpro02.exe and so on and so on.. Smile

Now the result u have many migpro files in 1 folder.. Very Happy
And don’t forget to duplicate the required ini file for each of migpro u’ve saved..
For example..

migpro01.exe and set01.ini
...
...
migpro10.exe and set10.ini

If u’re satisfied just to edit the IP Addres, then u can stop here..
But if u want to change the look of ur migpro, then u can proceed to the next steps..

2. MODIFYING THE LOOK OF MIGPRO

If it’s too big for u, then u can change it so it has a smaller window, ur ID on the titlebar, remove the button, textfield etc..
For example like the picture below:
Image

Open the migpro1.exe file with Resource Hacker like the picture below:
Image

On the picture above u can..

1. Change the titlebar of migpro to whatever u like by typing in the red circle
2. Change the size of texfiled (no 1 and 2) and buttons by clicking on them, then resize them by dragging the handler like shown in blue circle
3. Change the size of migpro window by dragging the handler like shown in the green circle
4. Delete the textfield and buttons by clicking on them and press Delete key
5. Change the text that appear on the button, for example u can change the text "Rejoin/Join Chat Room" by editing this line:

Code:
CONTROL "Rejoin/Join Chat Room", 3001, BUTTON, BS_DEFPUSHBUTTON | BS_FLAT | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 136, 23, 117, 14

Just edit the text "Rejoin/Join Chat Room" and not the other part in that line..

After u make a modification, click on the Compile Script button in the yellow circle then save the file and repeat the steps to all ur migpro files..

Now u have all migpro u need with different look and titlebar in one folder.. Smile

MY EXPERIMENTS ON THIS WAY

If u have tried migpro command center v1.0.2 beta, u’ll notice that the migpro command center can arrange migpro application on ur desktop automatically..

Actually, migpro command center doesn’t arrange them automatically, but the migpro itself does.. Very Happy

Since i cannot make migpro command center arrange them automatically, then i play a little trick there by editing the position of migpro application when opening them..

Look at the picture below..
Image

and take a look at the code..
Code:
MIGDIALOG DIALOGEX 10, 10, 258, 95
STYLE DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_DLGMODALFRAME


the value 10, 10 is the position of migpro on the desktop (X and Y coordinate), while 258, 95 is the size of migpro window..
So with that value migpro will be on the top left position of the desktop, but not really top left..

I change it to 0, 0 value so migpro will be on top left position of the desktop precisely..
but this value won’t give any effects if DS_CENTER is still defined, so i remove it..

And the result code for top left position is..
Code:
MIGDIALOG DIALOGEX 0, 0, 258, 95
STYLE DS_MODALFRAME | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_DLGMODALFRAME


and i make an additional editing like this..
Code:
MIGDIALOG DIALOGEX 0, 0, 258, 95
STYLE DS_MODALFRAME | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_TOOLWINDOW


with WS_EX_TOOLWINDOW then migpro won’t exist in the taskbar.. Smile

notes:
With WS_EX_TOOLWINDOW there is a featur in JitBit Macro Recorder won’t work..
The feature is "Switch to a window" command...

JitBit cannot find the application that is not shown in taskbar..
so if u want to use that featue, don’t add WS_EX_TOOLWINDOW to migpro resource code..

and for the rest migpro, i just edit the X and Y position..
this is one of the them..
Code:
MIGDIALOG DIALOGEX 262, 0, 258, 95
STYLE DS_MODALFRAME | WS_MINIMIZEBOX | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_TOOLWINDOW


CHAPTER II – MODIFYING MIGPRO – THE INTERMEDIATE WAY

Tools:
1. UltraEdit or Notepad++
2. Resource Hacker
3. MASM32
Code:
http://www.masm32.com/masmdl.htm


In this chapter, we will edit the migpro directly by editing the source code..
If u don’t have the original migpro application and source code, download it from the link below:
Code:
http://www.evilshare.com/bbebaeca-3682-102b-a5a4-000b6aa2a5f8

That zip package contains:
1. migpro.exe (final migpro application)
2. setup.ini (migpro configuration setting file)
3. migpro.asm (migpro source code file)
4. makeit.bat (batch file to compile migpro source code)
5. rsrc.res (resources file)
6. ReadmeFirst.txt

This original migpro uses IP Address 66.151.149.102 to connect to mig33 server.
On early or medio of January 2008 (i don’t remember), mig33 server has changed their IP address to 66.151.149.112..
and since that, the original migpro cannot run properly..
evenmore, we can’t login using mig33 application at that time with their old IP 66.151.149.102 for a couple days..

but several days later their old IP 66.151.149.102 is normal again, and we can login to mig33 server using that IP, but the original migpro got socket error since that time..

Before we proceed to the next steps, it would be better if we have the same working folder in order to minimize misperception..

1. Make a new folder named "migpro" in drive C, so our working folder is "C:\migpro"
2. Duplicate the "migpro.exe", "migpro.asm", "makeit.bat" and "migpro.ini" onto "C:\migpro"
3. Just save the same filename as i do in this tutorial (you can practice of your own later after completing this tutorial)
4. "Open File" or "Save File" in this tutorial means open ur file and save ur file from/to ur working folder which is "C:\migpro"

In this way, u can edit all covered steps in CHAPTER I – MODIFYING MIGPRO – THE EASY WAY plus the port number, since the original migpro uses the port number 25.
In some cases this port is triggering an antivirus application to take an action, and the result causing a socket error problem..

After u install the MASM32 (the default folder is C:\masm32, and just install it in that folder so we have the same story for later steps), u can begin editing the original migpro source code (migpro.asm)

1. MODIFYING THE CONFIGURATION SETTING FILE, IP ADDRESS AND PORT NUMBER

Open the migpro.asm with UltraEdit (Notepad can do it too), and find the lines:
Code:
.data
DlgName            db "MigDialog",0
;********INI***********
khead            db "details",0
kickUname          db "kickuname",0
chatroom         db "chatroom",0
inifilename         db "setup.ini",0
backslash         db "\",0
szNull            db 0
unamafini         db "uname",0
pfini            db "password",0
;***********************

;***********************
sucLogin         db "LOGIN SUCCESFULL",0

;************************

IPAddress          db "66.151.149.102″,0   ; i decied to make it static
Port             dd 25
socketerror          db "socket error",0
wsadata          WSADATA <>
sin                   sockaddr_in         <>


edit the the line that defined configuration setting file, which is originally like this:
Code:
inifilename         db "setup.ini",0


change it to setup01.ini like this:
(u can change it to more than 5 letters, but just save it to setup01.ini so we have the same story)
Code:
inifilename         db "setup01.ini",0


now change the IP Address and Port number, which is originally like this:
Code:
IPAddress          db "66.151.149.102″,0   ; i decied to make it static
Port             dd 25


into new IP Address and port number, like this:
Code:
IPAddress          db "66.151.149.112″,0   ; i decied to make it static
Port             dd 9119


now save the file into new filename migpro01.asm

2. MODIFYING THE LOOK OF MIGPRO

now we need to export the resources file..
like described in the Chapter I, Section 2 on how to modify the look of migpro, u need to do those steps as well..
but the difference is u don’t need to save the file into a new migpro.exe file.
after u make an editing u like, click on Compile Script button, save the resources file by clicking on Action on the menu, like the picture below:
Image

save it to new filename migpro01.res

of course u can save it to other filename u like, but this way is easier for later steps..
now, u have 2 new files: migpro01.asm and migpro01.res

3. COMPILING MIGPRO

On previous section, we have 2 new files: migpro01.asm and migpro01.res.
These 2 files are required for compiling so the result is the new migpro application..

Now, open the makeit.bat file with Notepad..
Here is the command in the batch file..
Code:
@echo off
\masm32\bin\ml /c /coff /Cp migpro.asm
\masm32\bin\link /SUBSYSTEM:WINDOWS /LIBPATH:\masm32\lib migpro.obj rsrc.res


we need to modify it, so the new command will be like this..
Code:
@echo off
\masm32\bin\ml /c /coff /Cp migpro01.asm
\masm32\bin\link /SUBSYSTEM:WINDOWS /LIBPATH:\masm32\lib migpro01.obj migpro01.res


Now we can execute the batch file to compile the migpro..
Just double click on the makeit.bat file, and the masm32 will compile the project, and the result is a new migpro application which the filename is migpro01.exe

If u success to compile it, then the look of ur command prompt window will be like this:
Code:
Microsoft (R) Macro Assembler Version 6.14.8444
Copyright (C) Microsoft Corp 1981-1997.  All rights reserved.


Assembling: migpro01.asm
Microsoft (R) Incremental Linker Version 5.12.8078
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

I think the comfort way in executing the batch file is executing it manually from the command prompt, so we can watch the progress while compiling..
If u execute the batch file by double-clicking on it, then as soon as it finish, the command prompt window will close automatically..
We can’t see the progress or even the failure which might occur..

To execute the batch file manually type cmd on Run dialog box from Start Menu..

Then a command prompt window will be like this:
Code:
C:\Documents and Settings\yourname\>


change it to ur working folder by typing cd c:\migpro, like this:
Code:
C:\Documents and Settings\yourname\>cd c:\migpro

and hit ENTER/RETURN key..
now the prompt has changed to ur working folder, like this:
Code:
C:\migpro>

Or u can make a registry entry so u can directly run a command prompt by right-clicking ur working folder..

Just copy this script below and paste into Notepad..
Save the file with reg extension, for example commandprompt.reg
Code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\command prompt]
@="Command Prompt from here.."

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\command prompt\command]
@="Cmd.exe /k pushd %L"

After u save the file, then run it by double-clicking on the file..
After the registry key has successfully merged into the registry system database, u can right clicking any folder from windows explorer and choose Command Prompt from here..

Right click ur working folder and choose Command Prompt from here.. and u will be in ur working folder directly..
Next step is typing makeit in command prompt, like this:
Code:
C:\migpro>makeit

u can watch the progress with this way..

What if u want to compile ur project files in one shot?
U can edit the batch file so the masm32 will compile all ur project files at once..
Let’s say, u have saved 10 migpro.asm and 10 migpro.res files..

The asm source code:
migpro01.asm
...
...
migpro10.asm

The resources files:
migpro01.res
...
...
migpro10.res

Then the command in the batch file will be like this:

Code:
@echo off
\masm32\bin\ml /c /coff /Cp migpro01.asm
\masm32\bin\link /SUBSYSTEM:WINDOWS /LIBPATH:\masm32\lib migpro01.obj migpro01.res

\masm32\bin\ml /c /coff /Cp migpro02.asm
\masm32\bin\link /SUBSYSTEM:WINDOWS /LIBPATH:\masm32\lib migpro02.obj migpro02.res

\masm32\bin\ml /c /coff /Cp migpro03.asm
\masm32\bin\link /SUBSYSTEM:WINDOWS /LIBPATH:\masm32\lib migpro03.obj migpro03.res

\masm32\bin\ml /c /coff /Cp migpro04.asm
\masm32\bin\link /SUBSYSTEM:WINDOWS /LIBPATH:\masm32\lib migpro04.obj migpro04.res

\masm32\bin\ml /c /coff /Cp migpro05.asm
\masm32\bin\link /SUBSYSTEM:WINDOWS /LIBPATH:\masm32\lib migpro05.obj migpro05.res

\masm32\bin\ml /c /coff /Cp migpro06.asm
\masm32\bin\link /SUBSYSTEM:WINDOWS /LIBPATH:\masm32\lib migpro06.obj migpro06.res

\masm32\bin\ml /c /coff /Cp migpro07.asm
\masm32\bin\link /SUBSYSTEM:WINDOWS /LIBPATH:\masm32\lib migpro07.obj migpro07.res

\masm32\bin\ml /c /coff /Cp migpro08.asm
\masm32\bin\link /SUBSYSTEM:WINDOWS /LIBPATH:\masm32\lib migpro08.obj migpro08.res

\masm32\bin\ml /c /coff /Cp migpro09.asm
\masm32\bin\link /SUBSYSTEM:WINDOWS /LIBPATH:\masm32\lib migpro09.obj migpro09.res

\masm32\bin\ml /c /coff /Cp migpro10.asm
\masm32\bin\link /SUBSYSTEM:WINDOWS /LIBPATH:\masm32\lib migpro10.obj migpro10.res


Then type makeit in the command prompt window..

Code:
C:\migpro>makeit

As u hit ENTER/RETURN key, then masm32 will do the rest..

There u have as many migpro application as u like.. Smile
And all of them are in 1 folder..
And don’t forget to duplicate the required ini file for each of migpro u’ve saved..

ADDITIONAL

If u installed MASM32 into another drive, for example drive D so your MASM32 folder is D:\masm32, and ur working folder is on another drive than C or D, then u will need to edit..

1. makeit.bat
Code:
@echo off
d:\masm32\bin\ml /c /coff /Cp migpro01.asm
d:\masm32\bin\link /SUBSYSTEM:WINDOWS /LIBPATH:d:\masm32\lib migpro01.obj migpro01.res

2. migpro.asm
Code:
include d:\masm32\include\windows.inc
include d:\masm32\include\user32.inc
include d:\masm32\include\kernel32.inc
includelib d:\masm32\lib\user32.lib
includelib d:\masm32\lib\kernel32.lib
include d:\masm32\include\wsock32.inc
includelib d:\masm32\lib\wsock32.lib

MY EXPERIMENTS ON THIS WAY

Now i’ll explain what i’ve been done to the migpro source code..
Please keep in mind, this part is only THE EXPERIMENTS WHICH I DON’T FULLY UNDERSTAND...
So all of them is trial and error hehehe...Razz

A. migpro command center v1.0.2 beta

1. Removing Socket error Message Box

On migpro command center v1.0.2 beta i did some modification to migpro application..
I’ll explain about how i removed the famous "Socket error" Message Box and move it to migpro window...
So in case of socket error, there won’t be any of Message Box anymore..

Take a look at the original migpro source code..
Code:
invoke MessageBox,NULL,addr socketerror,addr socketerror,MB_OK


That code which triggering the Mesage Box..
More running migpro then more Message Box will show its ugly face..Razz

I move that socket error message into migpro textbox labeled TEXT_MAIN
TEXT_MAIN is a static textbox where all of info is shown when running migpro..
U know which one..
Here is the code..
Code:
invoke SetDlgItemText,hwwnd,TEXT_MAIN,addr socketerror


I don’t know what it means, but i try to use it..
I use that code based on this one..
Code:
invoke SetDlgItemText,hwwnd,TEXT_MAIN,addr sucLogin


where that code will show u a LOGIN SUCCESFULL message that u see when u login successfully..
and then i change all part in source code that define invoke MessageBox,NULL,addr socketerror,addr socketerror,MB_OK into invoke SetDlgItemText,hwwnd,TEXT_MAIN,addr socketerror

2. Editing byte value

Another modification which i tried to do is to change values on parts like this..
Code:
db 50 dup(?)


From references i read in internet, 50 is defining how many bytes we assign for a string declaration..
Don’t ask me what it means coz i don’t know too..Razz
But in my brain, wouldn’t it be good if the value is bigger?
I mean more bytes we assign then (maybe) more reliable its performance hehehe..Razz
That’s the way "the suddenly programmer" thinking wakakakak..RazzRazzRazz

So i change some lines of the above code into this..
Code:
db 128 dup(?)


I don’t change its value to the higher one coz i wanna see the effect after i release this version 1.0.2 beta..

B. migpro command center v2.0.0

After couple days since i released migpro command center v1.0.2 beta, there’s no problem with the modification i’ve done..
No one reported an error problem nor the performance degradation, as well as no reporting about the increasing of performance wakakakak..RazzRazzRazz

On v2 i once again made some modifications..
And as the previous modification, all are trial and error..Razz
Here are the chronology..

1. Processor Type

This is the first part i did a modification on..
Code:
.386
.model flat,stdcall
option casemap:none


where .386 (maybe) defined that the compiled application is compatible with Intel 386 processor..
in my mind, if application is made by considering to an old procesor compability, then some performance will be sacrifice..
So i change it to..
Code:
.486
.model flat,stdcall
option casemap:none


with a lot of hoping that it will increase the performance hehehe..Razz
Here are the types that can be defined..

.386
.486
.486P
.586
.586P
.686
.686P

I decide to use .486 and see the effect..

2. ID on migpro application

Next modification is to show the ID on textbox of migpro..
In this step i added an additional textbox to migpro resources (*.res)

Take a look at this picture..
Image
The textbox with vortex01 text is one i added..
Take a look at the resources file (open it with Resource Hacker)..
Code:
CONTROL "", 1002, STATIC, SS_CENTER | SS_SUNKEN | WS_CHILD | WS_VISIBLE, 1, 1, 92, 10 , 0×00000020


where STATIC is the type of control which cannot be edited or type on..
And i added this code to migpro source code..
Code:
.const
TEXT_ID   equ 1002

I gave TEXT_ID as the label..

And in order that textbox showing the ID when running migpro, i added this code..
Code:
DlgProc proc hWnd:HWND, uMsg:UINT, wParam:WPARAM, lParam:LPARAM
.IF uMsg==WM_INITDIALOG
mov edx,hWnd
mov hwwnd,edx
invoke GetCurrentDirectory,sizeof CurrentDir,addr CurrentDir
invoke lstrcat, addr CurrentDir,addr backslash
invoke lstrcat, addr CurrentDir,addr inifilename
invoke SetTimer,hWnd,ID_TIMER,60000,0

invoke GetPrivateProfileString,addr khead,addr unamafini,addr szNull,addr username,sizeof

username,addr CurrentDir
invoke GetPrivateProfileString,addr khead,addr pfini,addr szNull,addr password,sizeof

password,addr CurrentDir
invoke WinSockProc,addr IPAddress,Port,hWnd
invoke SetDlgItemText,hwwnd,TEXT_ID,addr uname


This is the actual line i’ve added..
Code:
invoke SetDlgItemText,hwwnd,TEXT_ID,addr uname

3. Making all migpro read the same configuration setting file

Next, i think about (actually i think about this from a long time ago) how to combine all of migpro configuration setting into 1 single file..
We all knew that the original configuration is like this..
Code:
[details]
uname=
password=
chatroom=
kickuname=


I want all of them exist in 1 single file, so at later time there won’t be many process that migpro command center must do..
Once save, then it means save all at once!
So i try to define the configuration like this..
Code:
[details]
id01=
...
...
id20=
pwd01=
...
...
pwd20=
room=
kick=


Now all i have to do is to change the migpro source code in order it can read the configuration setting file..
I made a modification to this part..
Code:
.data
DlgName   db "MigDialog",0
khead      db "details",0
kickUname   db "kickuname",0
chatroom   db "chatroom",0
inifilename   db "setup.ini",0
backslash   db "\",0
szNull      db 0
unamafini   db "uname",0
pfini      db "password",0
sucLogin   db "LOGIN SUCCESFULL",0
socketerror   db "socket error",0

Look at the result..
Code:
.data
DlgName   db "MigDialog",0
inifilename   db "migpro.ini",0
khead      db "details",0
unamafini   db "id01″,0
pfini      db "pwd01″,0
chatroom   db "room",0
kickUname   db "kick",0
IPAddress   db "66.151.149.112″,0
Port      dd 9119
backslash   db "\",0
szNull      db 0
sucLogin   db "Login Successful",0
socketerror   db "socket error",0


The code above is for 1 application, that is migpro01
The rest is just make another modification for each of migpro application
Code:
.data
DlgName   db "MigDialog",0
inifilename   db "migpro.ini",0
khead      db "details",0
unamafini   db "id02″,0
pfini      db "pwd02″,0
chatroom   db "room",0
kickUname   db "kick",0
IPAddress   db "66.151.149.112″,0
Port      dd 9119
backslash   db "\",0
szNull      db 0
sucLogin   db "Login Successful",0
socketerror   db "socket error",0


The conclusion is just to change uname and password
And i change all part which defined uname and password into id01 and pwd01

Before i forget, another part that must be done is..
Code:
.data?
hInstance    HINSTANCE ?
sock       dd ?
id01      db 50 dup (?)
pwd01      db 50 dup (?)


So, the result all configuration setting in 1 single file.. Razz

4. Editing byte value

Then i remember with the byte value that i’ve changed in v1.0.2 beta..
This time, again i want to raise the value so the result is like this.
Code:
db 512 dup(?)


But i don’t change it to all parts..
There are some parts which don’t need to change to that higher value..
i realized it after some testing..
Those parts are..
Code:
.data?
hInstance   HINSTANCE ?
sock      dd ?
username   db 50 dup (?)
password   db 50 dup (?)


i change them into..
Code:
.data?
hInstance   HINSTANCE ?
sock      dd ?
id01      db 21 dup (?)
pwd01      db 256 dup (?)


i changed id01 to 21 coz the maximal length of username is only 20 characters right?
at first i changed it to 20, and the result is my ID which has length of 20 characters cannot log in Razz
and when i changed it to 21, it can log in..
so i take a conclusion that the value must be added by 1 value hehehe..Razz

Have u faced the error where u cannot login with ur very long password?
it’s caused by the original migpro which is only set to 50 character..

so i changed pwd01 to 256 coz the allowance length of password is very long right?
i decide to use value 256 coz my longer password is about 100 characters hehehe..RazzRazzRazz.

5. Additional Info (entering the room.., leaving the room.. and kicking) text

At first this part is only to make sure whether the keystroke that Jitbit action i made work properly or not..
I want to see whether the action is pressing the appropriate migpro button or not..
Coz i don’t use the mouse-click..

For this need i added the entering the room..., leaving the room... and kicking text, and they must be shown if the button Enter, Leave or Kick is pressed..
I added this line of code..
Code:
.data
DlgName   db "MigDialog",0
masuk      db "entering the room...",0
kluar      db "leaving the room...",0
tendang      db "kicking",0


in order those text are shown in the TEXT_MAIN textbox, i added this code..
Code:
.IF ax==IDC_JOINCHAT
invoke SetDlgItemText,hwwnd,TEXT_MAIN,addr masuk

.ELSEIF ax==IDC_KIKUSER
invoke SetDlgItemText,hwwnd,TEXT_MAIN,addr tendang

.ELSEIF ax==IDC_LEAVEROOM
invoke SetDlgItemText,hwwnd,TEXT_MAIN,addr kluar


Then i tested the script i made before by running it several times..
I watched it, everytime i click on Enter button in migpro command center, will the entering the room... text be shown?
or everytime i click on Leave button in migpro command center, will the leaving the room... text be shown?
or everytime i click on Kick button in migpro command center, will the kicking... text be shown?

and the result everything is going fine..
The appropriate text is shown up when the selected button is pressed..
so it means if i tested it online, the right action will be triggered when i click on the selected button..
and it does!
so it means everything is okay! Razz

6. ? Button

Yeah..this button is only for fun..Razz

First, i added a button in migpro resources..
This is the code..
Code:
CONTROL "?", 3005, BUTTON, BS_PUSHBUTTON | BS_FLAT | WS_CHILD | WS_VISIBLE, 96, 1, 25, 10


3005 is the value i gave so it will be recognized by migpro application..
and i added this line of code too..
Code:
.const
IDC_ABOUT       equ 3005


I name it IDC_ABOUT
i added this part too..
Code:
.data
about      db "this migpro was modified by vortex",0


in order the "this migpro was modified by vortex" is shown when the ? button is pressed, i added this code..
Code:
.ELSEIF ax==IDC_ABOUT
invoke SetDlgItemText,hwwnd,TEXT_MAIN,addr about


7. Send Message

This is the last modification in migpro command center which my brain can do..Razz
This part took a longer time to reach the succesful stage..
i face the failure so many times when i click on Send Message button in migpro command center v2..
at first i wanted that as soon i click on Send Message button, then the message will be sent immediatelly..
but i don’t find the way, and in the meantime Kimi Raikkonen kept calling me asking me about it hehehe..RazzRazzRazz

So i decided to use the way i can, with my own logic..Razz

In migpro configuration setting file i added these lines...
Code:
ngocol01=
...
...
ngocol20=


It’s same with id01= or pwd01= or room= or kick= and it is used to hold the data to be sent..
I added the code in .data part, like this..
Code:
.data
omong         db "ngocol01″, 0

where ngocol01 is message text of migpro01..

and i added this line to .data? part like this..
Code:
ngocol01      db 50 dup (?)


but after i release migpro command center v2, i realized that i don’t change the value 50, coz 50 only can send of 49 characters (like i explain before)
perhaps i’ll change it to 81 in the next release, so it can send of 80 characters as mig33 allow..

These are the process of Sending messages..

1. As soon as Send Message button is pressed, the mesage text is saved into configuration setting file..

2. After saving it, then the compiled (exe) Jitbit action is proceeded and send the keystroke to the Send button in migpro application..

3. And as soon as Send button is pressed by Jitbit, migpro will read the message text in its configuration setting file (ngocol01=)

4. How do it read the message text?
I added this code..
Code:
DlgProc proc hWnd:HWND, uMsg:UINT, wParam:WPARAM, lParam:LPARAM
.IF uMsg==WM_INITDIALOG
mov edx,hWnd
mov hwwnd,edx
invoke GetCurrentDirectory,sizeof CurrentDir,addr CurrentDir
invoke lstrcat, addr CurrentDir,addr backslash
invoke lstrcat, addr CurrentDir,addr inifilename
invoke SetTimer,hWnd,ID_TIMER,60000,0

invoke GetPrivateProfileString,addr khead,addr unamafini,addr szNull,addr id01,sizeof id01,addr CurrentDir
invoke GetPrivateProfileString,addr khead,addr pfini,addr szNull,addr pwd01,sizeof pwd01,addr CurrentDir
invoke GetPrivateProfileString,addr khead,addr omong,addr szNull,addr ngocol01,sizeof ngocol01,addr CurrentDir
invoke WinSockProc,addr IPAddress,Port,hWnd
invoke SetDlgItemText,hwwnd,TEXT_ID,addr id01


The code invoke GetPrivateProfileString,addr khead,addr omong,addr szNull,addr ngocol01,sizeof ngocol01,addr CurrentDir will read the message text in the configuration setting file..
After it is read, i added a command to show that message text in the EDIT_TEMP textbox (the textbox where we used to type our message in the original migpro application), and then Send button of migpro application is pressed..
This is the code..
Code:
.ELSEIF ax==IDC_TEMP
invoke GetPrivateProfileString,addr khead,addr omong,addr szNull,addr ngocol01,sizeof ngocol01,addr CurrentDir
invoke SetDlgItemText,hWnd,EDIT_TEMP,addr ngocol01
invoke GetDlgItemText,hWnd,EDIT_TEMP,addr DLGtext,50
invoke GetPrivateProfileString,addr khead,addr chatroom,addr szNull,addr KCname,sizeof KCname,addr CurrentDir
invoke HIPacket,addr DLGtext,addr KCname,addr id01
invoke AutoInc,addr HIPBuffer
invoke send,sock,addr HIPBuffer,HIhsize,0


The code invoke GetPrivateProfileString,addr khead,addr omong,addr szNull,addr ngocol01,sizeof ngocol01,addr CurrentDir will read the message text in the configuration setting file and then put them in the EDIT_TEMP textbox..

So, it means that the process is the same with when we manually type the message right?
i did this coz i don’t know how to make it simple hehehe..Razz
I use my own way..Razz

and once again i forgot to change invoke GetDlgItemText,hWnd,EDIT_TEMP,addr DLGtext,50 coz value 50 can oly contain of 49 characters..

So it’s done! Razz
Now i just need to change the EDIT_TEMP textbox to STATIC..
this is the code...
Code:
CONTROL "", 2000, STATIC, SS_LEFT | SS_SUNKEN | WS_CHILD | WS_VISIBLE, 1, 51, 92, 12 , 0×00020000


so why must i do that?
because the action i made in Jitbit is using a keystroke, not a mouse-click..
and i choose to use the UP and DOWN key to move the focus between each of control in migpro..
with these keys, if the focus goes to EDIT_TEMP textbox, then it won’t be controlled again by Jitbit..
it will cause the cursor trapped in it and cannot move anywhere else..

proove it urself..
open the original migpro application, and press the DOWN untill the cursor move to EDIT_TEMP textbox..
it cannot move anywhere else right?

To avoid this, actually i can use the TAB key..
but TAB key will move the cursor on and on to every control of migpro..
i don’t want it happened!

prove it again..
open the original migpro application, and press the TAB several times..
it keep on moving right?

And why must i prevent it to move on and on?
because there is a possibility that the keystroke will end up at the wrong button if we run Jitbit action in high intensity and frequency..
that’s why i choose UP and DOWN key coz if the focus (cursor) has reached the Enter of migpro, then it cannot move anywhere else..
then the next action can be done again since i set the starting point of focus at the Enter of migpro
i did this to minimize a mis-pressed by Jitbit..

by making the EDIT_TEMP textbox to STATIC, then the focus won’t stay there..

For ur info:
migpro always re-read its configuration setting file everytime we press the Enter, Leave, Kick or Send button..
i stick to this in order to control the way of migpro command center handle the migpro configuration setting file..
for example in Send Message action..
Everytime we press Send Message in migpro command center, then it will first save the text in the Message textbox..
After that, the Jitbit action is executed, which contains the action to press the Send button of migpro..
As soon as this button (Send button in migpro) is pressed then migpro will re-read its configuration setting file and send the message..

So, based on this migpro behaviour, i’m sure u’ll find so many things to edit.. Wink

Now it’s finish!
I tested migpro command center v2 for a week in private release..
after make sure that there’s no error report (at least by ones who tested it), i release it to public..
but i still forgot to change the value that need to be changed, like the message value (50 bytes)..
perhaps i’ll do it in the next release if i’m not boring yet hehehe..Razz

Okay..
i hope this is useful for u..
and i hope too that u’ll find another better way and features based on what i’ve done here..

happy coding Wink

C. migpro command center v2.0.0 addons

Since April 10th 2008, the time when mig33 launched the new sets of emoticons, almost migpro face a trouble. Everytime migpro is login succesfully, then it gets error and need to be closed..

migpro applications in migpro command center got error too..
so i made a new modifications to migpro application which have several configurations and pack them in addons..

the modifications i’ve made are just two as describe here..

1. Processor Type

I used just two processor type here, .386 and .486
Folder A01 – A05 use .386
Folder A06 – A10 use .486

2. Editing byte value

I increased the byte value to 2048 – 3072

With those two part of editing, then the migpro application works fine again..
I still don’t know what’s the correlation between the byte value with the error that occurs since April 10th..

D. New Experiments

1. Making Migpro Read IP Address From The Configuration Setting File

I’ve found the way to make migpro read the IP Address from its configuration setting file..
Look at what modifications i’ve made..

First, in .data directive (section)
Code:
.data
IPAddress      db "address",0


Second, in .data? directive (section)
Code:
.data?
address         db 50 dup (?)


and the last one in DlgProc proc procedure..
Code:
DlgProc proc hWnd:HWND, uMsg:UINT, wParam:WPARAM, lParam:LPARAM
.IF uMsg==WM_INITDIALOG
mov edx,hWnd
mov hwwnd,edx
invoke GetCurrentDirectory,sizeof CurrentDir,addr CurrentDir
invoke lstrcat, addr CurrentDir,addr backslash
invoke lstrcat, addr CurrentDir,addr inifilename
invoke SetTimer,hWnd,ID_TIMER,60000,0

invoke GetPrivateProfileString,addr khead,addr unamafini,addr szNull,addr id01,sizeof id01,addr CurrentDir
invoke GetPrivateProfileString,addr khead,addr pfini,addr szNull,addr pwd01,sizeof pwd01,addr CurrentDir
invoke GetPrivateProfileString,addr khead,addr omong,addr szNull,addr ngocol01,sizeof ngocol01,addr CurrentDir
invoke GetPrivateProfileString,addr khead,addr IPAddress,addr szNull,addr address,sizeof address,addr CurrentDir
invoke WinSockProc,addr address,Port,hWnd
invoke SetDlgItemText,hwwnd,TEXT_ID,addr id01


the original one is like this:
Code:
invoke WinSockProc,addr IPAddress,Port,hWnd


and the mofidication i’ve made:
Code:
invoke WinSockProc,addr address,Port,hWnd


and the configuration setting file:
Code:
[details]
address=66.151.149.102


that’s it.. Razz
but i don’t yet find how to make migpro read the Port Number from its configuration setting file..

This is my last edited of migpro source code (June 7th, 2008)..
Code:
http://vortexmind.wen.ru/application/migpro_modified_by_vortex.zip?734

http://www.evilshare.com/606c5790-8bfd-102b-a14f-000b6aa2a5f8


2. Migpro Using gateway.mig33.com

First, on .data directive add this code:
Code:
hostname      db "gateway.mig33.com",0


Second, on DlgProc proc procedure, add these lines of code:
Code:
.IF uMsg==WM_INITDIALOG
...bla bla bla...
...bla bla bla...
...bla bla bla...
invoke WinSockProc,addr hostname,Port,hWnd


Third, on WinsockProc proc procedure, add these lines of code:
Code:
mov sin.sin_family, AF_INET
invoke htons, portaddress
mov sin.sin_port,ax
invoke gethostbyname, addr hostname
mov eax,[eax+12]
mov eax,[eax]
mov eax,[eax]
mov sin.sin_addr,eax


CHAPTER III – END OF PARTY

So where is the MODIFYING MIGPRO – THE ADVANCED WAY chapter?

Well, my skills have not reached that level dude hehehe.. Laughing
In advanced way we can make more editing to the migpro application, such as one button to kick from all IDs, one button to kick entire room or even one button to make ur pc blast everything off ahahaha.. Laughing

I think i’ll leave this level to the professional programmer..
Perhaps there’s one in this forum that will teach all of us..

Until then.. goodluck in editing ur migpro.. Wink

 
 Profile  
Display posts from previous:  Sort by  

Online
Bot

Joined: Wed Mar 17, 2010 4:36 pm
Posts: n/a

 
#  

  #  
Post new topic Reply to topic  [ 1 post ] 

Board index » Tech » Mobiles » Mig33
Related topics
 Topics   Author   Replies   Views   Last post 
There are no new unread posts for this topic. Full Screen Mig33 Mobile Application

mig33

0

2844

Sat Oct 29, 2011 11:09 pm

mig33 View the latest post

There are no new unread posts for this topic. Mig33 tool downloads

kannanmon

1

3721

Sun Jun 05, 2011 6:48 pm

pathik View the latest post

There are no new unread posts for this topic. Mig33 Room Chatter Pc tool

mig33

0

2439

Sat Oct 29, 2011 3:56 pm

mig33 View the latest post

There are no new unread posts for this topic. All in one multi purpose Mig33 pc tool for download

[ Go to pageGo to page: 1, 2 ]

rafeequemancheri

12

24961

Thu Feb 23, 2012 7:10 am

pratish View the latest post

There are no new unread posts for this topic. Luxury Smart Store Mig33 Mobile Tool With eXtreme Features

rafeequemancheri

1

5093

Fri Jul 20, 2012 2:16 pm

pratish View the latest post

 

Jump to:  


Who is online

Users browsing this forum: No registered users and 6 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
News News Site map Site map RSS Feed RSS Feed Channel list Channel list
A project by Pratish | Managed by IT PLORE IT Company Kerala | All times are UTC + 5:30 hours

Go to Top