Just if someone has the same problem in the future, this script should find one of the addresses:
#!/bin/bash
rawtx=$(bitcoind getrawtransaction $1 1)
vin="${rawtx#*'"'vin'"' : [}"
vin="${vin%'"'vout'"' : [*}"
rtx="${vin#*txid'"' : '"'}"
rtx="${rtx%%'"'*}"
ro="${vin#*vout'"' : }"
ro="${ro%%,*}"
rtx=$(bitcoind getrawtransaction $rtx 1)
rvout="${rtx#*vout'"' : [}"
rvout="${rvout%'"'blockhash*}"
rvout="${rvout#*value}"
n="${rvout#*'"'n'"' : }"
n="${n%%,*}"
while [ "$n" != "$ro" ]; do
rvout="${rvout#*value}"
n="${rvout#*'"'n'"' : }"
n="${n%%,*}"
done
rad="${rvout#*addresses'"' : [}"
rad="${rad#*'"'}"
rad="${rad%%'"'*}"
echo $rad