Guest User

Untitled

a guest
Sep 28th, 2020
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.67 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP7 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 4.1.0.1
  8. * @ Author : DeZender
  9. * @ Release on : 29.08.2020
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. class ns_filter
  15. {
  16. public function change($tag, $new, $action = '', $array = '')
  17. {
  18. if (!isset($this->{$tag})) {
  19. $this->{$tag} = '';
  20. }
  21.  
  22. if (empty($array)) {
  23. if (empty($action)) {
  24. $this->{$tag} = $new;
  25. }
  26. else {
  27. $this->{$tag} .= $new;
  28. }
  29. }
  30. else if ($array == 'row') {
  31. $this->{$tag} = $new;
  32. }
  33. else if (empty($action)) {
  34. $this->{$tag}[$array] = $new;
  35. }
  36. else {
  37. $this->{$tag}[$array] .= $new;
  38. }
  39.  
  40. return '';
  41. }
  42.  
  43. public function recaptcha($secret, $response)
  44. {
  45. $captcha = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret=' . $secret . '&response=' . $response);
  46. $result = json_decode($captcha);
  47. $this->result = $captcha;
  48. return $result->success;
  49. }
  50. }
  51.  
  52. class Nivu
  53. {
  54. private $con = 'https://nivusoft.com/';
  55.  
  56. public function settings($product, $primary)
  57. {
  58. if ($product == 'theme') {
  59. return 'themes/' . $primary . '/function.php';
  60. }
  61. else if ($product == 'plugin') {
  62. return 'plugins/' . $primary . '/index.php';
  63. }
  64. }
  65.  
  66. public function detail($product, $pri)
  67. {
  68. global $ns_filter;
  69.  
  70. if ($product == 'theme') {
  71. $this->path = 'themes/' . $pri . '/';
  72. $this->url = ns_filter('siteurl') . 'themes/' . $pri . '/';
  73. }
  74. else if ($product == 'plugin') {
  75. $this->path = 'plugins/' . $pri . '/';
  76. }
  77.  
  78. return true;
  79. }
  80.  
  81. public function MAKontrol($lisans, $product = 'software', $product_id = '1')
  82. {
  83. global $ayar;
  84.  
  85. if (strstr($ayar->siteurl, $this->servername())) {
  86. if (strstr($lisans, $this->createSecurity($product, $product_id))) {
  87. return true;
  88. }
  89. }
  90.  
  91. global $user;
  92. $post = ['product' => $product, 'product_id' => $product_id, 'domain' => $this->servername(), 'module' => 'control', 'action' => 'token', 'version' => ns_filter('software_nivusosyal')];
  93. $result = json_decode($this->connect($post), true);
  94. if (empty($result['error']) && isset($result['token'])) {
  95. if ($product == 'software') {
  96. $ayar->select('scriptlisans');
  97. $ayar->item2 = $result['token'];
  98. $ayar->update();
  99. }
  100. else {
  101. if ($product == 'modul') {
  102. global $modulpath;
  103. ($filicense = fopen($modulpath . '/lisans.php', 'w')) || exit('Unable to open file!');
  104. }
  105. else {
  106. global $primary;
  107. ($filicense = fopen($product . 's/' . ns_filter('primary-' . $product . '-' . $product_id) . '/lisans.php', 'w')) || exit('Unable to open file!');
  108. }
  109.  
  110. $filicenses = '<?php $license = "' . $result['token'] . '";';
  111. fwrite($filicense, $filicenses);
  112. fclose($filicense);
  113. }
  114.  
  115. header('Refresh:2');
  116. $this->error = 'lisans güncelleniyor...';
  117. }
  118. else {
  119. $this->error = $result['error'];
  120. }
  121.  
  122. return false;
  123. }
  124.  
  125. private function createSecurity($product, $product_id)
  126. {
  127. $create = sha1(md5($product . $this->domain . $product_id . $product) . 'NIVU-NIVU');
  128. $create = substr($create, 13, 4) . '-' . substr($create, 1, 4) . '-' . substr($create, 5, 4) . '-' . substr($create, 11, 4) . '-' . substr($create, 9, 4);
  129. $create = md5(sha1('NIVU-NIVU' . md5($product . $this->domain . $product_id)));
  130. $create = substr($create, 28, 4) . '-' . substr($create, 1, 4) . '-' . substr($create, 5, 4) . '-' . substr($create, 11, 4) . '-' . substr($create, 9, 4);
  131. return strtoupper($create);
  132. }
  133.  
  134. public function update($product = 'software', $primary = 'nivusosyal', $product_id = 1)
  135. {
  136. global $ayar;
  137. global $user;
  138. $post = ['product' => $product, 'product_id' => $product_id, 'domain' => $this->servername(), 'module' => 'control', 'action' => 'token', 'version' => ns_filter('software_nivusosyal')];
  139. $result = json_decode($this->connect($post), true);
  140. if (isset($this->data) && isset($this->data['file'])) {
  141. $this->data['url'] = $this->con . 'path/' . $this->data['file'] . '/';
  142. $this->get_file();
  143. if (file_exists($this->data['realpath']) && $this->extract()) {
  144. return true;
  145. }
  146.  
  147. return false;
  148. }
  149. else {
  150. if (empty($result['error']) && isset($result['version'])) {
  151. $ayar->item2 = 3.0;
  152. $this->update = $result[__FUNCTION__];
  153. $ayar->select($product . '_' . $primary, 'create');
  154.  
  155. if (empty($ayar->item2)) {
  156. $ayar->item2 = 3.0;
  157. $ayar->update();
  158. }
  159.  
  160. $this->version = $ayar->select($product . '_' . $primary);
  161.  
  162. if ($this->version < $result['version']) {
  163. $this->statu = 0;
  164. $ayar->statu = 0;
  165. $ayar->update();
  166. }
  167. else {
  168. $this->statu = 1;
  169. }
  170.  
  171. return true;
  172. }
  173.  
  174. $this->error = (!empty($result['error']) ? $result['error'] : 'Güncelleme kontrolü başarısız oldu. Lütfen daha sonra tekrar deneyin');
  175. return false;
  176. }
  177. }
  178.  
  179. public function noti($lastid)
  180. {
  181. if (!isset($_SESSION['notis'])) {
  182. $post = ['product' => 'software', 'product_id' => 1, 'domain' => $this->servername(), 'module' => 'alert', 'action' => $lastid, 'version' => ns_filter('software_nivusosyal')];
  183. $result = json_decode($this->connect($post), true);
  184. if (empty($result['error']) && isset($result['data'])) {
  185. $_SESSION['notis']['list'] = $result['data'];
  186. $_SESSION['notis']['count'] = $result['count'];
  187. }
  188. else {
  189. return [];
  190. }
  191. }
  192.  
  193. return $_SESSION['notis'];
  194. }
  195.  
  196. public function active($product, $pri)
  197. {
  198. global $ayar;
  199. if (($product == 'themes') && ($ayar->select('themes') == $pri)) {
  200. ..........................................................................................
  201. ..............................................
  202. ...................
Add Comment
Please, Sign In to add comment