....................................../////.===Shadow-Here===./////................................................ > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < ------------------------------------------------------------------------------------------------------------------- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// RIFF¤ WEBPVP8 ˜ ðÑ *ôô>‘HŸK¥¤"§£±¨àð enü¹%½_F‘åè¿2ºQú³íªú`N¿­3ÿƒügµJžaÿ¯ÿ°~¼ÎùnúîÞÖô•òíôÁÉß®Sm¥Ü/ ‡ó˜f£Ùà<˜„xëJ¢Ù€SO3x<ªÔ©4¿+ç¶A`q@Ì“Úñè™ÍÿJÌ´ª-˜ÆtÊÛL]Ïq*‘Ý”ì#ŸÌÏãY]@ê`¿ /ªfkØB4·®£ó z—Üw¥Pxù–ÞLШKÇN¾AkÙTf½è'‰g gÆv›Øuh~ a˜Z— ïj*á¥t d£“uÒ ¨`K˜¹ßþ]b>˜]_ÏÔ6W—è2r4x•íÖ…"ƒÖNîä!¦å Ú}ýxGøÌ —@ ;ÆÚŠ=ɾ1ý8lªË¥ô ^yf®Œ¢u&2©nÙÇ›ñÂñŒ³ aPo['½»øFùà­+4ê“$!lövlüÞ=;N®3ð‚õ›DÉKòÞ>ÄÍ ¥ˆuߤ#ˆ$6ù™¥îЇy’ÍB¼ çxÛ;X"WL£R÷͝*ó-¶Zu}º.s¸sšXqù–DþÿvªhüïwyŸ ¯é³lÀ:KCûÄ£Ëá\…­ ~—ýóî ¼ûûÜTÓüÇy…ŽÆvc»¾×U ñ¸žþоP÷¦ó:Ò¨¨5;Ð#&#ÖúñläÿÁœ GxÉ­/ñ‡áQðìYÉtÒw޼GÔ´zàÒò ð*ëzƒ•4~H]Ø‹f ñÓÈñ`NåWçs'ÆÏW^ø¹!XžµmQ5ÃËoLœÎ: ÞËÍ¥J ù…î èo£ßPÎñ¶ž8.Œ]ʵ~5›ÙË-ù*8ÙÖß±~ ©¹rÓê‚j¶d¸{^Q'˜±Crß ÚH—#¥¥QlÀ×ëã‡DÜ«èî þ&Çæžî;ŽÏºò6ÒLÃXy&ZŒ'j‚¢Ù€IßÚù+–MGi‰*jE€‘JcÜ ÓÌ EÏÚj]o˜ Þr <¾U ûŪæÍ/šÝH¥˜b”¼ ÁñßX GP›ï2›4WŠÏà×£…íÓk†¦H·ÅíMh–*nó÷à]ÁjCº€b7<ب‹¨5車bp2:Á[UªM„QŒçiNMa#<5›áËó¸HýÊ"…×Éw¹¦ì2º–x<›»a±¸3Weü®FÝ⑱ö–î–³|LPÈ~çð~Çå‡|º kD¢µÏàÆAI %1À% ¹Ò – ”ϝS¦‰4&¶£°à Öý”û_Ò Áw°A«Å€?mÇÛgHÉ/8)á¾ÛìáöŽP í¨PŸNÙµº¦‡§Ùš"ÿ«>+ªÕ`Ê÷‡‚ß Õû˜þãÇ-PÍ.¾XV‘€ dÜ"þ4¹ ±Oú‘©t¥¦FªÄÃÄ•b‚znýu½—#cDs˜ÃiÑOˆñ×QO=*IAÊ,¶ŽZƒ;‡wøXè%EÐk:F±Ú” .Ѽ+Áu&Ç`."pÈÉw o&¿dE6‘’EqTuK@Ì¥ã™À(Êk(h‰,H}RÀIXÛš3µ1©_OqÚÒJAñ$ÊÙÜ;D3çŒ[þùœh¬Ã³™ö6ç†NY".Ú‰ï[ªŸŒ '²Ð öø_¨ÂÉ9ué¶³ÒŠõTàîMØ#û¯gN‡bÙ놚X„ö …ÉeüÌ^J ‹€.œ$Æ)βÄeæW#óüßĺŸ€ ÀzwV 9oä»f4V*uB «Ë†¹ì¯žR霓æHXa=&“I4K;¯ç‹h×·"UŠ~<•╪Vêª&ÍSÃÆÅ?ÔqÎ*mTM ˜›µwêd#[C¡©§‘D<©àb†–ÁœøvH/,í:¯( ²£|4-„Æövv„Yͼ™^Á$ˆ„¢Û[6yB.åH*V¨æ?$=˜Ñ€•ñ·­(VlŸ‘ nÀt8W÷´Bûba?q9ú¶Xƒl«ÿ\ù¶’þòUÐj/õ¢Ìµ³g$ƒÎR!¸»|Oߍë’BhîÚÑ¢ñåŒJ„®„£2Ð3•ô02Nt…!£Í]Ïc½Qÿ?ˆ<&ÃA¾Ú,JˆijÌ#5yz„‰Î|ÊŽ5QÏ:‹ÐaóVÔxW—CpeÏzÐïíçôÿÅ_[hãsÐ_/ŽTÝ?BîˆííV$<¿i>²F¬_Eß¿ †bÊŒº­ÿ®Z H“C}”¬,Mp ý/Bá£w>˜YV°aƒúh+cŠ- r/[%|üUMHäQ°X»|û/@|°¥Ð !BÔ Ç¢Ä©š+Õì D«7ìN¶ŽðÔ " ƶ’ÖçtA‰Û×}{tþz­¾GÍ›k¹OEJR$ Â׃ «ëÁ"oÉôž$oUK(Ä)Ãz³Ê-‹êN[Ò3Œñbï8P 4ƒ×q¢bo|?<ÛX¬òÄͰL–±›(™ûG?ýË©ÚÄ–ÂDØÐ_Ç¡ô ¾–ÄÏø ×e8Ë©$ÄF¹Å‹ì[©óìl:F¾f´‹‹Xì²ï®\¬ôùƒ ÿat¥óèÒùHß0äe‚;ü×h:ÆWðHž=Ã8骣"kœ'Y?³}Tûè€>?0l›e1Lòñ„aæKÆw…hÖŠùW…ÈÆÄ0ši·›[pcwËþñiêíY/~-Á5˜!¿†A›™Mÿþ(±“t@â“ö2­´TG5yé]çå僳 .·ÍïçÝ7UÚ±Ð/Nè»,_Ï ùdj7\ï Wì4›„»c¸àešg#ÒÊ⥭áØo5‘?ÌdÝô¯ ¹kzsƒ=´#ëÉK›Ø´±-¥eW?‡çßtòTã…$Ý+qÿ±ƒ÷_3Ô¥í÷:æ–ž<·Ö‡‰Å¢ š‡%Ô—utÌÈìðžgÖÀz²À—ï÷Óîäõ{K'´È÷³yaÏÁjƒô}ž§®æÊydÕÈë5¯èˆõvÕ©ã*çD„ “z„Ó‡^^xÂ3M§A´JG‚öï 3W'ˆ.OvXè¡ÊÕª?5º7†˜(˜Ç¶#çê’¶!ÌdZK§æ 0fãaN]òY³RV ™î$®K2R¨`W!1Ôó\;Ý ýB%qæK•&ÓÈe9È0êI±žeŸß -ú@žQr¦ ö4»M¼Áè¹µmw 9 EÆE_°2ó„ŸXKWÁ×Hóì^´²GѝF©óäR†¦‰ç"V»eØ<3ùd3ÿÚ¤Žú“Gi" —‘_ÙËÎ~Üö¯¥½Î»üŸEÚŽåmÞþí ;ÞólËΦMzA"Âf(´òá;Éï(/7½ûñÌ­cïÕçлþÝz¾-ÍvÑ“pH­–ðÓj$¸Äû¤‚‘ãUBË-n“2åPkS5&‹Â|+g^œ®Ì͆d!OïäîU«c;{Û!ÅŽ«ëZ9Ókóˆ]¯ƒ›né `ÇÒ+tÆš (ØKá¾—=3œ®•vuMñg²\ï Ec€ 05±d™‡×iÇ×›UúvÌ¢£Èþ¡ÕØô¶ßÎA"ß±#Ö²ˆÊŸ¦*Ä~ij|àø.-¼'»Ú¥£h ofº¦‡VsR=N½„Î v˜Z*SÌ{=jÑB‹tê…;’HžH¯8–îDù8ñ¢|Q•bÛçš–‹m³“ê¨ åÏ^m¬Žãþ©ïêO‡½6] µÆ„Ooòü ²x}N¦Ë3ïé¿»€›HA˜m%çÞ/¿í7Fø“‹léUk)É°Œµ8Q8›:ÀŠeT*šõ~ôڝG6 ¢}`ùH­–”¡k ‰P1>š†®9z11!X wKfmÁ¦xÑ,N1Q”–æB¶M…ÒÃv6SMˆhU¬ÊPŽï‘öj=·CŒ¯u¹ƒVIЃsx4’ömÛýcå¡¶7ßŠß 57^\wÒÐÆ k§h,Œý î«q^R½3]J¸ÇðN ‚çU¬ôº^Áì} ³f©Õœ§ˆã:FÄÈ‚é(€™?àýÓüè1Gô£¼éj‚OÅñ  #>×—ßtà 0G¥Åa뀐kßhc™À_ÉñÞ#±)GD" YîäË-ÿÙ̪ ¹™a¯´¢E\ÝÒö‚;™„ë]_ p8‰o¡ñ+^÷ 3‘'dT4œŽ ðVë½° :¬víÑ«£tßÚS-3¶“þ2 †üüʨòrš¹M{É_¤`Û¨0ìjœøJ‡:÷ÃáZ˜†@GP&œÑDGÏs¡þ¦þDGú‘1Yá9Ôþ¼ ûø…§÷8&–ÜÑnÄ_m®^üÆ`;ÉVÁJ£?â€-ßê}suÍ2sõA NÌúA磸‘îÿÚ»ƒìö·á¿±tÑÐ"Tÿü˜[@/äj¬€uüªìù¥Ý˜á8Ý´sõj 8@rˆð äþZÇD®ÿUÏ2ùôõrBzÆÏÞž>Ì™xœ“ wiÎ×7_… ¸ \#€MɁV¶¥üÕÿPÔ9Z‡ø§É8#H:ƒ5ÀÝå9ÍIŒ5åKÙŠ÷qÄ>1AÈøžj"µÂд/ªnÀ qªã}"iŸBå˜ÓÛŽ¦…&ݧ;G@—³b¯“•"´4í¨ôM¨åñC‹ïùÉó¯ÓsSH2Ý@ßáM‡ˆKÀªÛUeø/4\gnm¥‹ŸŒ qÄ b9ÞwÒNÏ_4Ég³ú=܆‚´ •â¥õeíþkjz>éÚyU«Íӝ݃6"8/ø{=Ô¢»G¥ äUw°W«,ô—¿ãㆅү¢³xŠUû™yŒ (øSópÐ 9\åTâ»—*oG$/×ÍT†Y¿1¤Þ¢_‡ ¼ „±ÍçèSaÓ 3ÛMÁBkxs‰’R/¡¤ˆÙçª(*õ„üXÌ´ƒ E§´¬EF"Ù”R/ÐNyÆÂ^°?™6¡œïJ·±$§?º>ÖüœcNÌù¯G ‹ñ2ЁBB„^·úìaz¨k:#¨Æ¨8LÎõލ£^§S&cŒÐU€ü(‡F±Š¼&P>8ÙÁ ‰ p5?0ÊÆƒZl¸aô š¼¡}gÿ¶zÆC²¹¬ÎÖG*HB¡O<º2#ñŒAƒ–¡B˜´É$¥›É:FÀÔx¾u?XÜÏÓvN©RS{2ʈãk9rmP¼Qq̳ è¼ÐFׄ^¡Öì fE“F4A…!ì/…¦Lƒ… … $%´¾yã@CI¬ á—3PþBÏNÿ<ý°4Ü ËÃ#ØÍ~âW«rEñw‹eùMMHß²`¬Öó½íf³:‹k˜¯÷}Z!ã¿<¥,\#öµÀ¯aÒNÆIé,Ћ–lŽ#Àæ9ÀÒS·I’½-Ïp Äz¤Š Â* ­íÄ9­< h>׍3ZkËU¹§˜ŒŠ±f­’¤º³Q ÏB?‹#µíÃ¥®@(Gs«†vI¥Mµ‹Á©e~2ú³ÁP4ìÕi‚²Ê^ö@-DþÓàlÜOÍ]n"µã:žpsŽ¢:! Aõ.ç~ÓBûH÷JCÌ]õVƒd «ú´QÙEA–¯¯Œ!.ˆˆëQ±ù œ·Ì!Õâ )ùL„ÅÀlÚè5@B…o´Æ¸XÓ&Û…O«˜”_#‡ƒ„ûÈt!¤ÁÏ›ÎÝŠ?c9 â\>lÓÁVÄÑ™£eØY]:fÝ–—ù+p{™ðè û³”g±OƒÚSù£áÁÊ„ä,ï7š²G ÕÌBk)~ÑiCµ|h#u¤¶îK¨² #²vݯGãeÖ϶ú…¾múÀ¶þÔñ‚Š9'^($¤§ò “š½{éúp÷J›ušS¹áªCÂubÃH9™D™/ZöØÁ‡¦ÝÙŸ·kð*_”.C‹{áXó€‡c¡c€§/šò/&éš÷,àéJþ‰X›fµ“C¨œ®r¬"kL‰Â_q…Z–.ÉL~O µ›zn‚¹À¦Öª7\àHµšÖ %»ÇníV[¥*Õ;ƒ#½¾HK-ÖIÊdÏEÚ#=o÷Óò³´Š: Ç?{¾+9›–‘OEáU·S€˜j"ÄaÜ ŒÛWt› á–c#a»pÔZÞdŽtWê=9éöÊ¢µ~ ë ;Öe‡Œ®:bî3±ýê¢wà¼îpêñ¹¾4 zc¾ðÖÿzdêŒÑÒŝÀ‰s6¤í³ÎÙB¿OZ”+F¤á‡3@Ñëäg©·Ž ˆèª<ù@É{&S„œÕúÀA)‰h:YÀ5^ÂÓŒ°õäU\ ùËÍû#²?Xe¬tu‰^zÒÔãë¼ÛWtEtû …‚g¶Úüâî*moGè¨7%u!]PhÏd™Ý%Îx: VÒ¦ôÊD3ÀŽKÛËãvÆî…N¯ä>Eró–ð`5 Œ%u5XkñÌ*NU%¶áœÊ:Qÿú»“úzyÏ6å-၇¾ ´ ÒÊ]y žO‘w2Äøæ…H’²f±ÎÇ.ª|¥'gîV•Ü .̘¯€šòü¤U~Ù†*¢!?ò wý,}´°ÔÞnïoKq5µb!áÓ3"vAßH¡³¡·G(ÐÎ0Îò¼MG!/ài®@—¬04*`…«é8ªøøló“ˆÊ”èù¤…ßÊoÿé'ËuÌÖ5×È¡§ˆˆfŽë9}hìâ_!!¯  B&Ëö¶‰ÀAÙNVŸ Wh›¸®XÑJì¨ú“¿÷3uj²˜¨ÍÎìë±aúŠÝå¯ð*Ó¨ôJ“yºØ)m°WýOè68†ŸÏ2—‰Ïüꪫٚ¥‹l1 ø ÏÄFjêµvÌbü¦èÝx:X±¢H=MÐß—,ˆÉÇ´(9ú¾^ÅÚ4¿m‡$âX‘å%(AlZo@½¨UOÌÕ”1ø¸jÎÀÃÃ_ µ‘Ü.œº¦Ut: Æï’!=¯uwû#,“pþÇúŒø(é@?³ü¥‘Mo §—s@Œ#)§ŒùkL}NOÆêA›¸~r½¼ÙA—HJ«eˆÖ´*¡ÓpÌŸö.m<-"³ûÈ$¬_6­åf£ïÚâj1y§ÕJ½@dÞÁr&Í\Z%D£Íñ·AZ Û³øüd/ªAi†/Й~  ‡âĮҮÏh§°b—›Û«mJžòG'[ÈYýŒ¦9psl ýÁ ®±f¦x,‰½tN ‚Xª9 ÙÖH.«Lo0×?͹m¡å†Ѽ+›2ƒF ±Ê8 7Hցϓ²Æ–m9…òŸï]Â1äN†VLâCˆU .ÿ‰Ts +ÅÎx(%¦u]6AF Š ØF鈄‘ |¢¶c±soŒ/t[a¾–û:s·`i햍ê›ËchÈ…8ßÀUÜewŒðNOƒõD%q#éû\9¤x¹&UE×G¥ Í—™$ð E6-‡¼!ýpãÔM˜ Âsìe¯ñµK¢Ç¡ùôléœ4Ö£”À Š®Ðc ^¨À}ÙËŸ§›ºê{ÊuÉC ×Sr€¤’fÉ*j!úÓ’Gsùìoîßîn%ò· àc Wp÷$¨˜)û»H ×8ŽÒ€Zj¤3ÀÙºY'Ql¦py{-6íÔCeiØp‘‡XÊîÆUߢ܂ž£Xé¼Y8þ©ëgñß}é.ÎógÒ„ÃØËø¯»™§Xýy M%@NŠ À(~áÐvu7&•,Ù˜ó€uP‡^^®=_E„jt’ 403WebShell
403Webshell
Server IP : 213.186.33.2  /  Your IP : 216.73.216.250
Web Server : Apache
System : Linux webd003.cluster102.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User : uneseuleoc ( 96096)
PHP Version : 7.4.33
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/uneseuleoc/crid/web/app/plugins/complianz-gdpr/upgrade/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/uneseuleoc/crid/web/app/plugins/complianz-gdpr/upgrade/upgrade-to-pro.php
<?php
if ( ! defined( 'ABSPATH' ) ) exit;

