Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Dahuum/DDoS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

Disk Emulator

Virtual disk layer for DDoS. Files as block devices.

┌─────────────────┐
│   command.c     │  ← main
└─────────────────┘
         │
         ▼
┌─────────────────┐
│     disk.c      │  ← disk emulator
│ dread()/dwrite()│
└─────────────────┘
         │
         ▼
┌─────────────────┐
│     osapi.c     │  ← OS abstraction
└─────────────────┘
         │
         ▼
┌─────────────────┐
│  Unix system    │  ← real I/O
│ read()/write()  │
└─────────────────┘

Block layout:

disk.1 (32MB):
┌────────┬────────┬────────┬─────┐
│Block 0 │Block 1 │Block 2 │ ... │
│ 512B   │ 512B   │ 512B   │     │
└────────┴────────┴────────┴─────┘

Block N = Byte (N × 512)

Usage:

disk *dd = dattach(1); // disk attach, mount it
dread(dd, &buf, 500);  // disk read 
dwrite(dd, &buf, 0);   // dist write
ddetach(dd);           // disk detach, mhm unmount it

Build:

dd if=/dev/zero of=disk.1 bs=512 count=65535 # create disk in drives/
make        # from command/
make clean  # Clean /command
make fclean # osapi/ command/

About

Custom DOS-like operating system with simple file I/O abstraction layer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published