{"id":15546069,"url":"https://github.com/codingo/simple-substitution","last_synced_at":"2025-03-29T01:16:53.363Z","repository":{"id":86237729,"uuid":"101694836","full_name":"codingo/Simple-Substitution","owner":"codingo","description":"A CTF challenge for CrikeyCon 2018","archived":false,"fork":false,"pushed_at":"2018-02-26T06:59:55.000Z","size":18,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-25T03:06:09.549Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codingo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2017-08-28T22:49:00.000Z","updated_at":"2025-01-03T23:37:05.000Z","dependencies_parsed_at":"2023-03-13T09:12:01.348Z","dependency_job_id":null,"html_url":"https://github.com/codingo/Simple-Substitution","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/codingo%2FSimple-Substitution","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codingo%2FSimple-Substitution/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codingo%2FSimple-Substitution/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codingo%2FSimple-Substitution/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codingo","download_url":"https://codeload.github.com/codingo/Simple-Substitution/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246122391,"owners_count":20726823,"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-02T13:00:40.184Z","updated_at":"2025-03-29T01:16:53.319Z","avatar_url":"https://github.com/codingo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple-Substitution\n[![Twitter](https://img.shields.io/badge/twitter-@codingo__-blue.svg)](https://twitter.com/codingo_)\n\nA regular expression CTF challenge for CrikeyCon 2018\n\n# Challenge Description\n```\n\\w*?(p).*([a])[^l]*(l)[a-zA-Z\\d]*?(a)({)\\w*?(o).+([W-w])(h)[^f]+(f).*\n\\9\\3\\2g\\5t\\7\\6ste\\1s\\4\\8e\\2d}\nLZckWnfFS0NyHyjMpObY0aLi:cVJVcVZkWnfFS0NvlQNiyZa{NVCHJ6zWPPI5KXxGZyUo55ywhR8LzVm4KM92kSfi}fzQHpjMpOb0ii?\n```\n\n## Search\n```\n\\w*?(p).*([a])[^l]*(l)[a-zA-Z\\d]*?(a)({)\\w*?(o).+([W-w])(h)[^f]+(f).*\n```\n## Replace \n```\n\\9\\3\\2g\\5t\\7\\6ste\\1s\\4\\8e\\2d}\n```\n# Flag\n```\nflag{twostepsahead}\n```\n# Example Solutions\nhttps://regex101.com/r/l1i0Bs/1\n\n```\n# coding=utf8\nimport re\n\ninput_str = \"LZckWnfFS0NyHyjMpObY0aLi:cVJVcVZkWnfFS0NvlQNiyZa{NVCHJ6zWPPI5KXxGZyUo55ywhR8LzVm4KM92kSfi}fzQHpjMpOb0ii?\"\n\nregex = r\"\\w*?(p).*([a])[^l]*(l)[a-zA-Z\\d]*?(a)({)\\w*?(o).+([W-w])(h)[^f]+(f).*\"\nreplace = \"\\\\9\\\\3\\\\2g\\\\5t\\\\7\\\\6ste\\\\1s\\\\4\\\\8e\\\\2d}\"\n\nresult = re.sub(regex, replace, input_str, 0)\n\nprint(\"Input string: %s\" % input_str)\nprint(\"Search: %s\" % regex)\nprint(\"Replace: %s\" % replace)\nprint(\"-\" * 25)\nprint(\"Result: %s\" % result)\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodingo%2Fsimple-substitution","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodingo%2Fsimple-substitution","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodingo%2Fsimple-substitution/lists"}