Coder Social home page Coder Social logo

shellcode-generator's Introduction

Shellcode Generator

This is a Python script that generates shellcode in C and C# programming languages from a binary file. Shellcode is commonly used in software exploitation and security testing for tasks such as code injection and payload execution.

Features

  • Generates C shellcode: The script reads a binary file and converts each byte into its hexadecimal representation, producing C shellcode as output.

  • Generates C# shellcode: Similar to the C shellcode, the script generates C# shellcode by prefixing each byte with "0x" and separating them with commas.

  • Customizable output format: The C shellcode can be split into multiple lines if a maximum length is reached. The script provides flexibility in adjusting the maximum length.

Usage

  1. Make sure you have Python installed on your system.

  2. Clone the repository:

git clone https://github.com/your-username/shellcode-generator.git

  1. Navigate to the project directory:

cd shellcode-generator

  1. Run the script with the following command:

python shellcode_generator.py <filename> <output_language>

  • <filename>: The name of the binary file you want to generate shellcode from.
  • <output_language>: Specify the output language as either "c" for C shellcode or "cs" for C# shellcode.
  1. The generated shellcode will be displayed in the console.

Examples

To generate C shellcode from a binary file named "payload.bin", run the following command:

python shellcode_generator.py payload.bin c

To generate C# shellcode from the same file, use:

python shellcode_generator.py payload.bin cs

License

This project is licensed under the MIT License.

shellcode-generator's People

Contributors

secnnet avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.