-
-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
83b9e31
commit 4f18494
Showing
5 changed files
with
64 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
//--------------------------// | ||
// Calling Native Functions // | ||
//--------------------------// | ||
|
||
// Native function pointer | ||
var pMessageBoxA = Module.findExportByName("User32.dll","MessageBoxA"); | ||
|
||
// Function prototype | ||
var fMessageBox = new NativeFunction( | ||
pMessageBoxA, | ||
"int", | ||
[ | ||
"pointer", | ||
"pointer", | ||
"pointer", | ||
"uint" | ||
] | ||
); | ||
|
||
// Function parameters | ||
var lpText = Memory.allocAnsiString("Hello from Frida!"); | ||
var lpCaption = Memory.allocAnsiString("b33f"); | ||
|
||
// Call function | ||
send("[+] Calling MessageBoxA in remote proc.."); | ||
var CallResult = fMessageBox(ptr(0), lpText, lpCaption, 1); | ||
|
||
// Print function return value | ||
send(" |-> CallResult => " + CallResult); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters