Exetools

Exetools (https://forum.exetools.com/index.php)
-   General Discussion (https://forum.exetools.com/forumdisplay.php?f=2)
-   -   Starting a debugging session with Flexlm lmgrd and a vendor specific daemon (https://forum.exetools.com/showthread.php?t=4734)

zaratustra 07-29-2004 08:00

Starting a debugging session with Flexlm lmgrd and a vendor specific daemon
 
Hi all,
I use Olly for my 'debugging purposes'.
I have a vendor specific daemon launched by lmgrd.
I'd like to attach the debugger to the vendor specific
daemon before it must be restarted. (In other words
as soon as possible, when it is spawned from lmgrd).
Is there a procedure to manage this issue?
Please, note that I can't simply debug the vendor specific daemon
directly as it NEEDS lmgrd to start correctly.
If someone could explain what happens after lmgrd executes the vendor
specific daemon, and why the daemon must be started from lmgrd,
should help.

Thanks to all and cheers.

Z.

karlss0n 07-29-2004 17:00

You can patch first bytes in vendor deamon to int 3 or something like that...

Or u can use trick like that, to know why it's want run only under lmgrd.
Write prog, that print out all enviroment and cmdline args and than run vendor deamon whith it's cmdline

truth 07-31-2004 15:59

I guess I know exactly what you are talking about. Once upon a time I also
thought vendor daemon must be run by lmgrd, actually that is a prompt
message from FLEXlm. BUT IT IS NOT TRUE! It's a trick played by Macrovision.
;)

There are (at least) two ways to see this through:
1. trace lmgrd.exe up to the point when vendor daemon is spawned, capture
the command line and you'll see.
2. read FLEXlm SDK source code. Hint: the key file is ls_app_init.c

I did both, and it's funny to see how simple and ridiculous it is to mislead
people like that. Afterwards you can start debugging vendor deamon directly
without lmgrd.

One thing to point out is that vendor daemon communicates with lmgrd
regularly (the "heartbeat"), so you'll see some messages when lmgrd is not
present. But that won't affect you to dig out the keys and seeds in the
vendor daemon.

Good luck! :)

TCM909 08-07-2004 19:11

you can use this argument: -app -T hostname 4 -c /you_path/license.dat

where hostname is your computer's hostname.

freesoft 08-21-2004 00:48

you can write a program such as:
int main(int argc, char **argv)
{
for (int i = 0; i < argc, i++)
{
printf("%s\n", argv[i]);
}
return 0;
}
compile and replace your daemon, run lmgrd, you can get what you want.

sigint33 08-21-2004 10:34

Flexlm
 
I'm a complete newbie here, so please bear with me if this is common knowledge, I do know a little about FlexLM, there is an old utility called Flexgen that comes with lmgr32XX dll files that display a "magic number" which is actually the keys and seeds and some other info all run together into one number, I can supply you with the full utility, (ver 2000.3), or just the dll's with an explanation of the format, if you would like.

Hopefully this post is helpfull, I'd like to download some of the utilities so I can start learning and maybe discuss things with at least a small amount of knowledge!

SiGiNT33

freesoft 08-23-2004 20:35

Today, Flexgen is worthless.

appleleafs 08-27-2004 22:25

I have used the code from freesoft, and the fake daemon had successfully discovered all the argument passed to it from Lmgrd.
Actually I have got the following outputs from the fake daemon,

10:16:45 (lmgrd) Starting vendor daemons ...
10:16:45 (lmgrd) daemon.exe
-T
myserver
8.1
-1
-c
lic.txt
--lmgrd_start

Then when I try to start the daemon with it:
synd -T myserver 8.1 -1 -c lic.txt
or add the -app switch,
synd -app -T myserver 8.1 4 -c lic.txt
the daemon still try to connect to the lmgrd,

10:17:59 ($ynplctyd) Vendor daemon can't talk to lmgrd (Cannot connect to licens
e server (-15,10:10061 "WinSock: Connection refused"))

This is for the synd of $ynplify, it is from Flexlm 8.1. When I tried the saros of Hdrturbowriter(flexlm7.0d), the daemon can be started by this methord.

I am not sure if the higher version of Flexlm daemon can't be started in this way,
thanks,

UrsusA 08-28-2004 04:48

hi Appleleafs,

I just degug synd.exe with Olly and everything works fine..
I use this argument (posted above by TCM909): -app -T hostname 4 -c c:\synlm\lic.txt

Best regards
UrsusA

Nelson_Wee 12-10-2004 13:52

Flexlm ???
 
Hello. I have tried by compiling the program and save as cdslmd daemon. I stop the cadence license , than replace the cdslmd daemon that is compiled. Then I run " lmgrd -c license.dat " . The license dat uses cdslmd . But notting happen ? Where is the info that u say u can get ? I compile using " gcc -c daemon.c -o cdslmd " .

I am trying to get seeds for cdslmd and magma design daemon .

Regards.

Quote:

Originally Posted by freesoft
you can write a program such as:
int main(int argc, char **argv)
{
for (int i = 0; i < argc, i++)
{
printf("%s\n", argv[i]);
}
return 0;
}
compile and replace your daemon, run lmgrd, you can get what you want.


freesoft 12-17-2004 20:33

you can get the daemon's cmdline passed from lmgrd. Then you can run daemon with those cmdline directly without lmgrd.

ugh 12-18-2004 01:10

Process Explorer from Sysinternals can show the command line a program was started with:

http://www.sysinternals.com/ntw2k/freeware/procexp.shtml

Nelson_Wee 01-11-2005 08:37

Deamon's cmdline ???
 
Hello freesoft. Can u give an example of the daemon's cmdline ? I tried but still
cannot get anything ?

Thx.

Quote:

Originally Posted by freesoft
you can get the daemon's cmdline passed from lmgrd. Then you can run daemon with those cmdline directly without lmgrd.


BUNEX 12-27-2005 18:33

Hi ,
You can start debugger with ��specific daemon�� like this.
1. Start Olldbg ,
2. Load "lmgrd.exe" ,
From menu ��Debug�� you find ��Arguments�� in this box type this
�Cz ��vendor name�� �Cc \path \license.dat
afther, you can see what happen.
You can see message from lmgrd to vendor about license is good or not good.

maci 12-30-2005 19:55

there\'s no use to debug the lmgrd. the most of the stuff is done on application side. with 6.1 ver there was introduced more new stuff. Better try application side & let the server run. The comparison point can be found by searching relevant byte pattern / if you\'re lazy to trace and know which ver you\'re dealing with :-) /. Or is there any specific reason to restart the lmgrd?


All times are GMT +8. The time now is 18:02.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX