#1
|
|||
|
|||
small question
I am newbie and working on exe (delphi code) file whose basic purpose is to upload data to fixed ftp IP address eg 123.12.123.123 ,but i want to edit the site IP address to say 123.123.123.123 by hex editor and save. Now what happens the file uploads data to 123.123.123.12 leaving the last digit 3. if I insert a decimal byte after 123.123.123.12 then the exe file gets corrupted.
Thanks kindly advice |
#2
|
||||
|
||||
Just an observation, but is the IP Addr string a fixed length?
Since you add a character in the center, its only taking the original length. In stead of 123.12.123.123 use 123.012.123.123 in the original code, recompile and you should be able to hex edit it without problems.
__________________
Even as darkness envelops and consumes us, wrapping around our personal worlds like the hand that grips around our necks and suffocates us, we must realize that life really is beautiful and the shadows of despair will scurry away like the fleeting roaches before the light. |
#3
|
|||
|
|||
thanks
Actually there were two jumps first comes on the first digit of ANSI text string of IP address (was fixed for 14 bytes) and second jump landed just after this string.there fore I was unable to change the length of string.Anyway I found out solution and the programme is working very good.
|
#4
|
|||
|
|||
Delphi string can be a short string, long string or a PChar type (null terminated). In your case, I guess it is a short string or a long string. If they are, the dword preceding will contain the length of string. So you need change it from 14 to 15 (0E to 0F). The Delphi long string need a null char (00) at the end of string content.
Regards, TQN |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
2 small question about armadillo... | Hero | General Discussion | 1 | 03-28-2007 19:39 |
Small linux | forex | General Discussion | 6 | 12-02-2004 13:35 |