{"id":17336581,"url":"https://github.com/restioson/secunet","last_synced_at":"2025-03-27T07:26:15.019Z","repository":{"id":78428203,"uuid":"61047369","full_name":"Restioson/SecuNet","owner":"Restioson","description":"Secure Network API for Computercraft which uses AES-256 to try to ensure proper security (I said *try*)","archived":false,"fork":false,"pushed_at":"2017-05-13T08:42:37.000Z","size":46,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-01T12:29:19.863Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Lua","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/Restioson.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":"2016-06-13T15:25:15.000Z","updated_at":"2017-11-21T16:31:46.000Z","dependencies_parsed_at":"2023-03-05T02:15:36.430Z","dependency_job_id":null,"html_url":"https://github.com/Restioson/SecuNet","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/Restioson%2FSecuNet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Restioson%2FSecuNet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Restioson%2FSecuNet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Restioson%2FSecuNet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Restioson","download_url":"https://codeload.github.com/Restioson/SecuNet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245800478,"owners_count":20674302,"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":[],"created_at":"2024-10-15T15:31:30.183Z","updated_at":"2025-03-27T07:26:15.012Z","avatar_url":"https://github.com/Restioson.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SecuNet\nSecure Network API for Computercraft which uses AES to encrypt messages.\n\n# Documentation\n\n\n## Code example\n```lua\n-- Load SecuNet api\nos.loadAPI(\"path/to/secunet/installation/secunet/apis/secunet.lua\")\n\n-- This function will run while a background listener process listens for messages\nlocal function my_script()\n\n    -- SecuNet will have logged you in automatically to the server by the time this function is called\n\n    -- Send a packet to destination_user\n    secunet.send(\"Hello there!\", \"destination_user\") -- Replace this with their secunet user id\n    \n    -- Print out any received packet\n    local sender, message = secunet.receive()\n\n    print(\"Got packet from \" .. sender .. \": \\\"\" .. message ..\"\\\"\") -- E.g: Got packet from SecunetUser: \"Hello!\"\n    \n    -- At the end of this function secunet will take care of logging out and tidying up\n    \nend\n\n-- Port\nlocal port = 4000 -- Default SecuNet port\n\n-- Modem side\nlocal modem_side = \"top\" -- SecuNet's default modem side is top\n\n -- Prompt user for login\nlocal username, password = secunet.login(-1) -- This arg denotes how many times to try to get correct login\n                                             -- details before giving up. Default is 1 (optional arg)\n\n-- Run the listener process while running your script\nsecunet.mainloop(my_script, username, password, port, modem_side) -- username: Users secunet username. Not necessarily MC username\n                                                      -- password: User's secunet password\n                                                      -- modem_side: side modem is on. Default = top (optional arg)\n                                                      -- port: port for network packets to be sent to server on.\n                                                      -- Should be same as server's port. Default is 4000 (optional arg)\n```\n\n# Installation\n\n## Client\nTo install SecuNet for the client, run `wget https://git.io/vSQOy installer.lua` and then `installer.lua`. This will start an installer for the API. Note: it is quite slow as it prints out all of the attributions as well.\n\n## Server\nTo install SecuNet for the server, you will need to do the following:\n\n1. Run `wget https://git.io/vSQOy installer.lua`\n2. Run `installer.lua`\n3. At the prompt, type whatever directory you want to install the server into\n4. Run `wget https://git.io/vSkXq directory/for/server/server.lua`\n5. To run the server, just run `directory/for/server/server.lua\n\nNote: make sure that your modem is on the top of the server computer. I recommend using an ender modem for maximum range\n\n# Credits\n- AES Api by SquidDev: https://github.com/SquidDev-CC/aeslua\n- UUID Api by TurboTuTone: http://www.computercraft.info/forums2/index.php?/topic/13924-uuid-api-universally-unique-identifier/\n- Base 64 Api: http://lua-users.org/wiki/BaseSixtyFour\n- SHA Api by Anavrins: http://www.computercraft.info/forums2/index.php?/topic/8169-sha-256-in-pure-lua/page__st__40\n\nThank you for all the help from the people on the Computer Mods Unofficial Discord, and SquidDev in particular.\n\n# Usage\nIf you intend to use this in your code, please link in the forum post to this page ([https://github.com/Restioson/secunet](https://github.com/Restioson/secunet)). If you do not intend to publish it, then you do not need to link to this.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frestioson%2Fsecunet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frestioson%2Fsecunet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frestioson%2Fsecunet/lists"}