Simple URI analyser (wrapper to uriparser)
Timothy Rice 48f68cfcc8 Clean up for newer versions of uriparser library | пре 3 година | |
---|---|---|
.gitignore | пре 6 година | |
LICENSE | пре 6 година | |
Makefile | пре 3 година | |
README.md | пре 6 година | |
urine.c | пре 3 година |
Simple URI analyser.
This is basically a thin wrapper to uriparser developed as a step towards writing a bittorrent engine that can understand magnet links.
Sample output (using example URI from https://stackoverflow.com/a/27927190):
$ urine 'magnet:?xt=urn:btih:0eb69459a28b08400c5f05bad3e63235b9853021&dn=Splinter.Cell.Blacklist-RELOADED&tr=udp%3A%2F%2Ftracker.com%3A80&tr=udp%3A%2F%2Ftracker.publicbt.com%3A80&tr=udp%3A%2F%2Ftracker.istole.it%3A6969&tr=udp%3A%2F%2Ftracker.ccc.de%3A80&tr=udp%3A%2F%2Fopen.demonii.com%3A1337'
Error code: 0
Scheme: magnet
User:
Host:
IPv4:
IPv6:
IPvFuture:
Port:
Path head:
Path tail:
Query:
xt=urn:btih:0eb69459a28b08400c5f05bad3e63235b9853021
dn=Splinter.Cell.Blacklist-RELOADED
tr=udp://tracker.com:80
tr=udp://tracker.publicbt.com:80
tr=udp://tracker.istole.it:6969
tr=udp://tracker.ccc.de:80
tr=udp://open.demonii.com:1337
Fragment:
Abs Path: False
Owner: False