示例#1
0
文件: manio.c 项目: pkdevbox/burp
int manio_write_sig_and_path(struct manio *manio, struct blk *blk)
{
	if(manio->protocol==PROTO_1) return 0;
	if(manio->hook_sort && blk_fingerprint_is_hook(blk))
	{
		// Add to list of hooks for this manifest chunk.
		manio->hook_sort[manio->hook_count++]=blk->fingerprint;
	}
	if(manio->dindex_sort)
	{
		uint64_t savepath=blk->savepath;
		savepath &= 0xFFFFFFFFFFFF0000;
		// Ignore obvious duplicates.
		if(!manio->dindex_count
		  || manio->dindex_sort[manio->dindex_count-1]!=savepath)
		{
			// Add to list of dindexes for this manifest chunk.
			manio->dindex_sort[manio->dindex_count++]=savepath;
		}
	}
	return write_sig_msg(manio, blk);
}
示例#2
0
文件: manio.c 项目: jkniiv/burp
int manio_write_sig_and_path(struct manio *manio, struct blk *blk)
{
	if(manio->hook_sort && is_hook(blk->weak))
	{
		// Add to list of hooks for this manifest chunk.
		snprintf(manio->hook_sort[manio->hook_count++], WEAK_STR_LEN,
			"%s", blk->weak);
	}
	if(manio->dindex_sort)
	{
		// Ignore obvious duplicates.
		if(!manio->hook_count
		  || strncmp(manio->dindex_sort[manio->hook_count-1],
			blk->save_path, SAVE_PATH_LEN))
		{
			// Add to list of dindexes for this manifest chunk.
			snprintf(manio->dindex_sort[manio->dindex_count++],
				SAVE_PATH_STR_LEN, "%s", blk->save_path);
		}
	}
	return write_sig_msg(manio, sig_to_msg(blk, 1 /* save_path */));
}
示例#3
0
int manio_write_sig_and_path(struct manio *manio, struct blk *blk)
{
	if(manio->hook_sort && is_hook(blk->fingerprint))
	{
		// Add to list of hooks for this manifest chunk.
		snprintf(manio->hook_sort[manio->hook_count++], WEAK_STR_LEN,
			"%016"PRIX64,
			blk->fingerprint);
	}
	if(manio->dindex_sort)
	{
		char *savepathstr=bytes_to_savepathstr(blk->savepath);
		// Ignore obvious duplicates.
		if(!manio->hook_count
		  || strncmp(manio->dindex_sort[manio->hook_count-1],
			savepathstr, MSAVE_PATH_LEN))
		{
			// Add to list of dindexes for this manifest chunk.
			snprintf(manio->dindex_sort[manio->dindex_count++],
				MSAVE_PATH_LEN+1, "%s", savepathstr);
		}
	}
	return write_sig_msg(manio, sig_to_msg(blk, 1 /* save_path */));
}
示例#4
0
int manio_write_sig(struct manio *manio, struct blk *blk)
{
	return write_sig_msg(manio, sig_to_msg(blk, 0 /* no save_path */));
}