Skip to content

Commit af80dd7

Browse files
committed
Add files
1 parent 48e4e4e commit af80dd7

File tree

8 files changed

+952
-2
lines changed

8 files changed

+952
-2
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.compile/*

README.md

+40-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,40 @@
1-
# compile
2-
easy shellcode generation, using yet another messy python script
1+
# what is this
2+
`compile` generates usable x86 shellcode from a programming language with python-style syntax, using yet another messy python script.
3+
4+
the shellcode generated by the script meets some requirements:
5+
* contains no null bytes
6+
* contains no hardcoded memory addresses
7+
* is as small and optimized as possible
8+
9+
# usage
10+
```
11+
./compile.sh <file>
12+
```
13+
14+
run the above command, and it will output the x86 shellcode in `\xff\x...` format.
15+
16+
the standard file extension for this language is `.sl` (-> simple/shellcoding language).
17+
18+
# examples
19+
i put a few example sl scripts in the `examples/` directory
20+
21+
# bugs
22+
feel free to make a pr, but i won't be actively developing the project anymore or fixing bugs
23+
24+
# docs
25+
i haven't written any docs, but really quickly, here are the constants:
26+
```
27+
stdin = 0
28+
stdout = 1
29+
stderr = 2
30+
o_rdonly = 0b0
31+
o_creat = 0b100
32+
o_trunc = 0b1000
33+
```
34+
35+
if you want documentation for the default syscalls/functions, in the `compile.py` file, ctrl+f for `syscalls = {`.
36+
37+
# fun facts
38+
* i wrote this entire thing during a few periods of my computer science class when i was a hs sophomore (2017-18)
39+
* i've updated this script a lot and added a ton of new features, but will not be releasing the newer version
40+
* i had only learned python a few months before writing this script, that's why it's so messy (and because i was not planning on releasing it)

0 commit comments

Comments
 (0)