{"id":20229421,"url":"https://github.com/rahulunair/ccurl","last_synced_at":"2025-03-03T13:24:08.023Z","repository":{"id":50175380,"uuid":"76294172","full_name":"rahulunair/ccurl","owner":"rahulunair","description":"Configurable curl, that takes in a config file to simplify `curling` REST URLs","archived":false,"fork":false,"pushed_at":"2021-06-02T01:09:47.000Z","size":23,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-24T03:38:15.163Z","etag":null,"topics":["cc-url","pentesting","python","security"],"latest_commit_sha":null,"homepage":"http://rahulunair.me/ccurl/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rahulunair.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}},"created_at":"2016-12-12T20:46:57.000Z","updated_at":"2020-03-10T06:39:24.000Z","dependencies_parsed_at":"2022-08-31T11:21:30.660Z","dependency_job_id":null,"html_url":"https://github.com/rahulunair/ccurl","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/rahulunair%2Fccurl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahulunair%2Fccurl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahulunair%2Fccurl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahulunair%2Fccurl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rahulunair","download_url":"https://codeload.github.com/rahulunair/ccurl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241671093,"owners_count":20000514,"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":["cc-url","pentesting","python","security"],"created_at":"2024-11-14T07:35:39.397Z","updated_at":"2025-03-03T13:24:07.999Z","avatar_url":"https://github.com/rahulunair.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ccurl\n\n        __     __  __ __  ____   _\n       /  ]   /  ]|  |  ||    \\ | |\n      /  /   /  / |  |  ||  D  )| |\n     /  /   /  /  |  |  ||    / | |___\n    /   \\_ /   \\_ |  :  ||    \\ |     |\n    \\     |\\     ||     ||  .  \\|     |\n     \\____| \\____| \\__,_||__|\\_||_____|\n\n\t\t*-Configurable Curl-*\n\nCcurl is a simple application that can be used to cURL APIs using a configuration file.\nThe configuration file can be used to maintain a set of commonly uses data such as\nthe base url, different set of headers etc. Along with this there are a few niche features\nof CcURL that would help in testing a REST API.\n\nUnderneath, it a wrapper for python requests, that takes in a config file to\nsimplify `curling` REST URLs If you are thinking of using this tool, be warned this\nis an alpha stage code, that uses things like eval to execute injected python code,\nwhich can be a security issue in some situations. Only use this tool if you really\nknow what you are doing and to test an API you have prior permission to test.\n\n## Configuration\n\nBelow is a sample configuration that can be used to intitiate ccurling.\n\n    [Defaults]\n    accept_type = application/json\n    content_type = application/json\n    content_length=0\n    auth_token=your_token #  if needed\n    base_url = https://localhost:80/\n\nA sample configuration file `ccurl.conf` has been provided with the repo.\n\n## Usage\n\n### Basic usage\n\nIf you want to ccurl `https://localhost:80/cgi-bin/items.php` you just need:\n\n```\n./ccurl.py -r /cgi-bin/items.php\n```\nccurl.py will read the `base_url` and other header information provided\nin the config file ccurl.conf (by default) in the same directory as you\nare running ccurl.py. If you want to provide a seperate directory you coulr\ndo so using:\n\n#### Example\n\n```\n./ccurl.py -c config_file.conf -r /cgi-bin/items.php\n\n```\n\nYou can also provide the HTTP verb (by default ccurl intiates a GET request)\nusing:\n\n#### Example\n```\n./ccurl.py -r /cgi-bin/items.php -X HEAD\n```\n\nAvailable verbs are HEAD, GET, PUT, POST and DELETE.\n\n### Advanced usage\n\nBeyond these straight forward usage, there are some some special features\nof ccurl that would fit certain usecases very well.\n\nConsider you are testing and application, or that you need to upload a specially\ncrafted file to a particular API. Traditionally you would create a file using\nsome bash script / python code or someway simlar and then upload the file.\nWith ccurl you can use the option `--payload` to give a piece of code, that\nwould be evaluated on the fly by the app and send the URL.\n\n#### Example\n```\n./ccurl.py -r /cgi-bin/upload.php --payload \"eval: '\\x0' * 100 * 2 ** 20\"\n```\n\nFor a single use, it might not seem that helpful, but if you would need to fuzz the\napplication with a set of crafted values, this can be very helpful in  quickly\ntesting out tiny one liners. This feature is experimetnal and should be used\nonly if you are permitted by the application owner to test the API in such a way.\n\nFor a more complete use case of this feature, refer to the repo on [attack_payloads](https://github.com/rahulunair/attack_payloads\n\"attack_payloads\") which was used to test few OpenStack swift APIs.\n\nYou could provided additional headers as well using the -H option of ccurl,\n\n#### Example\n```\n./ccurl.py -r /cgi-bin/upload.php -H {'meta-name': 'meta-value'}\n```\n\n### Debugging\n\nTo debug ccurl, you can use the `-d` switch and it will printout the raw curl\ncommand with all the supplied parameters and a few other details.\n\n\nAs of now, this tool does some cool things, that is specially tailored to test APIs.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frahulunair%2Fccurl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frahulunair%2Fccurl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frahulunair%2Fccurl/lists"}