Exemple #1
0
/////////////////////////////////////////////////////////////////////
// kanBeApp constructer
// if setting file is not exist or CTRL key pressed when startup,
// then open preference panel
// else start kanbe.
/////////////////////////////////////////////////////////////////////
kanBeApp::kanBeApp()
		: BApplication(KANBE_SIG)
{
	if(access(KANBE_SETTING_FILE, R_OK) || chkKey()){
		(new PrefDlg)->Show();
	}else{
		makeKanBeWin();
	}
}
Exemple #2
0
void walk ( char* path,   key_block* key, REGQUEUE *q, char *root, char *full ) {	
	//printf("%lu\n", WindowsTickToUnixSeconds(key->time));
    //add current key name to printed path
	//char buf[0x1000];
	//memset(buf, '\x00', 0x1000);

	memcpy(path++,"/",1); 
	memcpy(path,&key->name,key->len); path+=key->len;
	*path = 0;
	//memset(path,'\x00',full+0x1000-path);
	chkKey(full, key->time, q);
	

    // for simplicity we can imagine keys as directories in filesystem and values
    // as files.
    // and since we already dumped values for this dir we will now iterate 
    // thru subdirectories in the same way

	//if((unsigned int)(key->subkeys) < 0x1000 || (unsigned int)(root+key->subkeys)>size)
	//	return ;
    offsets* item = (offsets*)(root+key->subkeys);

    for(int i=0;i<item->count;i++){
        // in case of too many subkeys this list contain just other lists
        offsets* subitem = (offsets*)((&item->first)[i]+root);

        // usual directory traversal  
        if(item->block_type[1]=='f'||item->block_type[1]=='h') {
            // for now we skip hash codes (used by regedit for faster search)
            walk(path,(key_block*)((&item->first)[i*2]+root), q, root, full);
        } else for(int j=0;j<subitem->count;j++) {
			// also ms had chosen to skip hashes altogether in this case 
			walk(path,(key_block*)((&subitem->first)[item->block_type[1]=='i'?j*2:j]+root), q, root, full);
        }
    }

}