# hash2magnet
```
#!/bin/sh
#hash to magnet
p="hash:"
T1="udp%3A%2F%2Ftracker.openbittorrent.com%3A80"
T2="udp%3A%2F%2Ftracker.publicbt.com%3A80"
T3="udp%3A%2F%2F9.rarbg.com%3A2800%2Fannounce"
T4="udp%3A%2F%2Fexplodie.org%3A6969%2Fannounce"
T5="udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969"
T6="udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969"
T7="http%3A%2F%2Famigacity.xyz:6969%2Fannounce"
T8="udp%3A%2F%2F9.rarbg.me%3A2720%2Fannounce"
T9="udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce"
HASH=$(xclip -o | match -p "$p" )
if [ "$HASH" != "" ]; then
MAGNET="magnet:?xt=urn:btih:$HASH&tr=${T1}&tr=${T2}&tr=${T3}&tr=${T4}&tr=${T5}&tr=${T6}&tr=${T7}&tr=${T8}&tr=${T9}"
echo -n "$MAGNET" | xclip -i
echo -n "$MAGNET" | xclip -i -selection clipboard
fi
exit 0
```
--- |