PE-sieve
Scans all running processes. Recognizes and dumps a variety of potentially malicious implants (replaced/implanted PEs, shellcodes, hooks, in-memory patches).
Loading...
Searching...
No Matches
utils
custom_mutex.h
Go to the documentation of this file.
1
#pragma once
2
#include <peconv.h>
3
4
namespace
pesieve
5
{
6
namespace
util {
7
8
struct
Mutex
{
9
public
:
10
Mutex
()
11
{
12
InitializeCriticalSection(&cs);
13
}
14
15
void
Lock
()
16
{
17
EnterCriticalSection(&cs);
18
}
19
20
void
Unlock
()
21
{
22
LeaveCriticalSection(&cs);
23
}
24
25
~Mutex
()
26
{
27
DeleteCriticalSection(&cs);
28
}
29
30
private
:
31
CRITICAL_SECTION cs;
32
};
33
34
struct
MutexLocker
35
{
36
public
:
37
MutexLocker
(
Mutex
& _mutex)
38
: mutex(_mutex)
39
{
40
mutex.
Lock
();
41
}
42
43
~MutexLocker
()
44
{
45
mutex.
Unlock
();
46
}
47
48
private
:
49
Mutex
& mutex;
50
};
51
52
};
//namespace util
53
54
};
//namespace pesieve
pesieve
Definition
pesieve.py:1
pesieve::util::Mutex
Definition
custom_mutex.h:8
pesieve::util::Mutex::Lock
void Lock()
Definition
custom_mutex.h:15
pesieve::util::Mutex::~Mutex
~Mutex()
Definition
custom_mutex.h:25
pesieve::util::Mutex::Mutex
Mutex()
Definition
custom_mutex.h:10
pesieve::util::Mutex::Unlock
void Unlock()
Definition
custom_mutex.h:20
pesieve::util::MutexLocker
Definition
custom_mutex.h:35
pesieve::util::MutexLocker::MutexLocker
MutexLocker(Mutex &_mutex)
Definition
custom_mutex.h:37
pesieve::util::MutexLocker::~MutexLocker
~MutexLocker()
Definition
custom_mutex.h:43
Generated by
1.12.0