|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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. |
#2
|
|||
|
|||
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 |
#3
|
|||
|
|||
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! |
#4
|
|||
|
|||
you can use this argument: -app -T hostname 4 -c /you_path/license.dat
where hostname is your computer's hostname. |
#5
|
|||
|
|||
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. |
#6
|
|||
|
|||
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 |
#7
|
|||
|
|||
Today, Flexgen is worthless.
|
#8
|
|||
|
|||
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, |
#9
|
|||
|
|||
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 |
#10
|
|||
|
|||
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:
|
#11
|
|||
|
|||
you can get the daemon's cmdline passed from lmgrd. Then you can run daemon with those cmdline directly without lmgrd.
|
#12
|
|||
|
|||
Process Explorer from Sysinternals can show the command line a program was started with:
http://www.sysinternals.com/ntw2k/freeware/procexp.shtml |
#13
|
|||
|
|||
Deamon's cmdline ???
Hello freesoft. Can u give an example of the daemon's cmdline ? I tried but still
cannot get anything ? Thx. Quote:
|
#14
|
|||
|
|||
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. |
#15
|
|||
|
|||
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?
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
When use "vendor defined encryption routines", how to set daemon related part? | bridgeic | General Discussion | 6 | 01-22-2015 11:35 |
flexlm 10.8 linux 64 daemon need help | iconstart | General Discussion | 2 | 09-29-2014 14:07 |
Flexlm Common Vendor Daemon Problem | NoFlexlm | General Discussion | 1 | 03-19-2009 09:43 |
FlexLM 10.8+ new feature - common vendor daemon | dirkmill | General Discussion | 0 | 05-21-2005 00:20 |