{"id":15049219,"url":"https://github.com/lostsh/statuscode","last_synced_at":"2025-07-24T22:08:56.213Z","repository":{"id":231104983,"uuid":"780914567","full_name":"lostsh/statuscode","owner":"lostsh","description":"get http status code using an HTTP request on port 80","archived":false,"fork":false,"pushed_at":"2024-05-16T09:31:42.000Z","size":15,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-09T11:09:05.742Z","etag":null,"topics":["c-sockets","c99","http-code","socket-programming"],"latest_commit_sha":null,"homepage":"","language":"C","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/lostsh.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-02T12:01:48.000Z","updated_at":"2024-04-03T14:05:54.000Z","dependencies_parsed_at":"2024-04-02T13:41:40.177Z","dependency_job_id":"1f88dc8f-ee97-4ea0-834e-a00bebc3dda8","html_url":"https://github.com/lostsh/statuscode","commit_stats":null,"previous_names":["lostsh/statuscode"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lostsh%2Fstatuscode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lostsh%2Fstatuscode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lostsh%2Fstatuscode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lostsh%2Fstatuscode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lostsh","download_url":"https://codeload.github.com/lostsh/statuscode/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243505960,"owners_count":20301619,"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":["c-sockets","c99","http-code","socket-programming"],"created_at":"2024-09-24T21:19:09.858Z","updated_at":"2025-03-14T01:16:18.098Z","avatar_url":"https://github.com/lostsh.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# statuscode\nSimple C99 script to retrieve **HTTP status code** from _(simple)_ request on port **80** of a given ip.\n\u003e Minimalist dependecy on sys lib\n\u003e\u003e - main.c: `stdio.h`\n\u003e\u003e - requestor.c: `unistd.h` _(for i/o)_, `sys/socket.h`, `arpa/inet.h`\n\nTo be precise, the script is just sending `HEAD / HTTP1.0\\r\\n\\r\\n` to port **80** of the given target ip. Then read the first **16 bytes** of the response to extract the **http status code**.\n\nFor refence about the HTTP verb `HEAD` see [rfc spec](https://www.rfc-editor.org/rfc/rfc1945.html#section-8.2) which explain is the same as `GET` but the server only answer with headers.\n\n\n## Build / Compile\n\n### 1. Using make\nJust type `make` into the directory containing the `Makefile` and the binary will be build into `bin/`.\n\n### 2. Using gcc\nFrom the dicretory containing `src/` and `bin/` use the following gcc compilation line :\n```bash\ngcc  -g -std=c99 -Wall -pedantic -D_XOPEN_SOURCE=700 -fsanitize=address src/main.c src/requestor.c -o bin/requestor\n```\n\n## Install \n\n## Run\nThe binary file is in the `bin/` direcotry, either `main` or `requestor`.\n\n\nGive target ip by argument. `./bin/requestor -t 1.1.1.1`.\n\nVerbose option is available, to enable it add the `-v` argument to comand line.\n\n## Example\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flostsh%2Fstatuscode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flostsh%2Fstatuscode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flostsh%2Fstatuscode/lists"}