Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Jalaska13

macrumors newbie
Original poster
Mar 21, 2009
24
0
My friend accidentally sent me an AppleScript we're working on as read-only. He's not going to be able to send it again for a little while, and I'd like to be able to work on it; does anybody know how to get around the "run-only" setting in applescript files so that I can edit it?
 

Erendiox

macrumors 6502a
Oct 15, 2004
706
12
Brooklyn NY
I think you're out of luck. I'm pretty sure run-only scripts are just like a compiled program. There's no way to go back to the code.

Could be wrong though. :cool:
 

Jalaska13

macrumors newbie
Original poster
Mar 21, 2009
24
0
Nah, the file extension is .scpt, although the application option does exist, so you could have been right. But it's a script.
 

GGJstudios

macrumors Westmere
May 16, 2008
44,545
943
Nah, the file extension is .scpt, although the application option does exist, so you could have been right. But it's a script.

The point is, if you save it as a new file, the new file won't be read-only, since you created it.
 

Jalaska13

macrumors newbie
Original poster
Mar 21, 2009
24
0
I was replying to erendiox.
I only have the run-only file. It won't open, because it's not supposed to be edited.
 

calderone

Cancelled
Aug 28, 2009
3,743
352
Permissions won't do anything here.

The title is misleading, it is a Run Only, not a read only as later clarified by the OP.

There is no difference in the permissions when saved, the ability to edit is merely stripped.

OP, as stated early on, you are out of luck.
 

frankmathewsajan

macrumors newbie
Jun 30, 2021
1
0
My friend accidentally sent me an AppleScript we're working on as read-only. He's not going to be able to send it again for a little while, and I'd like to be able to work on it; does anybody know how to get around the "run-only" setting in applescript files so that I can edit it?
ALERT:: DON'T DO ANYTHING ILLEGAL

The answer is quite simple. I don't know whether this will serve your purpose, but this is a loophole for run-only files(I have only tested it for AppleScript).

1) Download Microsoft Visual Studio Code (VSC) Go to Download Page
2) Open VSC and then drag your read-only script to it.
3) Browse through the Content>Resourses>Scripts>main.scrt
4) Open main.scrt, You will see this an alert "File is not displayed in .......binary.......Do You want to see it anyway?"
5) Click see it anyway.
6) You can't see the full code but.....


Real Script

display dialog "This is read only"


What you will see in VSC

FasdUAS 1.101.10�������������� ��.aevtoappnull��****���������� ��.aevtoappnull��****���������"This is read only ��.sysodlogaskrTEXT���jascr��ޭ

I don't think this will be so useful, but this is a loophole for read-only AppleScript applications/scripts/files.

Try this before Apple.Inc closes the hole.

?

 

bogdanw

macrumors 603
Mar 10, 2009
5,712
2,749
I’m not a programmer, but both methods mentioned above, Visual Studio Code & AppleScript disassembler, don’t seem to produce more useful data than simply running cat /path/to/script.scpt in Terminal

All recover quoted text from do shell script "killall mDNSResponder" user name "admin" password "secret" with administrator privileges saved as Run-only with ScriptEditor 2.11 (227), AppleScript 2.8

VSCode.jpg
applescript-disassembler.jpg
cat.jpg

I used the updated https://github.com/Galgofrit/applescript-disassembler
 

startergo

macrumors 601
Sep 20, 2018
4,809
2,199
I’m not a programmer, but both methods mentioned above, Visual Studio Code & AppleScript disassembler, don’t seem to produce more useful data than simply running cat /path/to/script.scpt in Terminal

All recover quoted text from do shell script "killall mDNSResponder" user name "admin" password "secret" with administrator privileges saved as Run-only with ScriptEditor 2.11 (227), AppleScript 2.8

View attachment 2352497
View attachment 2352498
View attachment 2352499

I used the updated https://github.com/Galgofrit/applescript-disassembler
How about using
on the output text file from the disassembler?
 

bogdanw

macrumors 603
Mar 10, 2009
5,712
2,749
How about using https://github.com/SentineLabs/aevt_decompile on the output text file from the disassembler?
The associated blog post has more information about what can be achieved with that tool.
“Our tool attempts to return the human-readable code for an AEVT from all available sources. That can mean multiple interpretations for a single line.”
“shows exactly how powerful run-only AppleScripts can be for evasion and anti-analysis”
https://www.sentinelone.com/labs/fade-dead-adventures-in-reversing-malicious-run-only-applescripts/
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.