Exetools  

Go Back   Exetools > General > General Discussion

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 07-29-2004, 08:00
zaratustra
 
Posts: n/a
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.
Reply With Quote
  #2  
Old 07-29-2004, 17:00
karlss0n
 
Posts: n/a
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
Reply With Quote
  #3  
Old 07-31-2004, 15:59
truth
 
Posts: n/a
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!
Reply With Quote
  #4  
Old 08-07-2004, 19:11
TCM909 TCM909 is offline
Friend
 
Join Date: Feb 2004
Posts: 15
Rept. Given: 0
Rept. Rcvd 0 Times in 0 Posts
Thanks Given: 1
Thanks Rcvd at 0 Times in 0 Posts
TCM909 Reputation: 0
you can use this argument: -app -T hostname 4 -c /you_path/license.dat

where hostname is your computer's hostname.
Reply With Quote
  #5  
Old 08-21-2004, 00:48
freesoft
 
Posts: n/a
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.
Reply With Quote
  #6  
Old 08-21-2004, 10:34
sigint33
 
Posts: n/a
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
Reply With Quote
  #7  
Old 08-23-2004, 20:35
freesoft
 
Posts: n/a
Today, Flexgen is worthless.
Reply With Quote
  #8  
Old 08-27-2004, 22:25
appleleafs
 
Posts: n/a
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,
Reply With Quote
  #9  
Old 08-28-2004, 04:48
UrsusA
 
Posts: n/a
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
Reply With Quote
  #10  
Old 12-10-2004, 13:52
Nelson_Wee
 
Posts: n/a
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.
Reply With Quote
  #11  
Old 12-17-2004, 20:33
freesoft
 
Posts: n/a
you can get the daemon's cmdline passed from lmgrd. Then you can run daemon with those cmdline directly without lmgrd.
Reply With Quote
  #12  
Old 12-18-2004, 01:10
ugh
 
Posts: n/a
Process Explorer from Sysinternals can show the command line a program was started with:

http://www.sysinternals.com/ntw2k/freeware/procexp.shtml
Reply With Quote
  #13  
Old 01-11-2005, 08:37
Nelson_Wee
 
Posts: n/a
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.
Reply With Quote
  #14  
Old 12-27-2005, 18:33
BUNEX
 
Posts: n/a
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.
Reply With Quote
  #15  
Old 12-30-2005, 19:55
maci
 
Posts: n/a
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?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


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


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


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( 1998 - 2024 )