https://github.com/omarazizi/assembly-web-server
Webserver in x86_64 Assembly (Network Programming)
https://github.com/omarazizi/assembly-web-server
low-level-programming network-programming webserver x86-64
Last synced: about 1 year ago
JSON representation
Webserver in x86_64 Assembly (Network Programming)
- Host: GitHub
- URL: https://github.com/omarazizi/assembly-web-server
- Owner: OmarAzizi
- Created: 2024-02-20T15:54:29.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-20T21:04:54.000Z (about 2 years ago)
- Last Synced: 2025-01-31T00:17:00.452Z (about 1 year ago)
- Topics: low-level-programming, network-programming, webserver, x86-64
- Language: Assembly
- Homepage:
- Size: 10.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Assembly-Web-Server

This command will assemble the x86 into [ELF64](https://en.wikipedia.org/wiki/Executable_and_Linkable_Format) object file format using [nasm](https://www.nasm.us/) (Netwide Assembler)
```bash
nasm -f elf64 server.asm -o server
```
Then we will use [ld](https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html) (GNU linker)
```bash
ld -o server server.o
```
## Running the server
I ran the server with [strace](https://en.wikipedia.org/wiki/Strace) so I can see the system-calls while running the server
```bash
strace ./server
```
The output should look something like this

The server is waiting for a connection on port __8080__, so se can go to the web browser on http://localhost:8080 to connect to it or run the following [curl](https://www.hostinger.com/tutorials/curl-command-with-examples-linux/#:~:text=Limit%20cURL%20Output-,What%20Is%20cURL%20Command%3F,used%20to%20troubleshoot%20connection%20issues.) command in shell
```bash
curl --output - http://localhost:8080
```
### Using curl

### Using the web browser
