cagyirey / capstone.fsharp Goto Github PK
View Code? Open in Web Editor NEWF# bindings for Capstone Engine.
License: MIT License
F# bindings for Capstone Engine.
License: MIT License
thanks for this amazing binding! just added your repo to the download page of our website at http://www.capstone-engine.org/download.html
let me know if you need any helps. keep it up, cheers!
When Capstone.FSharp.dll is compiled under Release configuration, the C helper functions that provide pointers to architecture-specific instruction details return junk data.
Run build.cmd
or build.sh
Run the sample code from the readme from the root folder:
#I "./bin/Release"
#r @"Capstone.FSharp"
open System
open Capstone.FSharp
open Capstone.FSharp.Disassembler
open Capstone.FSharp.X86
let shellcode = "\x6A\xFF\x68\x9B\x6C\x74\x01\x64\xA1\x00\x00\x00\x00\x50\x51\x56\x57\xA1\xA0\x98\xC7\x01\x33\xC4\x50\x8D\x44\x24\x10\x64\xA3\x00\x00\x00\x00\x8B\xF1\x89\x74\x24\x0C\x33\xFF\x68\x04\x01\x00\x00\xB9\xA0\xC5\xC9\x01\x89\x7E\x04\xE8\x53\x78\x8C\xFF\x83\xC0\x04\x89\x46\x04\xC7\x40\xFC\x00\x01\x00\x00\x8B\x44\x24\x20\x89\x7C\x24\x18\x89\x3E\x89\x7E\x08\x3D\xFF\xFF\xFF\x7F\x74\x08\x50\x8B\xCE\xE8\xEA\xA0\x96\xFF\x89\x7E\x0C\x89\x7E\x10\x8B\xC6\x8B\x4C\x24\x10\x64\x89\x0D\x00\x00\x00\x00\x59\x5F\x5E\x83\xC4\x10\xC2\x04\x00"B
let disassembler = CapstoneDisassembler(X86Mode X86_32, Details=true)
let instructions = disassembler.Disassemble(0x1000UL, shellcode)
printfn "%A" instructions
Disassembled details should contain the opcode, operands, etc.
The disassembled details are nulled out - sometimes a single byte in the opcode or prefix bytes will be set.
Replace let configuration = "Release"
with let configuration = "Debug"
in build.fsx
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.