Skip to content

improvements to screencap module #62

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
}
"
}