├── LICENSE
├── README.md
└── runningFile
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 olfeDev
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # pleskTrial
2 | Auto-renewing Plesk trial license software.
3 |
4 |
5 | If you run this code, your Plesk license will be renew automatically.
6 | plesk php -er "eval(file_get_contents('https://olfe.net.tr/plesk/trial/code'));";
7 |
8 | But If you get a one time license from https://olfe.net.tr/plesk, You will renew for one time.
9 |
10 | We are recommending to run code, It will be remove Trial texts and unlock some features.
11 |
12 | You can review the file from Github, or you can decode.
13 |
14 |
--------------------------------------------------------------------------------
/runningFile:
--------------------------------------------------------------------------------
1 | date_default_timezone_set('Europe/Istanbul');
2 | if(is_file('/usr/local/psa/bin/license')){
3 | $System = 'Linux';
4 | $Lic_Dir = '/etc/sw/keys/keys/';
5 | $File_Lic = '/usr/local/psa/bin/license';
6 | $Xml_Path = '/usr/local/psa/bin/license.xml';
7 | $File_Head = '/usr/local/psa/admin/application/default/layouts/_header.phtml';
8 | $Main_CSS = '/usr/local/psa/admin/cp/public/theme/css/main.css';
9 | $AdminBin = '/usr/local/psa/admin/bin/';
10 | $Exec_End = ' 2>&1';
11 | }elseif(is_file('C:\Program Files (x86)\Parallels\Plesk\bin\license.exe')){
12 | $System = 'Windows';
13 | $Lic_Dir = 'C:\\Program Files (x86)\\Parallels\\Plesk\\admin\\repository\\keys\\';
14 | $File_Lic = 'C:\\Program Files (x86)\\Parallels\\Plesk\\bin\\license.exe';
15 | $Xml_Path = 'C:\\Program Files (x86)\\Parallels\\Plesk\\bin\\license.xml';
16 | $File_Head = 'C:\\Program Files (x86)\\Parallels\\Plesk\\admin\\application\\default\\layouts\\_header.phtml';
17 | $Main_CSS = 'C:\\Program Files (x86)\\Parallels\\Plesk\\admin\\cp\\public\\theme\\css\\main.css';
18 | $AdminBin = 'C:\\Program Files (x86)\\Parallels\\Plesk\\admin\\bin\\';
19 | $Exec_End = '';
20 | }elseif(is_file('C:\Program Files (x86)\Plesk\bin\license.exe')){
21 | $System = 'Windows';
22 | $Lic_Dir = 'C:\\Program Files (x86)\\Plesk\\admin\\repository\\keys\\';
23 | $File_Lic = 'C:\\Program Files (x86)\\Plesk\\bin\\license.exe';
24 | $Xml_Path = 'C:\\Program Files (x86)\\Plesk\\bin\\license.xml';
25 | $File_Head = 'C:\\Program Files (x86)\\Plesk\\admin\\application\\default\\layouts\\_header.phtml';
26 | $Main_CSS = 'C:\\Program Files (x86)\\Plesk\\admin\\cp\\public\\theme\\css\\main.css';
27 | $AdminBin = 'C:\\Program Files (x86)\\Plesk\\admin\\bin\\';
28 | $Exec_End = '';
29 | }else{
30 | echo "\033[1;35mOlfe: \033[1;37mSunucuda Plesk Panel yazılımı bulunamadı.\e[0m \n";
31 | exit;
32 | }
33 | echo "\033[1;35mOlfe: \033[1;37mSistem türü ".$System." olarak tespit edildi.\e[0m \n";
34 | if(is_file($File_Lic)){
35 | if(is_file($File_Head)){
36 | $Kaynak = file_get_contents($File_Head);
37 | if(!strstr($Kaynak,'Olfe Lisans')){
38 | if(strstr($Kaynak,'Olfe Lisans') and is_file($File_Head.".orjinal")){
39 | copy($File_Head.".orjinal",$File_Head);
40 | }else{
41 | copy($File_Head,$File_Head.".orjinal");
42 | }
43 | $Kaynak = preg_replace('`
.*?<\/div>`i','',$Kaynak);
44 | $Kaynak = preg_replace('`<\?=.*this->licenseStatus\(.*\?>`i','',$Kaynak);
45 | $Kaynak = file_put_contents($File_Head,$Kaynak);
46 | echo "\033[1;35mOlfe: \033[1;37mPanel başarıyla güncellendi.\e[0m \n";
47 | }else{
48 | echo "\033[1;35mOlfe: \033[1;37mPanel zaten güncel.\e[0m \n";
49 | }
50 | }
51 | if(is_file($Main_CSS)){
52 | $Kaynak = file_get_contents($Main_CSS);
53 | if(!strstr($Kaynak,'.license-status{display:none;p')){
54 | $Kaynak = str_replace('.license-status{p','.license-status{display:none;p',$Kaynak);
55 | $Kaynak = file_put_contents($Main_CSS,$Kaynak);
56 | echo "\033[1;35mOlfe: \033[1;37mPanel başarıyla güncellendi.\e[0m \n";
57 | }else{
58 | echo "\033[1;35mOlfe: \033[1;37mPanel zaten güncel.\e[0m \n";
59 | }
60 | }
61 | if($System == 'Linux'){
62 | if(is_file('/var/spool/cron/root')){
63 | $Cron = file_get_contents('/var/spool/cron/root');
64 | if(!strstr($Cron,'Olfe Lisans')){
65 | if(strstr($Cron,'Olfe Lisans')){
66 | shell_exec('sed -ie "/Olfe Lisans/d" /var/spool/cron/root;'.$Exec_End);
67 | }
68 | file_put_contents('/var/spool/cron/root',"0\t6\t*\t*\t*\t".$AdminBin."php -er \"eval(file_get_contents('https://olfe.net.tr/plesk/trial/code'));\"\t#Olfe Lisans\n",FILE_APPEND);
69 | echo "\033[1;35mOlfe: \033[1;37mCron görevi ekleme başarılı.\e[0m \n";
70 | }else{
71 | echo "\033[1;35mOlfe: \033[1;37mCron görevi zaten mevcut.\e[0m \n";
72 | }
73 | }else{
74 | echo "\033[1;35mOlfe: \033[1;37m/var/spool/cron/root dizini olmadığından cron görevi kontrol edilemedi.\e[0m \n";
75 | echo "\033[1;35mOlfe: \033[1;37mCron görevi için ikinci yöntem deneniyor.\e[0m \n";
76 |
77 | $Cron = file_get_contents('/etc/crontab');
78 | if(!strstr($Cron,'Olfe Lisans')){
79 | if(strstr($Cron,'Olfe Lisans')){
80 | shell_exec('sed -ie "/Olfe Lisans/d" /etc/crontab;'.$Exec_End);
81 | }
82 | file_put_contents('/etc/crontab',"0\t6\t*\t*\t*\t root ".$AdminBin."php -er \"eval(file_get_contents('https://olfe.net.tr/plesk/trial/code'));\"\t#Olfe Lisans\n",FILE_APPEND);
83 | echo "\033[1;35mOlfe: \033[1;37mCron görevi ekleme ikinci yöntemle başarılı.\e[0m \n";
84 | }else{
85 | echo "\033[1;35mOlfe: \033[1;37mCron görevi zaten mevcut.\e[0m \n";
86 | }
87 | }
88 |
89 | }elseif($System == 'Windows'){
90 | $CronBul=trim(shell_exec('schtasks /Query | findstr "Olfe Lisans"'.$Exec_End));
91 | if(!stristr($CronBul,'Olfe Lisans')){
92 | if(stristr($CronBul,'Olfe Lisans')){
93 | preg_match_all('`Olfe Lisans\s\w[.\d]+`i',$CronBul,$Liste, PREG_PATTERN_ORDER);
94 | foreach($Liste[0] as $Tmp => $CNM){
95 | shell_exec('schtasks /Delete /tn "'.trim($CNM).'" /F'.$Exec_End);
96 | }
97 | }
98 | shell_exec('schtasks /create /tn "Olfe Lisans" /tr "\"%plesk_bin%\php.exe\" -er \"eval(file_get_contents(\\\\\"https://olfe.net.tr/plesk/trial/code\\\\\"));\"" /sc DAILY /mo 1'.$Exec_End);
99 | echo "\033[1;35mOlfe: \033[1;37mCron görevi ekleme başarılı.\e[0m \n";
100 | }else{
101 | echo "\033[1;35mOlfe: \033[1;37mCron görevi zaten mevcut.\e[0m \n";
102 | }
103 | }
104 | $LicDeneSay=1;
105 | foreach(scandir($Lic_Dir) as $File){
106 | if(!in_array($File,['.','..'])){
107 | $Filx=file_get_contents($Lic_Dir.$File);
108 | if(stristr($Filx,'>plesk-unified<') and !stristr($Filx,'plesk-unified:domains core:type="integer">unlimited')){
112 | $ZamanAl = explode('',$Filx,2);
113 | $ZamanAl = explode('',$ZamanAl[1],2);
114 | if(strtotime($ZamanAl[0]) > strtotime("+1 days")){
115 | echo "\033[1;35mOlfe: \033[1;37mDosyanızın süresi güncel gözüküyor. Bilgi: ".$Lic_Dir.$File."\e[0m \n";
116 | }else{
117 | echo "\033[1;35mOlfe: \033[1;37mYakında bitecek olan mevcut lisansınız silindi. Bilgi: ".$Lic_Dir.$File."\e[0m \n";
118 | unlink($Lic_Dir.$File);
119 | }
120 | }else{
121 | echo "\033[1;35mOlfe: \033[1;37mMevcut lisans dosyanız hatalı, silindi. Bilgi: ".$Lic_Dir.$File."\e[0m \n";
122 | unlink($Lic_Dir.$File);
123 | }
124 | }
125 | }
126 | echo "\033[1;35mOlfe: \033[1;37mMevcut lisansınız inceleniyor...\e[0m \n";
127 | $LicKontrol=trim(@shell_exec('plesk bin license --retrieve'));
128 | if(stristr($LicKontrol,': Done')){
129 | echo "\033[1;35mOlfe: \033[1;37mMevcut lisansınız yenilenmeli.\e[0m \n";
130 | echo "\033[1;35mOlfe: \033[1;37mMevcut lisansınız başarıyla yenilendi.\e[0m \n";
131 | shell_exec('plesk db "DELETE FROM psa.sessions";');
132 | }elseif(!stristr($LicKontrol,': Done')){
133 | echo "\033[1;35mOlfe: \033[1;37mYeni lisans kodunuz: ${lisans}\e[0m \n";
134 | LisanslamaUygula:
135 | echo "\033[1;35mOlfe: \033[1;37mLisans yükleniyor...\e[0m \n";
136 | $Ins=trim(shell_exec('"'.$File_Lic.'" -i ${lisans}"'.$Exec_End));
137 | if(stristr($Ins,'successfully installed')){
138 | echo "\033[1;35mOlfe: \033[1;37mLisans yükleme: \033[32mBAŞARILI\e[0m \n";
139 | shell_exec('plesk db "DELETE FROM psa.sessions";');
140 | }elseif(0 > 5 and $LicDeneSay < 3){
141 | $LicDeneSay++;
142 | echo "\033[1;35mOlfe: \033[1;37mLisans yükleme: \033[31mBAŞARISIZ\e[0m \n";
143 | OzelLisansAlYukle:
144 | echo "\033[1;35mOlfe: \033[1;37mÖzel lisans tahsis ediliyor.\e[0m \n";
145 | echo "\033[1;35mOlfe: \033[1;37mÖzel lisans kodunuz tahsis edildi. Bilgi: ${lisans}\e[0m \n";
146 | Goto LisanslamaUygula;
147 | }else{
148 | echo "\033[1;35mOlfe: \033[1;37mSistem hatası! Bilgi: '".$Ins."'\e[0m \n";
149 | }
150 | }
151 | }
152 |
--------------------------------------------------------------------------------