Is it legal to open source a spyware?
<p>I have created a simple spyware on which whenever a form is submitted on any website, it will serialize the form data then send the data to my email address.</p>

<p>I am only currently using it on my own devices in which whenever someone(friends/family/etc.) borrows my device, I just threaten them that I will be able to get their passwords by just using my device.</p>

<p>I am planning to release it on GitHub with <a href="https://opensource.org/licenses/MIT" rel="noreferrer">MIT License</a>. Will I have a responsibility on how others will use it? Will I get sued for creating it?</p>

<p>Is this legal? I am not going to jail by doing it, am I?</p>

<p>Your code is considered free speech (<a href="https://caselaw.findlaw.com/us-9th-circuit/1317290.html" rel="nofollow noreferrer">Bernstein v. United States</a>) and you have allowed the use of the code via the MIT license. Since the application of your code is very generic and is not specifically targeting anyone. You probably are not criminally liable. </p>

<p>This is simply writing a "Proof of Concept" for security testing purposes. That same way <a href="https://www.metasploit.com/" rel="nofollow noreferrer">Metasploit</a>, <a href="https://www.tenable.com/products/nessus/nessus-professional" rel="nofollow noreferrer">Nessus</a>, and <a href="https://nmap.org/" rel="nofollow noreferrer">Nmap</a> have actual exploit code but are considered tools of the trade. </p>

<p>Now if you go around <em>using your spyware on non consenting victims</em>. You might get a visit from some people with guns and badges that have 3 letters on them.</p>

licensing open-source-software