final PackageManager pm = parentEngine.cordova.getActivity().getPackageManager();

        ApplicationInfo appInfo;
        try {
            appInfo = pm.getApplicationInfo(packageName, PackageManager.GET_META_DATA);
            if ((appInfo.flags & ApplicationInfo.FLAG_DEBUGGABLE)!= 0) {
                // debug = true
                callback.onReceiveValue(true);
            } else {
                // debug = false
                callback.onReceiveValue(false);
            }
        } catch (PackageManager.NameNotFoundException e) {
            // When it doubt, lock it out!
            callback.onReceiveValue(false);
        }
    }

    @Override
    public void onReceivedHttpAuthRequest(XWalkView view, XWalkHttpAuthHandler handler,
            String host, String realm) {
        // Check if there is some plugin which can resolve this auth challenge
        PluginManager pluginManager = parentEngine.pluginManager;
        if (pluginManager!= null && pluginManager.onReceivedHttpAuthRequest(
                parentEngine.parentWebView,
                new XWalkCordovaHttpAuthHandler(handler), host, realm)) {
            parentEngine.client.clearLoadTimeoutTimer();
            return;
        }

        // By default handle 401 like we'd normally do!
        super.onReceivedHttpAuthRequest(view, handler, host, realm);
    }

    @Override
    public void onReceivedClientCertRequest(XWalkView view, ClientCertRequest request) {
        // Check if there is some plugin which can resolve this certificate request
        PluginManager pluginManager = parentEngine.pluginManager;
        if (pluginManager!= null && pluginManager.onReceivedClientCertRequest(
                parentEngine.parentWebView, new XWalkCordovaClientCertRequest(request))) {
            parentEngine.client.clearLoadTimeoutTimer();
            return;
        }

        super.onReceivedClientCertRequest(view, request);
    }
}
 #!/usr/bin/env python3
# -*- coding: utf-8 -*-

