p2p applications aren't illegal. Using them in an illegal manner is illegal.