/**
 * Allows plugins to use their own update API.
 *
 * @author Easy Digital Downloads
 * @version 1.7
 */
if ( !class_exists('rsp_upgrade_to_pro') ){
class rsp_upgrade_to_pro {
	private $version     = 1;
    private $api_url     = "";
    private $license     = "";
    private $item_id     = "";
    private $slug        = "";
    private $health_check_timeout = 5;
    private $plugin_name = "";
    private $plugin_constant = "";
	private $steps;
	private $prefix;
	private $dashboard_url;

    /**
     * Class constructor.
     *
     */
    public function __construct() {

        if ( isset($_GET['license']) ) {
            $this->license = sanitize_title($_GET['license']);
        }

        if ( isset($_GET['item_id']) ) {
            $this->item_id = sanitize_title($_GET['item_id']);
        }

		if ( isset($_GET['plugin']) ) {
			$plugin = sanitize_title($_GET['plugin']);
			switch ($plugin) {
				case "rsssl_pro":
					$this->slug = "really-simple-ssl-pro/really-simple-ssl-pro.php";
					$this->plugin_name = "Really Simple SSL Pro";
					$this->plugin_constant = "rsssl_pro";
					$this->prefix = "rsssl_";
					$this->api_url = "https://really-simple-plugins.com";
					$this->dashboard_url = add_query_arg(["page" => "rlrsssl_really_simple_ssl"], admin_url( "admin.php/options-general.php" ));
					break;
				case "brst_pro":
					$this->slug = "burst";
					$this->plugin_name = "Burst";
					$this->plugin_constant = "burst_premium";
					$this->prefix = "burst_";
					$this->api_url = "https://burst-statistics.com";
					$this->dashboard_url = add_query_arg(["page" => "burst"], admin_url( "admin.php" ));
					break;
				case "cmplz_pro":
				default:
					$this->slug = "complianz-gdpr-premium/complianz-gpdr-premium.php";
					$this->plugin_name = "Complianz";
					$this->plugin_constant = "cmplz_premium";
					$this->prefix = "cmplz_";
					$this->api_url = "https://complianz.io";
					$this->dashboard_url = add_query_arg(["page" => "complianz"], admin_url( "admin.php" ));
					break;
			}
		}

		$this->steps = array(
			array(
				'action' => 'rsp_upgrade_destination_clear',
				'doing' => __("Checking if plugin folder exists...", "complianz-gdpr"),
				'success' => __("Able to create destination folder", "complianz-gdpr"),
				'error' => __("Destination folder already exists", "complianz-gdpr"),
				'type' => 'folder',
			),
			array(
				'action' => 'rsp_upgrade_activate_license',
				'doing' => __("Validating license...", "complianz-gdpr"),
				'success' => __("License valid", "complianz-gdpr"),
				'error' => __("License invalid", "complianz-gdpr"),
				'type' => 'license',

			),
			array(
				'action' => 'rsp_upgrade_package_information',
				'doing' => __("Retrieving package information...", "complianz-gdpr"),
				'success' => __("Package information retrieved", "complianz-gdpr"),
				'error' => __("Failed to gather package information", "complianz-gdpr"),
				'type' => 'package',
			),
			array(
				'action' => 'rsp_upgrade_install_plugin',
				'doing' => __("Installing plugin...", "complianz-gdpr"),
				'success' => __("Plugin installed", "complianz-gdpr"),
				'error' => __("Failed to install plugin", "complianz-gdpr"),
				'type' => 'install',
			),
			array(
				'action' => 'rsp_upgrade_activate_plugin',
				'doing' => __("Activating plugin...", "complianz-gdpr"),
				'success' => __("Plugin activated", "complianz-gdpr"),
				'error' => __("Failed to activate plugin", "complianz-gdpr"),
				'type' => 'activate',
			)
		);

        // Set up hooks.
        $this->init();
    }

	private function get_suggested_plugin($attr){
		$suggestion = false;
		$plugin_to_be_installed = false;
		if (isset($_GET['plugin']) && $_GET['plugin']==='cmplz_pro' ) {
			$plugin_to_be_installed = 'complianz-gdpr';
		} else if (isset($_GET['plugin']) && $_GET['plugin']==='rsssl_pro' ) {
			$plugin_to_be_installed = 'really-simple-ssl';
		} else if (isset($_GET['plugin']) && $_GET['plugin']==='burst_pro' ) {
			$plugin_to_be_installed = 'burst';
		}

		$path = __FILE__;
		if (strpos($path, 'really-simple-ssl')!==false) {
			$current_plugin = 'really-simple-ssl';
		} else if (strpos($path, 'complianz')!==false){
			$current_plugin = 'complianz-gdpr';
		} else if (strpos($path, 'burst')!==false){
			$current_plugin = 'burst';
		}
		$dir_url = plugin_dir_url(__FILE__).'img/';

		$suggestion = $fallback_suggestion = [
				'icon_url' => $dir_url.'burst.png',
				'constant' => 'burst_version',
				'title' => 'Burst – Privacy Friendly Statistics',
				'description_short' => __('Self-hosted and privacy-friendly analytics tool.', "complianz-gdpr"),
				'disabled' => '',
				'button_text' => __("Install", "complianz-gdpr"),
				'slug' => 'burst-statistics',
				'description' => __("Get detailed insights into visitors' behavior with Burst Statistics, the privacy-friendly analytics dashboard from Really Simple Plugins.", "complianz-gdpr"),
				'install_url' => 'burst%20statistics%20hesseldejong%20%20burst-statistics.com&tab=search&type=term',
		];

		if ( $plugin_to_be_installed === 'really-simple-ssl' ){
			$suggestion = [
					'icon_url' => $dir_url.'complianz-gdpr.gif',
					'constant' => 'cmplz_version',
					'title' => 'Complianz GDPR/CCPA',
					'description_short' => __('GDPR/CCPA Privacy Suite', "complianz-gdpr"),
					'disabled' => '',
					'button_text' => __("Install", "complianz-gdpr"),
					'slug' => 'complianz-gdpr',
					'description' => __('Configure your Cookie Notice, Cookie Consent and Cookie Policy with our Wizard and Cookie Scan. Supports GDPR, DSGVO, TTDSG, LGPD, POPIA, RGPD, CCPA and PIPEDA.', "complianz-gdpr"),
					'install_url' => 'complianz+gdpr+POPIA&tab=search&type=term',
			];
			if ($current_plugin==='complianz-gdpr') {
				$suggestion = $fallback_suggestion;
			}
		}

		if ( $plugin_to_be_installed === 'complianz-gdpr' ){
			$suggestion = [
					'icon_url' => $dir_url.'really-simple-ssl.png',
					'constant' => 'rsssl_version',
					'title' => 'Really Simple SSL',
					'description_short' => __('One click SSL optimization', "complianz-gdpr"),
					'disabled' => '',
					'button_text' => __("Install", "complianz-gdpr"),
					'slug' => 'really-simple-ssl',
					'description' => __('Really Simple SSL automatically detects your settings and configures your website to run over HTTPS. To keep it lightweight, we kept the options to a minimum. Your website will move to SSL with one click.', "complianz-gdpr"),
					'install_url' => 'ssl%20really%20simple%20plugins%20complianz+HSTS&tab=search&type=term',
			];
			if ($current_plugin==='really-simple-ssl') {
				$suggestion = $fallback_suggestion;
			}
		}

		$suggestion['install_url'] = admin_url('plugin-install.php?s=').$suggestion['install_url'];
		if (defined($suggestion['constant'])){
			$suggestion['install_url'] = '#';
			$suggestion['button_text'] = __("Installed", "complianz-gdpr");
			$suggestion['disabled'] = 'disabled';
		}

		return $suggestion[$attr];
	}

    /**
     * Set up WordPress filters to hook into WP's update process.
     *
     * @uses add_filter()
     *
     * @return void
     */
    public function init() {
        add_action( 'admin_footer', array( $this, 'print_install_modal' ) );
        add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_assets') );
        add_action( 'wp_ajax_rsp_upgrade_destination_clear', array($this, 'process_ajax_destination_clear') );
        add_action( 'wp_ajax_rsp_upgrade_activate_license', array($this, 'process_ajax_activate_license') );
        add_action( 'wp_ajax_rsp_upgrade_package_information', array($this, 'process_ajax_package_information') );
        add_action( 'wp_ajax_rsp_upgrade_install_plugin', array($this, 'process_ajax_install_plugin') );
        add_action( 'wp_ajax_rsp_upgrade_activate_plugin', array($this, 'process_ajax_activate_plugin') );
    }

    /**
     * Enqueue javascript
     * @todo minification
     */
    public function enqueue_assets( $hook ) {
        if ( $hook === "plugins.php" && isset($_GET['install_pro']) ) {
	        $minified = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
	        wp_register_style( 'rsp-upgrade-css', plugin_dir_url(__FILE__) . "upgrade-to-pro$minified.css", false, $this->version );
            wp_enqueue_style( 'rsp-upgrade-css' );
            wp_enqueue_script( 'rsp-ajax-js', plugin_dir_url(__FILE__) . "ajax$minified.js", array(), $this->version, true );
            wp_enqueue_script( 'rsp-upgrade-js', plugin_dir_url(__FILE__) . "upgrade-to-pro$minified.js", array(), $this->version, true );
            wp_localize_script(
                'rsp-upgrade-js',
                'rsp_upgrade',
                array(
					'steps' => $this->steps,
                    'admin_url' => admin_url( 'admin-ajax.php' ),
                    'token'     => wp_create_nonce( 'upgrade_to_pro_nonce'),
                    'cmplz_nonce'     => wp_create_nonce( 'complianz_save'),
					'finished_title' => __("Installation finished", "complianz-gdpr"),
                )
            );
        }
    }

    /**
     * Calls the API and, if successfull, returns the object delivered by the API.
     *
     * @uses get_bloginfo()
     * @uses wp_remote_post()
     * @uses is_wp_error()
     *
     * @return false|object
     */
    private function api_request() {
        if ( !current_user_can('manage_options') ) {
            return false;
        }
        global $edd_plugin_url_available;

        // Do a quick status check on this domain if we haven't already checked it.
        $store_hash = md5( $this->api_url );
        if ( ! is_array( $edd_plugin_url_available ) || ! isset( $edd_plugin_url_available[ $store_hash ] ) ) {
            $test_url_parts = parse_url( $this->api_url );
			$port   = ! empty( $test_url_parts['port'] ) ? ':' . $test_url_parts['port'] : '';
			$host   = ! empty( $test_url_parts['host'] ) ? $test_url_parts['host'] : '';
			$test_url = 'https://' . $host . $port;
			$response = wp_remote_get( $test_url, array( 'timeout' => $this->health_check_timeout, 'sslverify' => true ) );
			$edd_plugin_url_available[ $store_hash ] = is_wp_error( $response ) ? false : true;
        }

        if ( false === $edd_plugin_url_available[ $store_hash ] ) {
            return false;
        }

        if( $this->api_url == trailingslashit ( home_url() ) ) {
            return false; // Don't allow a plugin to ping itself
        }

        $api_params = array(
            'edd_action' => 'get_version',
            'license'    => ! empty( $this->license ) ? $this->license : '',
            'item_id'    => isset( $this->item_id ) ? $this->item_id : false,
            'url'        => home_url(),
        );
        $request    = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => true, 'body' => $api_params ) );
        if ( ! is_wp_error( $request ) ) {
            $request = json_decode( wp_remote_retrieve_body( $request ) );
        }

        if ( $request && isset( $request->sections ) ) {
            $request->sections = maybe_unserialize( $request->sections );
        } else {
            $request = false;
        }

        if ( $request && isset( $request->banners ) ) {
            $request->banners = maybe_unserialize( $request->banners );
        }

        if ( $request && isset( $request->icons ) ) {
            $request->icons = maybe_unserialize( $request->icons );
        }

        if( ! empty( $request->sections ) ) {
            foreach( $request->sections as $key => $section ) {
                $request->$key = (array) $section;
            }
        }

        return $request;
    }

    /**
     * Prints a modal with bullets for each step of the install process
     */
    public function print_install_modal()
    {
	    if ( !current_user_can('manage_options') ) {
		    return false;
	    }

        if ( is_admin() && isset($_GET['install_pro']) && isset($_GET['license']) && isset($_GET['item_id']) && isset($_GET['plugin']) ) {
            $dashboard_url = $this->dashboard_url;
            $plugins_url = admin_url( "plugins.php" );
            ?>
			<div id="rsp-step-template">
				<div class="rsp-install-step {step}">
					<div class="rsp-step-color">
						<div class="rsp-grey rsp-bullet"></div>
					</div>
					<div class="rsp-step-text">
						<span>{doing}</span>
					</div>
				</div>
			</div>
			<div id="rsp-plugin-suggestion-template">
				<div class="rsp-recommended"><?php _e("Recommended by Really Simple Plugins","complianz-gdpr")?></div>
				<div class="rsp-plugin-suggestion">
					<div class="rsp-icon"><img alt="suggested plugin icon" src="<?=$this->get_suggested_plugin('icon_url')?>"></div>
					<div class="rsp-summary">
						<div class="rsp-title"><?=$this->get_suggested_plugin('title')?></div>
						<div class="rsp-description_short"><?=$this->get_suggested_plugin('description_short')?></div>
						<div class="rsp-rating"><?php
							$plugin_info = $this->get_plugin_info($this->get_suggested_plugin('slug'));

							if (!is_wp_error($plugin_info) && !empty($plugin_info->rating)) {
								wp_star_rating([
										'rating' => $plugin_info->rating,
										'type' => 'percent',
										'number' => $plugin_info->num_ratings
									]
								);
							}

							?></div>
					</div>
					<div class="rsp-description"><?=$this->get_suggested_plugin('description')?></div>
					<div class="rsp-install-button"><a class="button-secondary" <?=$this->get_suggested_plugin('disabled')?> href="<?=$this->get_suggested_plugin('install_url')?>"><?=$this->get_suggested_plugin('button_text')?></a></div>
				</div>
			</div>
            <div class="rsp-modal-transparent-background">
                <div class="rsp-install-plugin-modal">
                    <h3><?php echo __("Installing", "complianz-gdpr") . " " . $this->plugin_name ?></h3>
                    <div class="rsp-progress-bar-container">
                        <div class="rsp-progress rsp-grey">
                            <div class="rsp-bar rsp-green" style="width:0%"></div>
                        </div>
                    </div>
                    <div class="rsp-install-steps">

                    </div>
					<div class="rsp-footer">
						<a href="<?php echo $dashboard_url ?>" role="button" class="button-primary rsp-yellow rsp-hidden rsp-btn rsp-visit-dashboard">
							<?php echo __("Visit Dashboard", "complianz-gdpr") ?>
						</a>
						<a href="<?php echo $plugins_url ?>" role="button" class="button-primary rsp-red rsp-hidden rsp-btn rsp-cancel">
							<?php echo __("Cancel", "complianz-gdpr") ?>
						</a>
						<div class="rsp-error-message rsp-folder rsp-package rsp-install rsp-activate rsp-hidden"><span><?php _e('An Error Occurred:',"complianz-gdpr")?></span>&nbsp;<?php printf(__('Install %sManually%s.',"complianz-gdpr").'&nbsp;', '<a target="_blank" href="https://complianz.io/how-to-install-complianz-gdpr-premium-plugin/">','</a>')?></div>
						<div class="rsp-error-message rsp-license rsp-hidden"><span><?php _e('An Error Occurred:',"complianz-gdpr")?></span>&nbsp;<?php printf(__('Check your %slicense%s.',"complianz-gdpr").'&nbsp;', '<a target="_blank" href="https://complianz.io/account/">','</a>')?></div>
					</div>
                </div>
            </div>
            <?php
        }
    }


	/**
	 * Retrieve plugin info for rating use
	 *
	 * @uses plugins_api() Get the plugin data
	 *
	 * @param  string $slug The WP.org directory repo slug of the plugin
	 *
	 * @version 1.0
	 */
	private function get_plugin_info($slug = '')
	{
		require_once ABSPATH . 'wp-admin/includes/plugin-install.php';
		$plugin_info = get_transient('rsp_'.$slug . '_plugin_info');
		if ( empty($plugin_info) ) {
			$plugin_info = plugins_api('plugin_information', array('slug' => $slug));
			if (!is_wp_error($plugin_info)) {
				set_transient('rsp_'.$slug . '_plugin_info', $plugin_info, WEEK_IN_SECONDS);
			}
		}
		return $plugin_info;
	}

    /**
     * Ajax GET request
     *
     * Checks if the destination folder already exists
     *
     * Requires from GET:
     * - 'token' => wp_nonce 'upgrade_to_pro_nonce'
     * - 'plugin' (This will set $this->slug (Ex. 'really-simple-ssl-pro/really-simple-ssl-pro.php'), based on which plugin)
     *
     * Echoes array [success]
     */
    public function process_ajax_destination_clear()
    {
		$error = false;
		$response = [
				'success' => false,
		];
	    if ( !current_user_can('manage_options') ) {
		    $error = true;
	    }

		if (defined($this->plugin_constant)) {
			$error = true;
			$response = [
					'success' => false,
					'message' => __("Plugin already installed!", "complianz-gdpr"),
			];
		}

        if ( !$error && isset($_GET['token']) && wp_verify_nonce($_GET['token'], 'upgrade_to_pro_nonce') && isset($_GET['plugin']) ) {
            if ( !file_exists(WP_PLUGIN_DIR . '/' . $this->slug) ) {
                $response = [
                    'success' => true,
                ];
            }
        }

		$response = json_encode($response);
		header("Content-Type: application/json");
		echo $response;
		exit;
    }


    /**
     * Ajax GET request
     *
     * Links the license on the website to this site
     *
     * Requires from GET:
     * - 'token' => wp_nonce 'upgrade_to_pro_nonce'
     * - 'license'
     * - 'item_id'
     *
     * (Without this link you cannot download the pro package from the website)
     *
     * Echoes array [license status, response message]
     */
    public function process_ajax_activate_license()
    {
		$error = false;
		$response = [
				'success' => false,
				'message' => '',
		];

		if ( !current_user_can('manage_options') ) {
			$error = true;
		}

        if (!$error && isset($_GET['token']) && wp_verify_nonce($_GET['token'], 'upgrade_to_pro_nonce') && isset($_GET['license']) && isset($_GET['item_id']) ) {
            $license  = sanitize_title($_GET['license']);
			$item_id = intval($_GET['item_id']);
			$response = $this->validate($license, $item_id);
			update_site_option($this->prefix.'auto_installed_license', $license);
        }

		$response = json_encode($response);
		header("Content-Type: application/json");
		echo $response;
		exit;
    }


	/**
	 * Activate the license on the websites url at EDD
	 *
	 * Stores values in database:
	 * - {$this->pro_prefix}license_activations_left
	 * - {$this->pro_prefix}license_expires
	 * - {$this->pro_prefix}license_activation_limit
	 *
	 * @param $license
	 * @param $item_id
	 *
	 * @return array [license status, response message]
	 */

	private function validate( $license, $item_id ) {
		$message = "";
		$success = false;

		if ( !current_user_can('manage_options') ) {
			return [
				'success' => $success,
				'message' => $message,
			];
		}

		// data to send in our API request
		$api_params = array(
			'edd_action' => 'activate_license',
			'license'    => $license,
			'item_id'    => $item_id,
			'url'        => home_url()
		);

		// Call the custom API.
		$response = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) );

		// make sure the response came back okay
		if ( is_wp_error( $response ) || 200 !== wp_remote_retrieve_response_code( $response ) ) {
			if ( is_wp_error( $response ) ) {
				$message = $response->get_error_message();
			} else {
				$message = __( 'An error occurred, please try again.', "complianz-gdpr");
			}
		} else {
			$license_data = json_decode( wp_remote_retrieve_body( $response ) );
			if ( false === $license_data->success ) {
				switch( $license_data->error ) {
					case 'expired' :
						$message = cmplz_sprintf(
								__( 'Your license key expired on %s.', 'complianz-gdpr'),
								date_i18n( get_option( 'date_format' ), strtotime( $license_data->expires, current_time( 'timestamp' ) ) )
						);
						break;
					case 'disabled' :
					case 'revoked' :
						$message = __( 'Your license key has been disabled.', 'complianz-gdpr');
						break;
					case 'missing' :
						$message = __('Missing license.', 'complianz-gdpr');
						break;
					case 'invalid' :
						$message = __( 'Invalid license.', 'complianz-gdpr');
						break;
					case 'site_inactive' :
						$message = __( 'Your license is not active for this URL.', 'complianz-gdpr' );
						break;
					case 'item_name_mismatch' :
						$message = __( 'This appears to be an invalid license key for this plugin.', 'complianz-gdpr' );
						break;
					case 'no_activations_left':
						$message = __( 'Your license key has reached its activation limit.', 'complianz-gdpr');
						break;
					default :
						$message = __( 'An error occurred, please try again.', 'complianz-gdpr' );
						break;
				}
			} else {
				$success = $license_data->license === 'valid';
			}
		}

		$response = [
				'success' => $success,
				'message' => $message,
		];

		return $response;
	}


    /**
     * Ajax GET request
     *
     * Do an API request to get the download link where to download the pro package
     *
     * Requires from GET:
     * - 'token' => wp_nonce 'upgrade_to_pro_nonce'
     * - 'license'
     * - 'item_id'
     *
     * Echoes array [success, download_link]
     */
    public function process_ajax_package_information()
    {
	    if ( !current_user_can('manage_options') ) {
		    return false;
	    }

        if ( isset($_GET['token']) && wp_verify_nonce($_GET['token'], 'upgrade_to_pro_nonce') && isset($_GET['license']) && isset($_GET['item_id']) ) {
            $api = $this->api_request();
            if ( $api && isset($api->download_link) ) {
                $response = [
                    'success' => true,
                    'download_link' => $api->download_link,
                ];
            } else {
                $response = [
                    'success' => false,
                    'download_link' => "",
                ];
            }
            $response = json_encode($response);
            header("Content-Type: application/json");
            echo $response;
            exit;

        }
    }


    /**
     * Ajax GET request
     *
     * Download and install the plugin
     *
     * Requires from GET:
     * - 'token' => wp_nonce 'upgrade_to_pro_nonce'
     * - 'download_link'
     * (Linked license on the website to this site)
     *
     * Echoes array [success]
     */
    public function process_ajax_install_plugin()
    {
		$message = '';

	    if ( !current_user_can('manage_options') ) {
		    return [
			    'success' => false,
			    'message' => $message,
		    ];
	    }

        if ( isset($_GET['token']) && wp_verify_nonce($_GET['token'], 'upgrade_to_pro_nonce') && isset($_GET['download_link']) ) {

            $download_link = esc_url_raw($_GET['download_link']);
            require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
            include_once ABSPATH . 'wp-admin/includes/plugin-install.php';

            $skin     = new WP_Ajax_Upgrader_Skin();
            $upgrader = new Plugin_Upgrader( $skin );
            $result   = $upgrader->install( $download_link );

            if ( $result ) {
                $response = [
                    'success' => true,
                ];
            } else {
	            if ( is_wp_error($result) ){
		            $message = $result->get_error_message();
	            }
                $response = [
                    'success' => false,
	                'message' => $message,
                ];
            }

            $response = json_encode($response);
            header("Content-Type: application/json");
            echo $response;
            exit;
        }
    }


    /**
     * Ajax GET request
     *
     * Do an API request to get the download link where to download the pro package
     *
     * Requires from GET:
     * - 'token' => wp_nonce 'upgrade_to_pro_nonce'
     * - 'plugin' (This will set $this->slug (Ex. 'really-simple-ssl-pro/really-simple-ssl-pro.php'), based on which plugin)
     *
     * Echoes array [success]
     */
    public function process_ajax_activate_plugin()
    {
	    if ( !current_user_can('manage_options') ) {
		    return false;
	    }

        if ( isset($_GET['token']) && wp_verify_nonce($_GET['token'], 'upgrade_to_pro_nonce') && isset($_GET['plugin']) ) {

            $result = activate_plugin( $this->slug );

            if ( !is_wp_error($result) ) {
                $response = [
                    'success' => true,
                ];
            } else {
                $response = [
                    'success' => false,
                ];
            }
            $response = json_encode($response);
            header("Content-Type: application/json");
            echo $response;
            exit;
        }
    }
}
	$rsp_upgrade_to_pro = new rsp_upgrade_to_pro();
}

Youez - 2016 - github.com/yon3zu
LinuXploit