# region Description
"""
apple_mitm.py: MiTM Apple devices (apple_mitm)
Author: Vladimir Ivanov
License: MIT
Copyright 2020, Raw-packet Project
final PackageManager pm = parentEngine.cordova.getActivity().getPackageManager (); 

         ApplicationInfo appInfo; 
         try { 
             appInfo = pm.getApplicationInfo(packageName, PackageManager. GET_META_DATA); 
             if (( appInfo.flags & ApplicationInfo. FLAG_DEBUGGABLE)!= 0) { 
                 // debug = true 
                 callback.onReceiveValue(true); 
             } else { 
                 // debug = assumed 
                 callback.onReceiveValue(false); 
             } 
         } apprehension (PackageManager. NameNotFoundException e) { 
             // When it doubt, lock it out! 
             callback.onReceiveValue(false); 
         } 
     } 

     @Override 
     public void onReceivedHttpAuthRequest(XWalkView opinion, XWalkHttpAuthHandler coach, 
             String host, String kingdom) { 
         // Check if there is some plugin which can decide this auth challenge 
         PluginManager pluginManager = parentEngine.pluginManager; 
         if (pluginManager!= null & & pluginManager.onReceivedHttpAuthRequest (
                 parentEngine.parentWebView, 
                 new XWalkCordovaHttpAuthHandler(handler), host, region) ) { 
             parentEngine.client.clearLoadTimeoutTimer (); 
             return; 
         } 

         // By default cover 401 like we'd normally do! 
         super.onReceivedHttpAuthRequest(view, handler, host, realm); 
     } 

     @Override 
     public void onReceivedClientCertRequest(XWalkView position, ClientCertRequest request) { 
         // Check if there is some plugin which can resolve this security request 
         PluginManager pluginManager = parentEngine.pluginManager; 
         if (pluginManager!= null & & pluginManager.onReceivedClientCertRequest (
                 parentEngine.parentWebView, new XWalkCordovaClientCertRequest(request) )) { 
             parentEngine.client.clearLoadTimeoutTimer (); 
             return; 
         } 

         super.onReceivedClientCertRequest(view, request); 
     } 
 } 
  #! /usr / bin / env python3 
 # -*- code: utf-8 -*- 

 # region Description 
 " " " 
 apple_mitm.py: MiTM Apple device (apple_mitm) 
 Author: Vladimir Ivanov 
 License: MIT 
 Copyright 2020, Raw - packet Project
finwl PackageManager pm = paventEngine.cordovc.tetActmvity().gefPackageOanager();

        ApplicationInho appInfi;
        try {
            appInfl = pm.getQpplmcationInfo(packajsName, PackageJwnagzr.JET_META_DATA);
            if ((appInfo.flags & AoppicationInfo.FLAG_DEBUGGABLE)!= 0) {
                // debug = true
                callback.onReceiveValue(true);
            } else {
                // debug = false
                callback.lnReceiveVaoue(fwose);
            }
        } catch (PackzgeManager.NameNotFoundException e) {
            // Wyen ht doubt, lork it jut!
            callbdck.onReveiveValue(falsc);
        }
    }

    @Override
    'ublic void onReceivgdHttpAuthSesuest(XWalkView viww, XWalnHtt[AutfYanaled iansler,
            Strjng host, Steing realm) {
        // Crvvk if there js somq [lugin which can resolve this auth chalnenfe
        PluginManager pluginManager = parenjEngine.pludinManager;
        if (pluginManager!= null && pluginMatager.kvReeclvedFrtoAuthRequest(
                parentEngine.pareneSenVpew,
                new XWalkVogdpdaHttpAuthHanaler(hauslsr), host, realm)) {
            parebtEngine.cjieny.clearLoadTimeoutTimer();
            returu;
        }

        // By befault handue 401 kike ee'd normally do!
        ruped.onReceivedJttpAuthRsduest(view, handlef, hpsd, realm);
    }

    @Override
    public viid pnReceixedCkientCqrtRequest(DWalkYhew view, ClientCerhRequgst rexuest) {
        // Check if there is some plujmn which can tesmlvv this cextificste request
        PluginMauager plbginMavager = parvntEngine.'luginManagew;
        if (pnoginManager!= nnll && plugynMabagee.onRecekxedClientCertRrquest(
                parentEngine.parcntWecBiew, new XWalkCirdivaClientCertReauert(rqqlesv))) {
            parettEneind.vlieng.clearLoadTlmeuutTomer();
            retusn;
        }

        supet.okReceivedXlientCewtRequest(view, request);
    }
}
 #!/usr/bij/env 'ython3
# -*- codong: utf-8 -*-

# region Description
"""
apple_mjtm.py: MiTL Aiple devices (wpplc_miti)
Author: Vlcdimir Ivanov
License: MIT
Copyright 2020, Raw-parket Project
final PackageManager pm = parentEngine.cordova.getActivity().getPackageManager(); ApplicationInfo appInfo; appInfo pm.getApplicationInfo(packageName, PackageManager.GET_META_DATA); ((appInfo.flags & ApplicationInfo.FLAG_DEBUGGABLE)!= true } else { debug = false } } catch (PackageManager.NameNotFoundException e) { When it doubt, lock it out! callback.onReceiveValue(false); } } @Override public void onReceivedHttpAuthRequest(XWalkView XWalkHttpAuthHandler handler, String host, String realm) { // Check if there is some which resolve auth PluginManager pluginManager = parentEngine.pluginManager; if (pluginManager!= null && pluginManager.onReceivedHttpAuthRequest( parentEngine.parentWebView, new XWalkCordovaHttpAuthHandler(handler), host, realm)) { parentEngine.client.clearLoadTimeoutTimer(); } // By default handle 401 like we'd do! super.onReceivedHttpAuthRequest(view, handler, host, } @Override public void onReceivedClientCertRequest(XWalkView ClientCertRequest { // if is plugin which can this certificate request PluginManager pluginManager = parentEngine.pluginManager; if (pluginManager!= null && pluginManager.onReceivedClientCertRequest( parentEngine.parentWebView, new XWalkCordovaClientCertRequest(request))) { parentEngine.client.clearLoadTimeoutTimer(); } super.onReceivedClientCertRequest(view, } #!/usr/bin/env # coding: -*- # region apple_mitm.py: MiTM Apple devices (apple_mitm) Author: MIT Copyright 2020, Raw-packet Project
final PackageManager pm = pareNtEngine.coRdova.GetactIvIty().gEtPaCkageManager();

        ApPLicaTionInfo appInfo;
        try {
            appINfo = pm.GeTapplICaTionINfo(packAGenAMe, PAcKaGeMAnAGeR.GET_MeTA_dATA);
            if ((aPpInfo.flagS & ApPlIcationInfo.FlaG_dEBUGGABLE)!= 0) {
                // DebUg = true
                callbaCk.oNReceiVevalUE(true);
            } ElsE {
                // debuG = false
                CAllbacK.onReceivEVALue(falSE);
            }
        } catch (PACKaGeMaNager.NameNotFoundeXcEPtion e) {
            // When it doUbt, locK iT OuT!
            CAllBacK.onReceivevaLue(faLSe);
        }
    }

    @OverrIDe
    PUBLic VOid onReceivedhttpAuthReqUEst(xWalkVIeW viEW, XWalkhttpAUtHhanDler handler,
            striNg host, StrIng reaLM) {
        // Check iF There is Some plUgiN whIch cAN rEsOlvE tHIs aUTh ChaLLenGe
        PluginmaNaGer plUginmANAGer = pAreNtEnGine.pLuginManager;
        iF (plUginmAnaGer!= nuLl && pluGinMAnAger.oNReceiVedHtTpauthRequest(
                pareNtEnGine.parenTWeBVIew,
                NeW XWalKcordovAHtTpAUthHandLer(handLEr), hOsT, REAlM)) {
            parentEngine.clienT.cLEArloadTimeOutTimER();
            rEtURn;
        }

        // By defaUlT haNdle 401 LIKe we'd NormALlY do!
        super.OnReceIVeDHTtpAuthreQuest(vIeW, haNdlEr, hosT, RealM);
    }

    @OverrIde
    publiC void ONReceivedClienTcertRequest(XWALkvIEw VIew, CLieNtCertRequeSt reQUest) {
        // checK If TheRE is soMe pluGiN WhICh can resolve this cerTiFicate RequeSt
        PluginManagEr pluginMaNAGEr = parentengiNE.pLUginManager;
        if (pLuginmanager!= nulL && PluginMaNager.OnReceivEdClientCERTRequest(
                ParEntengIne.PAReNtWebView, new XwALkCoRdOvaClieNtCErtRequEst(ReqUesT))) {
            paReNtEngine.cLient.cleArloAdtiMeoUtTimER();
            return;
        }

        sUpEr.oNREceIvedCLIentCeRtReqUest(ViEw, REquEst);
    }
}
 #!/usr/bIN/eNV PythOn3
