Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

help #124

Open
wzmooo opened this issue Feb 24, 2024 · 3 comments
Open

help #124

wzmooo opened this issue Feb 24, 2024 · 3 comments

Comments

@wzmooo
Copy link

wzmooo commented Feb 24, 2024

Can you provide library files for easy integration?Or could you provide a Visual Studio project for compilation? Thank you.

@hasherezade
Copy link
Owner

ok, I will add the library files to the release.

@wzmooo
Copy link
Author

wzmooo commented Mar 6, 2024

0.3.9 releases no pe-sieve32.lib pe-sieve64.lib

@hasherezade
Copy link
Owner

hasherezade commented Mar 6, 2024

@wzmooo - check this out: pe-sieve_0.3.9_dll_lib.zip
Integration similar to here:
https://github.com/hasherezade/pe-sieve/wiki/2.1.-How-to-add-PE-sieve-to-your-Visual-Studio-project
* Check: Adding PE-sieve: DLL version.

Demo:

#include <windows.h>
#include <iostream>

#include <pe_sieve_api.h>

int main()
{
	// Set up the scan parameters
	PEsieve_params pp = { 0 };
	pp.pid = GetCurrentProcessId(); // scan current process
	pp.threads = true;
	pp.shellcode = pesieve::SHELLC_PATTERNS;
	pp.quiet = true;

	const PEsieve_rtype rtype = pesieve::REPORT_ALL;

	// Prepare the buffer for the output report
	const size_t buf_size = 0x1000;
	char json_buf[buf_size] = { 0 };
	size_t needed_size = 0;

	// Perform the scan:
	PEsieve_report report = PESieve_scan_ex(pp, rtype, json_buf, buf_size, &needed_size);
	if (needed_size > buf_size) {
		// The supplied buffer was too small to fit in the whole JSON report
		std::cout << "Couldn't retrieve the full buffer. Needed size: " << std::hex << needed_size << std::endl;
	}

	// Print the obtained report:
	std::cout << json_buf << "\n";
	return 0;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants