| Author |
Message |
   
athana deu
Username: deus13
Registered: N/A
| | Posted on Wednesday, Oct 24, 2007 - 13:22: | |
Hello! I had this program in a computer since 1996 which run in dos platform. The problem is that i want to upgrade to another pc and the program is locked to the first computer... I tried to copy the files into a new pc but i got a screen saying that the programm is locked to the first computer..When i started searching the files of the programm i found one file called "UNLOCK.cpp" I thought that if i could compile the "UNLOCK.cpp" into a UNLOCK.exe i could probabbly unlock the program and copy it to my new pc.. the first lines of this cpp file are: #include <dos.h> #include <stdio.h> #include <stdlib.h> #include <txtutils.h> int unlock=TRUE; void Wrong() { View v(40,4,4); v.BothCenter(); v.FillBox(); v.Print(1,2,"locked"); delay(5000); unlock=FALSE; } int System(FILE *fp) { int j1,j2; asm int 0x11 asm mov j2,ax fread(&j1,2,1,fp); return (j1==j2); } int OverMem(FILE *fp) { int j1,j2; asm mov ah,0x88 asm int 0x15 asm mov j2,ax fread(&j1,2,1,fp); return (j1==j2); } int Unlock() { FILE *fp=fopen("td.exe","rb"); fseek(fp,0L,SEEK_END); fseek(fp,-11L,SEEK_CUR); if (!System(fp)) Wrong(); else if (!OverMem(fp)) Wrong(); else if (!VideoMem(fp)) Wrong(); fclose(fp); return unlock; } The program as i was informed is written in C. But i canot compile it..I get many errors.. As i can imagine the function unlock goes to the end of the td file,counts eleven backwards and checks if e.g. the values from call for interrupt 0x15's function AH 0x88 are the same with the values in the specific place in the file.. Is there any way to find these values and change them according to my new system? I thought that WinHex could help for this.. Any help? thanx in advance  |
   
Brandon Warhurst
Username: roboknight
Registered: 1-1997
| | Posted on Wednesday, Oct 24, 2007 - 16:18: | |
Yes, you will probably get many errors with this program if your compiler doesn't support the assembly language directives properly. If you use GCC, you'll need to change the assembly directives some way. I'm not even sure this program will function anymore as it uses interrupt 15. I don't know how newer versions of Windows (i.e. Vista, XP...) support this kind of direct programming. The easiest way to fix it, if you have the source code, is to remove everything inside the unlock function, except the "return unlock;", change that to "return 1;" or "return true;" and dummy out the other functions. Then recompile. Either that or write the following program: int main(int argc, char **argv) { return 1; } and compile that and replace the old program with the above compiled version. That will probably solve your problem. WinHex won't really help you here that much. |
   
athana deu
Username: deus13
Registered: N/A
| | Posted on Thursday, Oct 25, 2007 - 19:11: | |
In the main program folder i can see: programNameRUN.exe LOCKER.exe TD.exe (the one that is appeared in the unlock function as you u can see above.) i tried to delete the locker.exe and i got a message that it is being used from another prog or person and it couldnot be deleted.. hmmm...i will make a new program in c and put in it your code: int main(int argc, char **argv) { return 1; } and will name the exe as LOCKER.exe and see what i get.. or is it a dood idea to name it as td.exe? |
   
Don Camillo
Username: willybilly
Registered: N/A
| | Posted on Friday, Oct 26, 2007 - 12:16: | |
Hi, here is another proposal: Why don`t you add the old HD (or a XWF copy of it) in your new system? You could integrate a boot manager (something like grub - there is a new one - look for www.freedos.org) to boot from old DOS or your new system. Could it be that there is something like a "defect cluster" on the old system which shows the program that it is on the correct HD? What is the name of the program? |
   
hana deu
Username: deus13
Registered: N/A
| | Posted on Friday, Oct 26, 2007 - 13:23: | |
i made a LOCKER.EXE and a td.exe with the above code and rewrite the original files one at time..but o got the same screen.. I also took the HD and put on a new machine and again i got the same locked screen.. What do you mean with "defect cluster"? I am afraid i canot tell the name of the program... |
   
Brandon Warhurst
Username: roboknight
Registered: 1-1997
| | Posted on Friday, Oct 26, 2007 - 19:12: | |
Well, after looking at the code a bit more, you may be in for some different trouble. It appears that the "unlock" function wants to do something with extended memory (maybe wants to do something with extended memory later)... Possibly it looks at TD.exe (which it opens) and compares what it finds there to your system (after calling both int 0x11 and int 0x15... 0x11 could be checking for a mouse or the like, and int 0x15 gets the extended memory size from the 0x88 function given). Since you likely don't have that kind of support anymore, the program probably just won't run. At least not without an emulator. Why don't you get a DOS emulator. There are tons of those. Then your program might function as is. |
   
Don Camillo
Username: willybilly
Registered: N/A
| | Posted on Saturday, Oct 27, 2007 - 15:47: | |
I wanted to say the following: I am no programmer. But I know: Some very very old programs created "defect clusters" on the HD where they hided important information. As they "were defect" no other program went there or deleted this information. And if you copied the simple files to another HD the program did not work as it did not find the "defect clusters" on the new HD. Such programs often had the possibility to uninstall and to write back the important information on the original diskette. Then you had the chance to install it on another machine once again. This was the reason why I asked you for the name of the program. You should google for your program name and look if there is some information about something like the reported. I remember that we had a password cracking tool which was on a diskette. It had to be installed, but it only worked when the original diskette was inside the diskette drive. With the "diskcopy" command it was impossible to create a working copy of this diskette. Maybe it would have worked with a forensic copy of the diskette but I never tested it as we had no forensic software at those time. |
|