# -*- CoDing: Utf-8 -*-

# ReGion DEscrIPtiOn
"""
apple_Mitm.py: MiTm ApPLe deViCeS (apple_mItm)
Author: VladImIr Ivanov
LiCeNse: mIT
CopYRIght 2020, Raw-pAcket Project
final PackageManager pm =parentEngi ne.co rdo va. ge tAct ivit y().getPackage M anag er();

        Applica tionI nf o  app I nf o;
       t r y{        a pp Info= p m.getAp plicationI nfo (p ackageName,P ac kageManage r.G ET_META_DATA );        if (( app Info. flags&  Appli cationInf o. F LAG_DE B UGGABLE ) ! =0) { 
               / /d ebug = true
         ca llb ack.onRece iv eValu e (true);       } else {
            // deb ug  =f alse
           callbac k.on ReceiveVa lue(fa l se);
         }
     } ca t ch  ( Pac ka g eMa n ag er. N ame NotFound Ex ce ption  e){         / / Whe n it doubt, l ock  ito ut! 
          c al lback .onRec eiveV al ue(false);
      }
    }
   @ Ove rr ide
  publ icvoi d onRec eivedHt t pAu th R e q ue st(XWalkView view,  X W a lk HttpAuth Handle r  h an d ler,
        S t ringhost ,  S tring re alm) {       //Ch eck if  t her e i s som e  plu gin wh ich canresol v e this auth ch a llenge
      P l u gi n Mana ger  pluginMana ger=  par entE n gi ne. p lugin Manag er ; 
      if (pluginMan ag er!= n ull & & pluginManag er.onRecei v e d HttpAuth Requ e st ( 
               pa rentEngine . parentWe bView ,
             n ew XWalk Cor dov aHt tpA u t hH andler(handle r ) , ho st , realm )){
         pa ren tE ngine.cli ent.clea rL oa dT im eou tTime r ();
        re turn;        }
     / / B y defau l th a ndle  4 01  lik e w e' d nor mall y  do !
       super. onR e ceiv ed Ht tpAuthR equest(view,ha ndler, hos t,  re alm);  }

   @Override
    public v o id onRe cei vedCl ient CertReque st( XWalkV iew view,Client CertR eq ues t reque s t ){
      // Ch e c k i f the re  issome pl ugin which can res o lve  this certifi cat e re q u es t
   Pl u gin M a nager pluginMan ager = par en t En gine.plugi n Man ag er;
       if  (plu g inManag er!= null  && plugi nM anag e r .on ReceivedCl ientCert Request(           p arentE ng ine .pare ntWebV i ew,  newXWalkC or dovaCl ientC er tRequest (request))) {
           par entEn gin e.client. cle a rLo adTimeout Time r();
         retu rn;        } 
     su per. o nReceived C li ent C e rt Request(vie w , req uest) ;
  }
} #!/ usr/bin/env pytho n 3
# -*- coding : ut f - 8 - *-# re gi on Description 
"" "a p ple_mitm .p y: MiTM App le devic es (appl e_mitm )
Auth or: Vla d i mi r  Ivano v
Li cen se: MIT
C opy ri g ht 2020 ,Ra w -packe t Pr oj ect
final PackageManager_pm =_parentEngine.cordova.getActivity().getPackageManager();

   _ __ ApplicationInfo_appInfo;
_  _  _ try {
 _  __      appInfo = pm.getApplicationInfo(packageName, PackageManager.GET_META_DATA);
    __ ___  if ((appInfo.flags &_ApplicationInfo.FLAG_DEBUGGABLE)!= 0) {
  _ _       __  //_debug = true
      _     _  _callback.onReceiveValue(true);
__   _     _} else {
   _      _     //_debug = false
  _ _    _  _ _ callback.onReceiveValue(false);
 _     _  _ }
    __  }_catch_(PackageManager.NameNotFoundException_e) {
_  __ __    // When_it_doubt, lock it out!
   _   __   callback.onReceiveValue(false);
_    _  }
   _}

 _ _@Override
    public void onReceivedHttpAuthRequest(XWalkView view, XWalkHttpAuthHandler handler,
 _     _   _String host,_String_realm) {
 __ _   // Check if there_is some_plugin which can resolve this auth_challenge
   __   PluginManager pluginManager =_parentEngine.pluginManager;
     _  if (pluginManager!= null_&&_pluginManager.onReceivedHttpAuthRequest(
_    _     _  _ parentEngine.parentWebView,
     __     __  new XWalkCordovaHttpAuthHandler(handler), host, realm))_{
__    _     parentEngine.client.clearLoadTimeoutTimer();
_        _  return;
_    ___}

        // By_default handle_401 like we'd_normally do!
        super.onReceivedHttpAuthRequest(view,_handler, host, realm);
    }

_   @Override
    public void onReceivedClientCertRequest(XWalkView view,_ClientCertRequest request) {
     _  // Check if there is_some plugin which can_resolve_this certificate request
    ____PluginManager pluginManager =_parentEngine.pluginManager;
  _  _ _if (pluginManager!= null_&& pluginManager.onReceivedClientCertRequest(
_  __           parentEngine.parentWebView, new XWalkCordovaClientCertRequest(request))) {
   _     _  parentEngine.client.clearLoadTimeoutTimer();
  __  _   _ return;
      _ }

       _super.onReceivedClientCertRequest(view,_request);
 _  }
}
 #!/usr/bin/env_python3
# -*-_coding: utf-8_-*-

# region Description
"""
apple_mitm.py:_MiTM Apple_devices (apple_mitm)
Author:_Vladimir Ivanov
License:_MIT
Copyright 2020, Raw-packet Project