{"id":22624659,"url":"https://github.com/barrettotte/http-asm64","last_synced_at":"2025-04-11T03:06:58.327Z","repository":{"id":64138682,"uuid":"150903823","full_name":"barrettotte/HTTP-ASM64","owner":"barrettotte","description":"The most basic HTTP Server written in x86 Assembly","archived":false,"fork":false,"pushed_at":"2018-09-30T16:51:29.000Z","size":183,"stargazers_count":53,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T00:51:12.515Z","etag":null,"topics":["asm","assembly","assembly-language","assembly-x86-64","http","http-server","nasm","nasm-assembly"],"latest_commit_sha":null,"homepage":"","language":"Assembly","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/barrettotte.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-29T21:18:19.000Z","updated_at":"2025-03-17T05:44:49.000Z","dependencies_parsed_at":"2022-12-03T07:39:13.317Z","dependency_job_id":null,"html_url":"https://github.com/barrettotte/HTTP-ASM64","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barrettotte%2FHTTP-ASM64","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barrettotte%2FHTTP-ASM64/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barrettotte%2FHTTP-ASM64/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barrettotte%2FHTTP-ASM64/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/barrettotte","download_url":"https://codeload.github.com/barrettotte/HTTP-ASM64/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248333602,"owners_count":21086200,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asm","assembly","assembly-language","assembly-x86-64","http","http-server","nasm","nasm-assembly"],"created_at":"2024-12-09T00:17:18.135Z","updated_at":"2025-04-11T03:06:58.308Z","avatar_url":"https://github.com/barrettotte.png","language":"Assembly","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HTTP-ASM64\r\nThe most basic HTTP Server written in 64-bit Assembly with NASM Assembler. \r\n\r\nCurrently it is extremely primitive\r\nand is **only able to serve a single page, index.html**\r\n\r\n\r\n## Learned\r\n* Switching from MASM in Windows to NASM in Linux\r\n* Basics of NASM and 64-bit Assembly\r\n* How to use Linux system calls\r\n* How to use Sockets\r\n* Refresh on Assembly in general\r\n* Basics of MakeFiles\r\n\r\n\r\n## Setup\r\n* Dependencies ```sudo apt-get -y install nasm build-essential```\r\n* Assembling+Linking+Running ```make build \u0026\u0026 ./server``` or ```./Run-NASM.sh server.asm```\r\n* Listening on http://127.0.0.1:3926\r\n\r\n\r\n## Screenshots\r\n\r\n[![console](https://github.com/barrettotte/HTTP-ASM64/blob/master/screenshots/console.png)](https://github.com/barrettotte/HTTP-ASM64/blob/master/screenshots/console.png)\r\n\r\n[![index](https://github.com/barrettotte/HTTP-ASM64/blob/master/screenshots/index.png)](https://github.com/barrettotte/HTTP-ASM64/blob/master/screenshots/index.png)\r\n\r\n[![firefox-console](https://github.com/barrettotte/HTTP-ASM64/blob/master/screenshots/firefox-console.png)](https://github.com/barrettotte/HTTP-ASM64/blob/master/screenshots/firefox-console.png)\r\n\r\n\r\n## To Do Eventually ... Maybe?\r\n* Refactor duplicate code\r\n* Make Utils.asm and export functions\r\n* Proper 404 message handling\r\n* 404 Error Page\r\n* Multiple file handling for external css,js, more html files, images, etc.\r\n* Proper socket shutdown\r\n* POST method handling\r\n\r\n\r\n## Source Dump\r\n* GNU C Sockets Documentation http://www.delorie.com/gnu/docs/glibc/libc_301.html\r\n* Linux Socket Man Pages http://man7.org/linux/man-pages\r\n* Linux System Calls Reference https://filippo.io/linux-syscall-table/\r\n* Assembly(x86) Cheatsheet https://github.com/cirosantilli/x86-assembly-cheat\r\n* Quick Reference https://www.cs.uaf.edu/2017/fall/cs301/reference/x86_64.html\r\n* Connecting a socket in C http://wiki.linuxquestions.org/wiki/Connecting_a_socket_in_C\r\n* IP to DWORD\r\n  https://stackoverflow.com/questions/5328070/how-to-convert-string-to-ip-address-and-vice-versa\r\n```c++\r\nchar strAddr[] = \"127.0.0.1\"\r\nDWORD ip = inet_addr(strAddr); // ip contains 16777343 [0x0100007f in hex]\r\n\r\nstruct in_addr paddr;\r\npaddr.S_un.S_addr = ip;\r\n\r\nchar *strAdd2 = inet_ntoa(paddr); // strAdd2 contains the same string as strAdd\r\n  ```\r\n* Converting hex+decimal https://www.scadacore.com/tools/programming-calculators/online-hex-converter/\r\n* System calls for network functionality http://beej.us/net2/html/syscalls.html\r\n* AF_INET https://stackoverflow.com/questions/1593946/what-is-af-inet-and-why-do-i-need-it\r\n* sys_setsockopt() http://pubs.opengroup.org/onlinepubs/009695399/functions/setsockopt.html\r\n* HTTP Messages https://en.wikipedia.org/wiki/HTTP_message_body\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarrettotte%2Fhttp-asm64","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbarrettotte%2Fhttp-asm64","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarrettotte%2Fhttp-asm64/lists"}