-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserver.s
71 lines (56 loc) · 1.06 KB
/
server.s
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
.intel_syntax noprefix
.globl _start
.section .text
_start:
mov rax, 41
mov rdi, 2
mov rsi, 1
mov rdx, 0
syscall
mov rdi, rax
mov rax, 49
push 0x00000000
push 0x5000
push 2
mov rsi, rsp
mov rdx, 16
syscall
mov rax, 50
mov rsi, rdi
xor rdx, rdx
syscall
mov rax, 43
syscall
mov r8, rax
mov rax, 0
lea rsi, [rsp-512]
mov rdx, 512
syscall
mov rax, 2
xor rdx, rdx
syscall
mov r9, rax
mov rax, 0
lea rsi, [rsp-512]
mov rdx, 512
syscall
mov rax, 3
mov rdi, r9
syscall
mov rax, 1
mov rdi, r8
lea rsi, [rel response_header]
mov rdx, 19
syscall
mov rax, 1
lea rsi, [rsp-512]
syscall
mov rax, 3
mov rdi, r8
syscall
mov rax, 60
xor rdi, rdi
syscall
.section .data
response_header:
.asciz "HTTP/1.0 200 OK\r\n\r\n"