Created
December 4, 2019 02:30
-
-
Save louipc/abb25725d61affcc144e791457ba5f08 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* urldecode.c | |
| louipc <base64:bG91aXBjQGdteC5jb20=> | |
| build: | |
| gcc -l curl urldecode.c -o urldecode | |
| */ | |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <curl/curl.h> | |
| int main(int argc, char *argv[]) { | |
| if (argc < 2) { | |
| printf("you suck\n", argc); | |
| return 1; | |
| } | |
| CURL *curl = curl_easy_init(); | |
| char *url = curl_easy_unescape(curl, argv[1], strlen(argv[1]), NULL); | |
| printf("%s\n", url); | |
| curl_free(url); | |
| curl_easy_cleanup(curl); | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment