{"id":23303769,"url":"https://github.com/prakhardoneria/magic-studio-reverse-engineered-api","last_synced_at":"2026-01-25T10:32:12.400Z","repository":{"id":253604506,"uuid":"801983490","full_name":"PrakharDoneria/Magic-Studio-Reverse-Engineered-API","owner":"PrakharDoneria","description":"This Python script demonstrates how to send a POST request to the MagicStudio AI Art Generator API to generate an image based on a specified prompt. The script uses the requests library to interact with the API and the PIL library to handle the image.","archived":false,"fork":false,"pushed_at":"2024-08-18T04:01:38.000Z","size":931,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-01T22:21:45.453Z","etag":null,"topics":["pillow","python","python3","requests","reverse-engineering","text-to-image"],"latest_commit_sha":null,"homepage":"https://magic-studio-sepia.vercel.app","language":"Python","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/PrakharDoneria.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-05-17T09:38:16.000Z","updated_at":"2025-07-28T10:27:48.000Z","dependencies_parsed_at":"2024-08-18T05:29:22.688Z","dependency_job_id":null,"html_url":"https://github.com/PrakharDoneria/Magic-Studio-Reverse-Engineered-API","commit_stats":null,"previous_names":["prakhardoneria/magic-studio-reverse-engineered-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PrakharDoneria/Magic-Studio-Reverse-Engineered-API","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrakharDoneria%2FMagic-Studio-Reverse-Engineered-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrakharDoneria%2FMagic-Studio-Reverse-Engineered-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrakharDoneria%2FMagic-Studio-Reverse-Engineered-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrakharDoneria%2FMagic-Studio-Reverse-Engineered-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PrakharDoneria","download_url":"https://codeload.github.com/PrakharDoneria/Magic-Studio-Reverse-Engineered-API/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrakharDoneria%2FMagic-Studio-Reverse-Engineered-API/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28751816,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T10:25:12.305Z","status":"ssl_error","status_checked_at":"2026-01-25T10:25:11.933Z","response_time":113,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["pillow","python","python3","requests","reverse-engineering","text-to-image"],"created_at":"2024-12-20T11:13:43.598Z","updated_at":"2026-01-25T10:32:12.378Z","avatar_url":"https://github.com/PrakharDoneria.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Magic Studio Reverse Engineered API\n\n\n## Overview\n\nThis Python script demonstrates how to send a POST request to the MagicStudio AI Art Generator API to generate an image based on a specified prompt. The script uses the `requests` library to interact with the API and the `PIL` library to handle the image.\n\n## Prerequisites\n\n- Python 3.x\n- `requests` library\n- `Pillow` library\n\nYou can install the required libraries using pip:\n```sh\npip install requests pillow\n```\n\n## Reverse Engineering Insights\n\n### What We Did\n\n- **Analyzed Browser Requests**: We inspected the requests sent by the browser to the API endpoint using developer tools in a web browser.\n- **Reproduced Headers and Payload**: We copied the headers and data payload from the browser's network requests to our script to mimic the browser's behavior.\n- **Sent Requests Programmatically**: We used the `requests` library to send HTTP requests with the same headers and payload to the API.\n\n### Server Fix Suggestions\n\nTo prevent reverse engineering and unauthorized use, the server can implement several measures:\n\n1. **API Key Authentication**: Require an API key for all requests. Validate the key and limit its usage based on user or IP address.\n2. **Rate Limiting**: Implement rate limiting to prevent abuse by limiting the number of requests per user/IP per minute/hour.\n3. **HMAC Signatures**: Use HMAC (Hash-based Message Authentication Code) to sign requests. The server verifies the signature to ensure the request's authenticity.\n4. **IP Whitelisting**: Allow requests only from a list of trusted IP addresses.\n5. **CAPTCHA**: Integrate CAPTCHA in the request process to prevent automated scripts from accessing the API.\n6. **Dynamic Request Parameters**: Include dynamic parameters such as nonces or tokens that change with each request and are validated server-side.\n\nBy implementing these measures, the server can better protect the API from unauthorized access and ensure that only legitimate users are able to generate images.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprakhardoneria%2Fmagic-studio-reverse-engineered-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprakhardoneria%2Fmagic-studio-reverse-engineered-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprakhardoneria%2Fmagic-studio-reverse-engineered-api/lists"}