Giter Site home page Giter Site logo

i686-kit's Introduction

i686 toolkit

How to build and run ?

  1. Install the dependencies
  • python >=3.11.0
  • pip
  1. Install / Use the lib or just run the scripts in scripts/

Lib install

python3 setup.py bdist_wheel
pip3 install dist/ostools-0.0.1-py3-none-any.whl

Usage example

Build and dump/save a GDT

from ostools.gdt import Gdt
from ostools.gdt import GdtEntry
from ostools.gdt import GdtAccessByte
from ostools.gdt import GdtFlags
from ostools.gdt import CpuPrivilevel

a = Gdt() \
.add_entry(
    GdtEntry("gdt_code")
    .set_access_byte(
        GdtAccessByte(0x9a)
    )
    .set_flags(GdtFlags())
) \
.add_entry( 
    GdtEntry("gdt_data")
    .set_access_byte(
        GdtAccessByte()
            .set_p(True)
            .set_dpl(CpuPrivilevel.RING0)
            .set_s(True)
            .set_rw(True)
    )
    .set_flags(0xcf)
) \
.add_end() \
.add_descriptor() \
.dump_asm() # or .save_asm("test.asm")

Convert a Linux PC Screen Font to x86 assembly data

from ostools.psf import Psf

a = Psf("ter-v32n.psf") \
.parse() \
.save_asm("test.asm")

Scripts

The directory scripts/ contains scripts intended to do metaprogramming. Most of them concern the 32 bits interrupts.

i686-kit's People

Contributors

theobori 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.