FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
ShellcodeCompiler/ShellcodeCompiler/SEHUtils.h at master · dnangle/ShellcodeCompiler · GitHub
dnangle
ShellcodeCompiler
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
ShellcodeCompiler
/
ShellcodeCompiler
/
SEHUtils.h
Copy path
More file actions
More file actions
Latest commit
History
History
History
38 lines (31 loc) · 792 Bytes
Breadcrumbs
ShellcodeCompiler
/
ShellcodeCompiler
/
SEHUtils.h
Copy path
File metadata and controls
38 lines (31 loc) · 792 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#
ifndef
SEHUTILIS_H
#
define
SEHUTILIS_H
#
include
<
windows.h
>
#
include
<
exception
>
struct
seh_exception
:
public
std
::exception
{
seh_exception
(
const
char
* message,
DWORD
code) : exception(message), m_code(code) {}
DWORD
Code
()
const
{
return
m_code; }
private:
const
DWORD
m_code;
};
void
CxxTranslateSehException
(
unsigned
int
,
EXCEPTION_POINTERS
* pointers)
{
DWORD
exceptionCode = pointers->
ExceptionRecord
->
ExceptionCode
;
const
char
* msg =
nullptr
;
switch
(exceptionCode) {
case
EXCEPTION_ACCESS_VIOLATION
:
msg =
"
Access violation.
"
;
break
;
case
EXCEPTION_ARRAY_BOUNDS_EXCEEDED
:
msg =
"
Out of bound access.
"
;
break
;
case
EXCEPTION_ILLEGAL_INSTRUCTION
:
msg =
"
Illegal instruction.
"
;
break
;
default
:
break
;
}
throw
seh_exception
(msg, exceptionCode);
}
#
endif
Back
|
FazBrowse Home
|
New Git URL