|Apr 20, 2006, 06:58 PM||#1|
Cryptology Script Help
I'm currently a college student taking a Cryptology course just making the jump from Windows to Mac, and I was looking for a way to automate some of the repetitive tasks necessary for RSA encryption. I have some Applescript experience, but I cannot manage to get anything to work. Any help would be incredibly well received.
The cryptology programs I need to automate are all executables and are used through terminal. RSA encryption uses a very simple equation: a^k mod n [where "a" is your message converted to numeric form (a=01, b=02,...), "k" is your public exponent (a number anyone can see) and "n" is a public modulus ("mod" is a function producing a quotient's remainder: 12 mod 5=2, 13 mod 5=3...)]. Encryption is attained through a multiplicative inverse ("d") of you public exponent, which is secret: thus a decryption formula of z^d mod n [where "z" is the encrypted numerical plaintext, "d" is the multiplicative inverse of "e," and "n" is the same modulus as above].
[more info: http://world.std.com/~franl/crypto/rsa-guts.html]
So, I know that Applescript can easily perform this type of math in its own interface, but I would much rather be able to create a script that would automatically 1) open a saved terminal session 2) open a certain textedit document 3) copy the first line of that textedit document 4) paste that line of text into terminal without executing the line 5) copy the second line of the textedit document 6) paste that line into terminal with a preceding space without executing the command 7) copy and paste the third line into terminal with a preceding space 8) execute the command line 9) close the textedit application leaving terminal as the active window.
My main problem is that I cannot get textedit to copy anything to the clipboard, I can only get it to copy blocks of text within a document with the "duplicate to" command. Also, terminal refuses to accept any pasted data (from other programs) without executing the line. Again, any help with any of the steps listed above would be greatly appreciated.
|Apr 23, 2006, 08:18 PM||#3|
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|Need help on script||flash1996||Mac Basics and Help||1||Oct 28, 2013 10:22 PM|
|need help on script||flash1996||OS X||0||Oct 27, 2013 02:47 PM|
|Apple script batch shell script||prramesh||Mac Programming||5||Sep 15, 2013 04:35 AM|
|first script/autamator script feed back||zyr123||Mac Programming||1||Jul 17, 2012 11:00 AM|
|Help with a script||GabooN||Mac Programming||3||Jul 4, 2012 09:53 PM|
All times are GMT -5. The time now is 06:53 AM.