{"id":19374779,"url":"https://github.com/leksus-04/ctf-flag-generator","last_synced_at":"2025-04-13T20:11:24.773Z","repository":{"id":118617904,"uuid":"378961849","full_name":"LeKSuS-04/CTF-flag-generator","owner":"LeKSuS-04","description":":triangular_flag_on_post: Flexible tool for generating flags for CTFs","archived":false,"fork":false,"pushed_at":"2021-06-22T07:17:15.000Z","size":26,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T10:46:46.284Z","etag":null,"topics":["ctf","flag","python","tool"],"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/LeKSuS-04.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":"2021-06-21T14:37:32.000Z","updated_at":"2024-03-26T11:04:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"b80a4e20-0c4d-43f2-b905-270497dfa1fa","html_url":"https://github.com/LeKSuS-04/CTF-flag-generator","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/LeKSuS-04%2FCTF-flag-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeKSuS-04%2FCTF-flag-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeKSuS-04%2FCTF-flag-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeKSuS-04%2FCTF-flag-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LeKSuS-04","download_url":"https://codeload.github.com/LeKSuS-04/CTF-flag-generator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248774981,"owners_count":21159534,"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":["ctf","flag","python","tool"],"created_at":"2024-11-10T08:36:07.315Z","updated_at":"2025-04-13T20:11:24.741Z","avatar_url":"https://github.com/LeKSuS-04.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# :triangular_flag_on_post: CTF flag generator\n\n### Flexible tool for generating flags for CTFs\n### Usage: \n    ctfgen [options] [flags]\n    * You can provide multiple flags;\n    * Everything from the first parameter that cannot be interpreted as option will be interpreted as flags.\n\n### Options:\n    -c, --count         \u003cinteger\u003e   Amount of variations generated for each flag. Set to 1 by default;\n    -f, --file          \u003cfile\u003e      Read flags from file. Each line will be interpreted as separate flag;\n    -h, --help                      Display this help message;\n    -i, --interactive               Run in interactive mode;\n    -o, --output        \u003cfile\u003e      Redirect output into file instead of console;\n    -s, --settings      \u003cfile\u003e      Provide custom configuration file (you can modify standart instead).\n\n### Examples:\n    ctfgen this is flag         | Generates three flags, from \"this\", \"is\" and \"flag\"\n    ctfgen \"this is flag\"       | Generates flag from string \"this is flag\"\n    ctfgen -c 15 yoooooooo      | Generates 15 random flags from \"yoooooooo\"\n    ctfgen -c 4 -f input.txt -o flags.txt   | Generates 4 random flags from each line from input.txt file \n                                            | and outputs them into flags.txt\n    ctfgen -s ~/custom.json \"Hello, world!\" | Generates flag from \"Hello, world!\" using rules from ~/custom.json\n\n### Configuration file:\n    The configuration file must be named \"config.json\" and placed in the same directory as the script; Otherwise, you have to specify path to configuration file using --settings option.\n\n    Configuration file is a JSON file with following structure:\n    {\n        \"FlagPrefix\" : \"flag{\",         | Prefix used to each flag;\n        \"FlagPostfix\" : \"}\",            | Postfix used to each flag;\n                                        | Prefix and postfix are not affected by following settings;\n                                        |\n                                        |\n        \"AlwaysChange\" : [              | Dictionary of phrases that will always be changed ;\n            {                           |\n                \"'\" : [\"\"],             | \"'\" symbol will be removed;\n                \" \" : [\"_\", \"-\"],       | \" \" symbol will be changed randomly to \"_\" or \"-\".;\n                \"lol\" : [\"lul\"]         | \"lol\" will be changed to \"lul\";\n            }                           |\n        ],                              | All rules in this section must be written in lower case;\n                                        |\n                                        |\n        \"SometimesChange\" : [           | Dictionary of phrases that will sometimes be changed;\n            {                           |\n                \"a\" : [\"4\"],            | \"a\" symbol has a chance to be changed to \"4\";\n                \"b\" : [\"6\"],            | \"b\" symbol has a chance to be changed to \"6\";\n                \"e\" : [\"3\"],            | \"e\" symbol has a chance to be changed to \"3\";\n                \"g\" : [\"6\", \"9\"],       | \"g\" symbol has a chance to be changed to \"6\" or \"9\";\n                \"i\" : [\"1\"],            | \"i\" symbol has a chance to be changed to \"1\";\n                \"j\" : [\"1\"],            | \"j\" symbol has a chance to be changed to \"1\";\n                \"l\" : [\"1\"],            | \"l\" symbol has a chance to be changed to \"1\";\n                \"o\" : [\"0\"],            | \"o\" symbol has a chance to be changed to \"0\";\n                \"q\" : [\"9\"],            | \"q\" symbol has a chance to be changed to \"9\";\n                \"s\" : [\"5\"],            | \"s\" symbol has a chance to be changed to \"5\";\n                \"t\" : [\"7\"],            | \"t\" symbol has a chance to be changed to \"7\";\n                                        |\n                \"for\" : [\"4\"],          | \"for\" has a chance to be changed to \"4\";\n                \"to\" : [\"2\"],           | \"to\" has a chance to be changed to \"2\";\n                \"ate\" : [\"8\"]           | \"ate\" has a chance to be changed to \"8\";\n            }                           |\n        ],                              | All rules in this section must be written in lower case;\n                                        |\n                                        |\n        \"CaseSettings\" : [              | Settings defining case of flag;\n            {                           | \n                \"ChangeCase\" : true,    | Determines whether to change the case of given flag (true/false);\n                \"SetCase\" : \"random\"    | If \"ChangeCase\" is set to true, this determines case\n                                        | of genereated flag. Could be set to:\n            }                           |       * lower     - only lowercase\n        ]                               |       * upper     - only uppercase\n    }\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleksus-04%2Fctf-flag-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleksus-04%2Fctf-flag-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleksus-04%2Fctf-flag-generator/lists"}