{"id":14963827,"url":"https://github.com/tharushaudana/esp-program-protector","last_synced_at":"2026-01-31T16:02:01.695Z","repository":{"id":246496838,"uuid":"821301310","full_name":"tharushaudana/esp-program-protector","owner":"tharushaudana","description":"Prevent unauthorized copying and reflashing of your ESP program. Secure, simple, and effective.","archived":false,"fork":false,"pushed_at":"2024-06-28T08:52:16.000Z","size":5,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-07T22:41:05.332Z","etag":null,"topics":["arduino","bin-protection","code-protection","esp32","esp8266","guard","prevent-copy","security"],"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/tharushaudana.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-06-28T08:34:10.000Z","updated_at":"2025-03-24T18:35:22.000Z","dependencies_parsed_at":"2024-06-28T10:11:10.320Z","dependency_job_id":"d3279774-b99d-495e-acb8-9dfcee4fd54b","html_url":"https://github.com/tharushaudana/esp-program-protector","commit_stats":null,"previous_names":["tharushaudana/esp-program-protector"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tharushaudana/esp-program-protector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tharushaudana%2Fesp-program-protector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tharushaudana%2Fesp-program-protector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tharushaudana%2Fesp-program-protector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tharushaudana%2Fesp-program-protector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tharushaudana","download_url":"https://codeload.github.com/tharushaudana/esp-program-protector/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tharushaudana%2Fesp-program-protector/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28947567,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T14:26:55.697Z","status":"ssl_error","status_checked_at":"2026-01-31T14:26:52.545Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["arduino","bin-protection","code-protection","esp32","esp8266","guard","prevent-copy","security"],"created_at":"2024-09-24T13:32:11.740Z","updated_at":"2026-01-31T16:02:01.679Z","avatar_url":"https://github.com/tharushaudana.png","language":"C++","readme":"# ESP Program Security Guard\n\nA simple but powerful method to prevent copying the program binary file from ESP devices and reflashing it to another ESP device.\n\n## How to Use\n\n1. **Clone the Repository**\n\n   ```sh\n   git clone https://github.com/tharushaudana/esp-program-protector.git\n   cd esp-program-protector\n   ```\n\n2. **Upload `key_flasher` Code**\n\n   Upload the `key_flasher` code to your ESP device. This will generate a unique key for the device (using the chip ID and flash chip ID) and write it to EEPROM.\n\n3. **Add `security_barier()` to Your Program**\n\n   In your program code, add `security_barier()` at the beginning of the `void setup()` function. Then, upload your program code. See `program/program.ino` for an example.\n\n   ```cpp\n   void setup() {\n       security_barier();\n       // Your setup code here\n   }\n   ```\n\n## How It Works\n\n1. **Key Generation**\n\n   When you upload the `key_flasher` code, it generates a unique key for the device using the chip ID and flash chip ID. This key is then written to EEPROM.\n\n2. **Key Validation**\n\n   In your program code, `security_barier()` reads the stored key from EEPROM and compares it with the device's actual key. If the key is valid, the program continues to run. If the key is not valid (or not written), the program will not continue.\n\n## Custom Key Generation\n\nYou can use your own unique key generation method or algorithm to generate your own key type. Simply modify the `gen_security_key()` in the `security.h` files.\n\n## Conclusion\n\nWe hope this simple method helps you secure your program from being copied and flashed onto unauthorized ESP devices.\n\n---\n\nFeel free to contribute to this project or report any issues you encounter. Your feedback is valuable in improving the security and functionality of this guard method.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftharushaudana%2Fesp-program-protector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftharushaudana%2Fesp-program-protector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftharushaudana%2Fesp-program-protector/lists"}