diff options
author | epochqwert <epoch@hacking.allowed.org> | 2018-10-15 08:07:14 +0000 |
---|---|---|
committer | epochqwert <epoch@hacking.allowed.org> | 2018-10-15 08:07:14 +0000 |
commit | 61fa33424e49128ddca8ef679680882b04c96654 (patch) | |
tree | d821ca032c87f870dde6b6a416bb2ef6fffc2068 /urlescape.c | |
parent | afdc9966f1bade4b99b7c938c6a684d75a12dff2 (diff) | |
download | uritools-61fa33424e49128ddca8ef679680882b04c96654.tar.gz uritools-61fa33424e49128ddca8ef679680882b04c96654.zip |
added urlescape and urlunescape
Diffstat (limited to 'urlescape.c')
-rw-r--r-- | urlescape.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/urlescape.c b/urlescape.c new file mode 100644 index 0000000..ce8e3e7 --- /dev/null +++ b/urlescape.c @@ -0,0 +1,14 @@ +#include <stdio.h> +#include "url.h" + +int main(int argc,char *argv[]) { + int len; + char *out; + if(argc < 2) return 1; + len=urlescapelength(argv[1],strlen(argv[1])); + out=malloc(len+1); + urlescape(argv[1],out,len); + out[len]=0; + printf("%s\n",out); + return 0; +} |