Re: Re: SUN solaris hacked[请求]
There is a file /var/adm/utmp or /var/adm/wtmp records all users's account information. Man page utmp shows its structure. I think the following lines can be used in the code:
FILE* fp=fopen(WTMP_FILE, "rb");
struct utmp u;
while(fread(&u, sizeof(u), 1, fp) > 0)
{
// For each entry check whatever you want
// Or get the clue you are interested
}