Skip to content

Commit

Permalink
Merge pull request #62 from giorgosioak/master
Browse files Browse the repository at this point in the history
improvements to screencap module
  • Loading branch information
Ch0pin authored Dec 16, 2023
2 parents b977cdf + 3e36df5 commit f04bc5e
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions modules/helpers/enable_screencap.med
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
{
"Name": "helpers/enable_screencap",
"Description": "Dissables the secure flag in order to be able to take screen shots",
"Help": "In case of successfull bypass it will displate the message: Cancelling secure flag",
"Description": "Disables the secure flag in order to be able to take screenshots",
"Help": "In case of successful bypass it will display the message: Denied app to set FLAG_SECURE to prevent screen from being captured",
"Code": "
console.log('\\n----------Screen Cap enabler------------');

var window = Java.use('android.view.Window');
Java.use('android.view.Window').addFlags.overload('int').implementation = function (flag) {
if ( flag == 8192 ) {
console.log('[i] addFlags called: Denied app to set FLAG_SECURE to prevent screen from being captured');
return;
}
this.addFlags(flag);
}

window.setFlags.implementation = function(a,b)
{
console.log(\"Cancelling Flag Secure\");

Java.use('android.view.Window').setFlags.overload('int','int').implementation = function (flags,mask) {
if ( flags == 8192 || mask == 8192 ) {
console.log('[i] setFlags called: Denied app to set FLAG_SECURE to prevent screen from being captured');
return;
}
this.setFlags(flags,mask);
}
"
}

0 comments on commit f04bc5e

Please sign in to comment.