Migrate Guru: Migrate & Clone WordPress Free - Version 1.88

Version Description

  • Callback improvements
Download this release

Release Info

Developer ritesh.soni36
Plugin Icon 128x128 Migrate Guru: Migrate & Clone WordPress Free
Version 1.88
Comparing to
See all releases

Version 1.88

admin.php ADDED
@@ -0,0 +1,182 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if (!defined('ABSPATH')) exit;
4
+ if (!class_exists('MGAdmin')) :
5
+ class MGAdmin {
6
+ public $bvmain;
7
+ function __construct($bvmain) {
8
+ $this->bvmain = $bvmain;
9
+ }
10
+
11
+ public function mainUrl($_params = '') {
12
+ if (function_exists('network_admin_url')) {
13
+ return network_admin_url('admin.php?page='.$this->bvmain->plugname.$_params);
14
+ } else {
15
+ return admin_url('admin.php?page='.$this->bvmain->plugname.$_params);
16
+ }
17
+ }
18
+
19
+ public function initHandler() {
20
+ if (!current_user_can('activate_plugins'))
21
+ return;
22
+
23
+ if (array_key_exists('bvnonce', $_REQUEST) &&
24
+ wp_verify_nonce($_REQUEST['bvnonce'], "bvnonce") &&
25
+ array_key_exists('blogvaultkey', $_REQUEST) &&
26
+ (strlen($_REQUEST['blogvaultkey']) == 64) &&
27
+ (array_key_exists('page', $_REQUEST) &&
28
+ $_REQUEST['page'] == $this->bvmain->plugname)) {
29
+ $keys = str_split($_REQUEST['blogvaultkey'], 32);
30
+ $this->bvmain->auth->updateKeys($keys[0], $keys[1]);
31
+ if (array_key_exists('redirect', $_REQUEST)) {
32
+ $location = $_REQUEST['redirect'];
33
+ wp_redirect($this->bvmain->appUrl().'/migration/'.$location);
34
+ exit();
35
+ }
36
+ }
37
+ if ($this->bvmain->isActivateRedirectSet()) {
38
+ wp_redirect($this->mainUrl());
39
+ }
40
+ }
41
+
42
+ public function menu() {
43
+ $brand = $this->bvmain->getBrandInfo();
44
+ if (!$brand || (!array_key_exists('hide', $brand) && !array_key_exists('hide_from_menu', $brand))) {
45
+ $bname = $this->bvmain->getBrandName();
46
+ add_menu_page($bname, $bname, 'manage_options', $this->bvmain->plugname,
47
+ array($this, 'adminPage'), plugins_url('img/icon.png', __FILE__ ));
48
+ }
49
+ }
50
+
51
+ public function hidePluginDetails($plugin_metas, $slug) {
52
+ $brand = $this->bvmain->getBrandInfo();
53
+ $bvslug = $this->bvmain->slug;
54
+
55
+ if ($slug === $bvslug && $brand && array_key_exists('hide_plugin_details', $brand)){
56
+ foreach ($plugin_metas as $pluginKey => $pluginValue) {
57
+ if (strpos($pluginValue, sprintf('>%s<', translate('View details')))) {
58
+ unset($plugin_metas[$pluginKey]);
59
+ break;
60
+ }
61
+ }
62
+ }
63
+ return $plugin_metas;
64
+ }
65
+
66
+ public function settingsLink($links, $file) {
67
+ if ( $file == plugin_basename( dirname(__FILE__).'/migrateguru.php' ) ) {
68
+ $FAQ = '<a href="https://migrateguru.freshdesk.com/support/solutions/33000046011" target="_blank">'.__( 'FAQs' ).'</a>';
69
+ array_unshift( $links, $FAQ );
70
+ $Support = '<a href="https://wordpress.org/support/plugin/migrate-guru" target="_blank">'.__( 'Support' ).'</a>';
71
+ array_unshift( $links, $Support );
72
+ $RateUs = '<a href="https://wordpress.org/support/plugin/migrate-guru/reviews/?filter=5#new-post" target="_blank">'.__( 'Rate Us' ).'</a>';
73
+ array_unshift( $links, $RateUs );
74
+ $MigrateLink = '<a href="'.$this->mainUrl().'">'.__( 'Migrate' ).'</a>';
75
+ array_unshift( $links, $MigrateLink );
76
+ }
77
+ return $links;
78
+ }
79
+
80
+ public function mgsecAdminMenu($hook) {
81
+ if ($hook === 'toplevel_page_migrateguru') {
82
+ wp_enqueue_style( 'mgsurface', plugins_url( 'css/style.css', __FILE__ ) );
83
+ wp_enqueue_style('mgsurface');
84
+ }
85
+ }
86
+
87
+ public function showErrors() {
88
+ $error = NULL;
89
+ if (array_key_exists('error', $_REQUEST)) {
90
+ $error = $_REQUEST['error'];
91
+ }
92
+ if ($error == "email") {
93
+ echo '<div style="padding-bottom:0.5px; color:red;"><p>Incorrect Email.</p></div>';
94
+ }
95
+ else if (($error == "custom") && isset($_REQUEST['bvnonce']) && wp_verify_nonce($_REQUEST['bvnonce'], "bvnonce")) {
96
+ echo '<div style="padding-bottom:0.5px;color: red;"><p>'.base64_decode($_REQUEST['message']).'</p></div>';
97
+ }
98
+ }
99
+
100
+ public function getPluginLogo() {
101
+ $brand = $this->bvmain->getBrandInfo();
102
+ if ($brand && array_key_exists('logo', $brand)) {
103
+ return $brand['logo'];
104
+ }
105
+ return $this->bvmain->logo;
106
+ }
107
+
108
+ public function getWebPage() {
109
+ $brand = $this->bvmain->getBrandInfo();
110
+ if ($brand && array_key_exists('webpage', $brand)) {
111
+ return $brand['webpage'];
112
+ }
113
+ return $this->bvmain->webpage;
114
+ }
115
+
116
+ public function siteInfoTags() {
117
+ $bvnonce = wp_create_nonce("bvnonce");
118
+ $secret = $this->bvmain->auth->defaultSecret();
119
+ $tags = "<input type='hidden' name='url' value='".$this->bvmain->info->wpurl()."'/>\n".
120
+ "<input type='hidden' name='homeurl' value='".$this->bvmain->info->homeurl()."'/>\n".
121
+ "<input type='hidden' name='siteurl' value='".$this->bvmain->info->siteurl()."'/>\n".
122
+ "<input type='hidden' name='dbsig' value='".$this->bvmain->lib->dbsig(false)."'/>\n".
123
+ "<input type='hidden' name='plug' value='".$this->bvmain->plugname."'/>\n".
124
+ "<input type='hidden' name='adminurl' value='".$this->mainUrl()."'/>\n".
125
+ "<input type='hidden' name='bvversion' value='".$this->bvmain->version."'/>\n".
126
+ "<input type='hidden' name='serverip' value='".$_SERVER["SERVER_ADDR"]."'/>\n".
127
+ "<input type='hidden' name='abspath' value='".ABSPATH."'/>\n".
128
+ "<input type='hidden' name='secret' value='".$secret."'/>\n".
129
+ "<input type='hidden' name='bvnonce' value='".$bvnonce."'/>\n";
130
+ return $tags;
131
+ }
132
+
133
+ public function activateWarning() {
134
+ global $hook_suffix;
135
+ if (!$this->bvmain->isConfigured() && $hook_suffix == 'index.php' ) {
136
+ ?>
137
+ <div id="message" class="updated" style="padding: 8px; font-size: 16px; background-color: #dff0d8">
138
+ <a class="button-primary" href="<?php echo $this->mainUrl(); ?>">Activate Migrate Guru</a>
139
+ &nbsp;&nbsp;&nbsp;<b>Almost Done:</b> Activate your Migrate Guru account to migrate your site.
140
+ </div>
141
+ <?php
142
+ }
143
+ }
144
+
145
+ public function adminPage() {
146
+ require_once dirname( __FILE__ ) . '/admin/main_page.php';
147
+ }
148
+
149
+ public function initBranding($plugins) {
150
+ $slug = $this->bvmain->slug;
151
+ $brand = $this->bvmain->getBrandInfo();
152
+ if ($brand) {
153
+ if (array_key_exists('hide', $brand)) {
154
+ unset($plugins[$slug]);
155
+ } else {
156
+ if (array_key_exists('name', $brand)) {
157
+ $plugins[$slug]['Name'] = $brand['name'];
158
+ }
159
+ if (array_key_exists('title', $brand)) {
160
+ $plugins[$slug]['Title'] = $brand['title'];
161
+ }
162
+ if (array_key_exists('description', $brand)) {
163
+ $plugins[$slug]['Description'] = $brand['description'];
164
+ }
165
+ if (array_key_exists('authoruri', $brand)) {
166
+ $plugins[$slug]['AuthorURI'] = $brand['authoruri'];
167
+ }
168
+ if (array_key_exists('author', $brand)) {
169
+ $plugins[$slug]['Author'] = $brand['author'];
170
+ }
171
+ if (array_key_exists('authorname', $brand)) {
172
+ $plugins[$slug]['AuthorName'] = $brand['authorname'];
173
+ }
174
+ if (array_key_exists('pluginuri', $brand)) {
175
+ $plugins[$slug]['PluginURI'] = $brand['pluginuri'];
176
+ }
177
+ }
178
+ }
179
+ return $plugins;
180
+ }
181
+ }
182
+ endif;
admin/main_page.php ADDED
@@ -0,0 +1,129 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="wrapper">
2
+ <div class="horizontal-header" style="background: #25bea0; width: 99%; padding: 0px;">
3
+ <div class="header-left">
4
+ <div class="mg-branding" style="width: 100%; justify-content: left;">
5
+ <img class="mg-logo" src="<?php echo plugins_url('./../img/migrateguru.png', __FILE__); ?>" style="width:91px"/>
6
+ <div class="mg-heading" style="color: #FFF; margin-top: 10px; margin-left: 10px;">
7
+ Migrate Guru
8
+ </div>
9
+ </div>
10
+ <div style="width: 400px; text-align: center; color: #FFF;">
11
+ Powered By <a href="https://blogvault.net/" style="color: #17252a;">BlogVault</a>
12
+ </div>
13
+ </div>
14
+ <div class="header-right">
15
+ <div class="bv-branding">
16
+ <a class="bv-button" target="_blank" rel="noopener noreferrer" href="https://migrateguru.freshdesk.com/support/home">
17
+ FAQs
18
+ </a>
19
+ <a class="bv-button" target="_blank" rel="noopener noreferrer" href="https://migrateguru.freshdesk.com/support/home">
20
+ Help Docs
21
+ </a>
22
+ <a class="bv-button" target="_blank" rel="noopener noreferrer" href="https://www.migrateguru.com/contact-us/">
23
+ Support
24
+ </a>
25
+ <a class="bv-button" target="_blank" rel="noopener noreferrer" href="https://wordpress.org/support/plugin/migrate-guru/reviews">
26
+ Rate us 5 stars
27
+ </a>
28
+ </div>
29
+ </div>
30
+ </div>
31
+ <div class="main-content" style="padding-right: 0px; padding-top: 0px;">
32
+ <div class="migrations" style="align-items: end;">
33
+ <div class="mig-left">
34
+ <div class="reg-form">
35
+ <div class="form-heading">
36
+ Easy WordPress Migrations
37
+ </div>
38
+ <a href="https://www.youtube.com/watch?v=HBGcUdOhMcI&t=15s" target="blank" class="video-link horizontal video-first">
39
+ <img class="video-icon" src="<?php echo plugins_url('./../img/play-video.svg', __FILE__); ?>">
40
+ <div class="video-text normal-text link">
41
+ Watch our platform in action
42
+ </div>
43
+ </a>
44
+ <div class="form-fields">
45
+ <form id="mgform" dummy=">" action="<?php echo $this->bvmain->appUrl(); ?>/migration/migrate" onsubmit="document.getElementById('migratesubmit').disabled = true;" method="post" name="signup">
46
+ <?php $this->showErrors(); ?>
47
+ <input type="text" id="email" name="email" placeholder="Enter your email here" style="float:left;">
48
+ <input type="submit" name="submit" disabled id='migratesubmit' value="Migrate Site" class="primary-button" style="padding-left:24px"/>
49
+ <div class="tnc-check">
50
+ <label class="normal-text horizontal">
51
+ <input type="checkbox" name="consent" onchange="document.getElementById('migratesubmit').disabled = !this.checked;" value="1"/>
52
+ <span class="checkmark"></span>&nbsp;
53
+ I agree to Blogvault &nbsp;
54
+ <a href="https://blogvault.net/tos/" class="link">
55
+ Terms & Conditions &nbsp;
56
+ </a> and &nbsp;
57
+ <a href="https://blogvault.net/privacy/" class="link">
58
+ Privacy Policy
59
+ </a>
60
+ </label>
61
+ <input type="hidden" name="bvsrc" value="wpplugin" />
62
+ <input type="hidden" name="origin" value="migrateguru" />
63
+ </div>
64
+ <?php echo $this->siteInfoTags(); ?>
65
+ </form>
66
+ </div>
67
+ </div>
68
+ <a href="https://www.youtube.com/watch?v=HBGcUdOhMcI&t=15s" target="blank" class="video-link horizontal video-second">
69
+ <img class="video-icon" src="<?php echo plugins_url('./../img/play-video.svg', __FILE__); ?>">
70
+ <div href="https://www.youtube.com/watch?v=HBGcUdOhMcI&t=15s" target="blank" class="video-text normal-text link">
71
+ Watch our platform in action
72
+ </div>
73
+ </a>
74
+ <div class="supp-hosts" style="margin-top:15%">
75
+ <div class="supp-heading normal-text">
76
+ Supported Hosts:
77
+ </div>
78
+ <div class="logos">
79
+ <img class="ind-logo" src="<?php echo plugins_url('./../img/GoDaddy.png', __FILE__); ?>" />
80
+ <img class="ind-logo" src="<?php echo plugins_url('./../img/bluehost-logo.png', __FILE__); ?>" />
81
+ <img class="ind-logo" src="<?php echo plugins_url('./../img/siteground-logo.png', __FILE__); ?>" />
82
+ <img class="ind-logo" src="<?php echo plugins_url('./../img/HostGator-logo.png', __FILE__); ?>" />
83
+ <img class="ind-logo" src="<?php echo plugins_url('./../img/flywheeltransparent@2x-e1475766955840-825x392.png', __FILE__); ?>" />
84
+ <img class="ind-logo" src="<?php echo plugins_url('./../img/CPanel_logo.svg.png', __FILE__); ?>" />
85
+ <img class="ind-logo" src="<?php echo plugins_url('./../img/DreamHost_transparent-624x172.png', __FILE__); ?>" />
86
+ <img class="ind-logo" src="<?php echo plugins_url('./../img/logo (5).png', __FILE__); ?>" />
87
+ <img class="ind-logo" src="<?php echo plugins_url('./../img/inMotion_Logo.png', __FILE__); ?>" />
88
+ <img class="ind-logo" src="<?php echo plugins_url('./../img/wp_engine_logo_bb.png', __FILE__); ?>" />
89
+ <img class="ind-logo" src="<?php echo plugins_url('./../img/logo (6).png', __FILE__); ?>" />
90
+ </div>
91
+ </div>
92
+ <div class="info-row-second">
93
+ <a class="link info" href="#">FAQs </a>
94
+ <a class="link info" href="#">Help Docs </a>
95
+ <a class="link info" href="#">Support </a>
96
+ <a class="link info no-border" href="#">Rate us 5 stars </a>
97
+ </div>
98
+ </div>
99
+ <div class="mig-right" style="overflow: hidden;">
100
+ <div style="width:280px; float: right;">
101
+ <div class="side-box" >
102
+ <div class="side-header">Why MigrateGuru ?</div>
103
+ <ul style="font-size: 15px; font-weight: bold;">
104
+ <li><span class="bv-tick">&#x2713;</span> FREE Lifetime Migrations</li>
105
+ <li><span class="bv-tick">&#x2713;</span> 1-Click Easy Migrations</li>
106
+ <li><span class="bv-tick">&#x2713;</span> No Technical Knowledge Needed</li>
107
+ <li><span class="bv-tick">&#x2713;</span> Works with 10,000+ webhosts</li>
108
+ <li><span class="bv-tick">&#x2713;</span> No Site Size Limit</li>
109
+ </ul>
110
+ </div>
111
+ <div class="side-box">
112
+ <div class="side-header">Our other Popular Plugins</div>
113
+ <div style="padding: 8px; overflow: hidden; background: #e6e3e3; margin: 10px; border-radius: 10px;">
114
+ <div class="brand-name"><img class="mg-logo" src="<?php echo plugins_url('./../img/bv-logo.png', __FILE__); ?>" style="width:200px;"/></div>
115
+ <div class="bv-quote">Did you get insurance for your Website? Backup your website now. Try for Free.</div>
116
+ <a href='https://blogvault.net/?utm_source=mg_plugin_checkout&utm_medium=checkout_button_link&utm_campaign=mg_plugin_checkout&utm_term=checkout_button&utm_content=button' class="bv-button checkout-button" target="_blank" rel="noopener noreferrer">Checkout BlogVault Now</a>
117
+ </div>
118
+ <div style="padding: 8px; overflow: hidden; background: #e6e3e3; margin: 10px; border-radius: 10px;">
119
+ <div class="brand-name"><img class="mg-logo" src="<?php echo plugins_url('./../img/mc-logo.png', __FILE__); ?>" style="width:200px"/></div>
120
+ <div class="bv-quote">Is your website hacked? Don't leave it on chance.</div>
121
+ <div class="bv-quote">Scan your website For Free Now.</div>
122
+ <a href='https://www.malcare.com/?utm_source=mg_plugin_checkout&utm_medium=checkout_button_link&utm_campaign=mg_plugin_checkout&utm_term=checkout_button&utm_content=button' class="bv-button checkout-button" target="_blank" rel="noopener noreferrer">Checkout MalCare Now</a>
123
+ </div>
124
+ </div>
125
+ </div>
126
+ </div>
127
+ </div>
128
+ </div>
129
+ </div>
callback.php ADDED
@@ -0,0 +1,251 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if (!defined('ABSPATH')) exit;
4
+ if (!class_exists('BVCallback')) :
5
+
6
+ require_once dirname( __FILE__ ) . '/callback/response.php';
7
+
8
+ class BVCallback {
9
+ public $bvmain;
10
+ function __construct($bvmain) {
11
+ $this->bvmain = $bvmain;
12
+ }
13
+
14
+ public function serversig($full = false) {
15
+ $sig = sha1($_SERVER['SERVER_ADDR'].ABSPATH);
16
+ if ($full)
17
+ return $sig;
18
+ else
19
+ return substr($sig, 0, 6);
20
+ }
21
+
22
+ public function terminate($with_basic, $bvdebug = false) {
23
+ global $bvresp;
24
+ $public = $this->bvmain->auth->defaultPublic();
25
+ $bvresp->addStatus("signature", "Blogvault API");
26
+ $bvresp->addStatus("asymauth", "true");
27
+ $bvresp->addStatus("sha1", "true");
28
+ $bvresp->addStatus("dbsig", $this->bvmain->lib->dbsig(false));
29
+ $bvresp->addStatus("serversig", $this->serversig(false));
30
+ $bvresp->addStatus("public", substr($public, 0, 6));
31
+ if (array_key_exists('adajx', $_REQUEST)) {
32
+ $bvresp->addStatus("adajx", true);
33
+ }
34
+ if ($with_basic) {
35
+ $binfo = array();
36
+ $this->bvmain->info->basic($binfo);
37
+ $bvresp->addStatus("basic", $binfo);
38
+ $bvresp->addStatus("bvversion", $this->bvmain->version);
39
+ }
40
+
41
+ if ($bvdebug) {
42
+ $bvresp->addStatus("inreq", $_REQUEST);
43
+ }
44
+
45
+ $bvresp->finish();
46
+ exit;
47
+ }
48
+
49
+ public function processParams() {
50
+ if (array_key_exists('concat', $_REQUEST)) {
51
+ foreach ($_REQUEST['concat'] as $key) {
52
+ $concated = '';
53
+ $count = intval($_REQUEST[$key]);
54
+ for ($i = 1; $i <= $count; $i++) {
55
+ $concated .= $_REQUEST[$key."_bv_".$i];
56
+ }
57
+ $_REQUEST[$key] = $concated;
58
+ }
59
+ }
60
+ if (array_key_exists('b64', $_REQUEST)) {
61
+ foreach ($_REQUEST['b64'] as $key) {
62
+ if (is_array($_REQUEST[$key])) {
63
+ $_REQUEST[$key] = array_map('base64_decode', $_REQUEST[$key]);
64
+ } else {
65
+ $_REQUEST[$key] = base64_decode($_REQUEST[$key]);
66
+ }
67
+ }
68
+ }
69
+ if (array_key_exists('unser', $_REQUEST)) {
70
+ foreach ($_REQUEST['unser'] as $key) {
71
+ $_REQUEST[$key] = json_decode($_REQUEST[$key], TRUE);
72
+ }
73
+ }
74
+ if (array_key_exists('b642', $_REQUEST)) {
75
+ foreach ($_REQUEST['b642'] as $key) {
76
+ if (is_array($_REQUEST[$key])) {
77
+ $_REQUEST[$key] = array_map('base64_decode', $_REQUEST[$key]);
78
+ } else {
79
+ $_REQUEST[$key] = base64_decode($_REQUEST[$key]);
80
+ }
81
+ }
82
+ }
83
+ if (array_key_exists('dic', $_REQUEST)) {
84
+ foreach ($_REQUEST['dic'] as $key => $mkey) {
85
+ $_REQUEST[$mkey] = $_REQUEST[$key];
86
+ unset($_REQUEST[$key]);
87
+ }
88
+ }
89
+ if (array_key_exists('clacts', $_REQUEST)) {
90
+ foreach ($_REQUEST['clacts'] as $action) {
91
+ remove_all_actions($action);
92
+ }
93
+ }
94
+ if (array_key_exists('clallacts', $_REQUEST)) {
95
+ global $wp_filter;
96
+ foreach ( $wp_filter as $filter => $val ){
97
+ remove_all_actions($filter);
98
+ }
99
+ }
100
+ if (array_key_exists('memset', $_REQUEST)) {
101
+ $val = intval(urldecode($_REQUEST['memset']));
102
+ @ini_set('memory_limit', $val.'M');
103
+ }
104
+ }
105
+
106
+ public function recover() {
107
+ $recover = new BVRecover(base64_decode($_REQUEST['sig']), $_REQUEST['orig'],
108
+ $_REQUEST['keyname'], $_REQUEST["keysize"]);
109
+ if ($recover->validate() && ($recover->process() === 1)) {
110
+ $recover->processKeyExchange();
111
+ return 1;
112
+ }
113
+ return false;
114
+ }
115
+
116
+ public function preauth() {
117
+ global $bvresp;
118
+ if (array_key_exists('obend', $_REQUEST) && function_exists('ob_end_clean'))
119
+ @ob_end_clean();
120
+ if (array_key_exists('op_reset', $_REQUEST) && function_exists('output_reset_rewrite_vars'))
121
+ @output_reset_rewrite_vars();
122
+ if (array_key_exists('binhead', $_REQUEST)) {
123
+ header("Content-type: application/binary");
124
+ header('Content-Transfer-Encoding: binary');
125
+ }
126
+ if (array_key_exists('bvrcvr', $_REQUEST)) {
127
+ require_once dirname( __FILE__ ) . '/callback/recover.php';
128
+ if ($this->recover() !== 1) {
129
+ $bvresp->addStatus("statusmsg", 'failed authentication');
130
+ }
131
+ $this->terminate(false, array_key_exists('bvdbg', $_REQUEST));
132
+ return false;
133
+ }
134
+ return 1;
135
+ }
136
+
137
+ public function authenticate() {
138
+ global $bvresp;
139
+ $auth = $this->bvmain->auth;
140
+ $method = $_REQUEST['bvMethod'];
141
+ $time = intval($_REQUEST['bvTime']);
142
+ $version = $_REQUEST['bvVersion'];
143
+ $sig = $_REQUEST['sig'];
144
+ $public = $auth->publicParam();
145
+
146
+ $bvresp->addStatus("requestedsig", $sig);
147
+ $bvresp->addStatus("requestedtime", $time);
148
+ $bvresp->addStatus("requestedversion", $version);
149
+
150
+ $sig_match = $auth->validate($public, $method, $time, $version, $sig);
151
+ if ($sig_match === 1) {
152
+ return 1;
153
+ } else {
154
+ $bvresp->addStatus("sigmatch", substr($sig_match, 0, 6));
155
+ $bvresp->addStatus("statusmsg", 'failed authentication');
156
+ return false;
157
+ }
158
+ }
159
+
160
+ public function route($wing, $method) {
161
+ global $bvresp;
162
+ $bvresp->addStatus("callback", $method);
163
+ switch ($wing) {
164
+ case 'manage':
165
+ require_once dirname( __FILE__ ) . '/callback/wings/manage.php';
166
+ $module = new BVManageCallback();
167
+ break;
168
+ case 'fs':
169
+ require_once dirname( __FILE__ ) . '/callback/wings/fs.php';
170
+ $module = new BVFSCallback();
171
+ break;
172
+ case 'db':
173
+ require_once dirname( __FILE__ ) . '/callback/wings/db.php';
174
+ $module = new BVDBCallback();
175
+ break;
176
+ case 'info':
177
+ require_once dirname( __FILE__ ) . '/callback/wings/info.php';
178
+ $module = new BVInfoCallback();
179
+ break;
180
+ case 'dynsync':
181
+ require_once dirname( __FILE__ ) . '/callback/wings/dynsync.php';
182
+ $module = new BVDynSyncCallback();
183
+ break;
184
+ case 'ipstr':
185
+ require_once dirname( __FILE__ ) . '/callback/wings/ipstore.php';
186
+ $module = new BVIPStoreCallback();
187
+ break;
188
+ case 'auth':
189
+ require_once dirname( __FILE__ ) . '/callback/wings/auth.php';
190
+ $module = new BVAuthCallback();
191
+ break;
192
+ case 'fw':
193
+ require_once dirname( __FILE__ ) . '/callback/wings/fw.php';
194
+ $module = new BVFirewallCallback();
195
+ break;
196
+ case 'lp':
197
+ require_once dirname( __FILE__ ) . '/callback/wings/lp.php';
198
+ $module = new BVLoginProtectCallback();
199
+ break;
200
+ case 'monit':
201
+ require_once dirname( __FILE__ ) . '/callback/wings/monit.php';
202
+ $module = new BVMonitCallback();
203
+ break;
204
+ case 'brand':
205
+ require_once dirname( __FILE__ ) . '/callback/wings/brand.php';
206
+ $module = new BVBrandCallback();
207
+ break;
208
+ case 'pt':
209
+ require_once dirname( __FILE__ ) . '/callback/wings/protect.php';
210
+ $module = new BVProtectCallback();
211
+ break;
212
+ case 'act':
213
+ require_once dirname( __FILE__ ) . '/callback/wings/account.php';
214
+ $module = new BVAccountCallback();
215
+ break;
216
+ default:
217
+ require_once dirname( __FILE__ ) . '/callback/wings/misc.php';
218
+ $module = new BVMiscCallback();
219
+ break;
220
+ }
221
+ $rval = $module->process($method);
222
+ if ($rval === false) {
223
+ $bvresp->addStatus("statusmsg", "Bad Command");
224
+ $bvresp->addStatus("status", false);
225
+ }
226
+ return 1;
227
+ }
228
+
229
+ public function bvAdmExecuteWithoutUser() {
230
+ global $bvresp;
231
+ $bvresp->addStatus("bvadmwithoutuser", true);
232
+ $this->execute();
233
+ }
234
+
235
+ public function bvAdmExecuteWithUser() {
236
+ global $bvresp;
237
+ $bvresp->addStatus("bvadmwithuser", true);
238
+ $this->execute();
239
+ }
240
+
241
+ public function execute() {
242
+ global $bvresp;
243
+ $this->processParams();
244
+ if ($bvresp->startStream()) {
245
+ $this->route($_REQUEST['wing'], $_REQUEST['bvMethod']);
246
+ $bvresp->endStream();
247
+ }
248
+ $this->terminate(true, array_key_exists('bvdbg', $_REQUEST));
249
+ }
250
+ }
251
+ endif;
callback/response.php ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if (!defined('ABSPATH')) exit;
4
+ if (!class_exists('BVResponse')) :
5
+
6
+ require_once dirname( __FILE__ ) . '/streams.php';
7
+
8
+ class BVResponse {
9
+ public $status;
10
+ public $stream;
11
+
12
+ function __construct() {
13
+ $this->status = array("blogvault" => "response");
14
+ }
15
+
16
+ public function addStatus($key, $value) {
17
+ $this->status[$key] = $value;
18
+ }
19
+
20
+ public function addArrayToStatus($key, $value) {
21
+ if (!isset($this->status[$key])) {
22
+ $this->status[$key] = array();
23
+ }
24
+ $this->status[$key][] = $value;
25
+ }
26
+
27
+ public function base64Encode($data, $chunk_size) {
28
+ if ($chunk_size) {
29
+ $out = "";
30
+ $len = strlen($data);
31
+ for ($i = 0; $i < $len; $i += $chunk_size) {
32
+ $out .= base64_encode(substr($data, $i, $chunk_size));
33
+ }
34
+ } else {
35
+ $out = base64_encode($data);
36
+ }
37
+ return $out;
38
+ }
39
+
40
+ public function finish() {
41
+ $response = "bvbvbvbvbv".serialize($this->status)."bvbvbvbvbv";
42
+ if (array_key_exists('bvb64resp', $_REQUEST)) {
43
+ $chunk_size = array_key_exists('bvb64cksize', $_REQUEST) ? intval($_REQUEST['bvb64cksize']) : false;
44
+ $response = "bvb64bvb64".$this->base64Encode($response, $chunk_size)."bvb64bvb64";
45
+ }
46
+ die($response);
47
+ }
48
+
49
+ public function writeStream($_string) {
50
+ if (strlen($_string) > 0) {
51
+ $chunk = "";
52
+ if (isset($_REQUEST['bvb64stream'])) {
53
+ $chunk_size = array_key_exists('bvb64cksize', $_REQUEST) ? intval($_REQUEST['bvb64cksize']) : false;
54
+ $_string = $this->base64Encode($_string, $chunk_size);
55
+ $chunk .= "BVB64" . ":";
56
+ }
57
+ $chunk .= (strlen($_string) . ":" . $_string);
58
+ if (isset($_REQUEST['checksum'])) {
59
+ if ($_REQUEST['checksum'] == 'crc32') {
60
+ $chunk = "CRC32" . ":" . crc32($_string) . ":" . $chunk;
61
+ } else if ($_REQUEST['checksum'] == 'md5') {
62
+ $chunk = "MD5" . ":" . md5($_string) . ":" . $chunk;
63
+ }
64
+ }
65
+ $this->stream->writeChunk($chunk);
66
+ }
67
+ }
68
+
69
+ public function startStream() {
70
+ global $bvcb;
71
+ $this->stream = new BVRespStream();
72
+ if (array_key_exists('apicall',$_REQUEST)) {
73
+ $this->stream = new BVHttpStream($_REQUEST['apihost'], intval($_REQUEST['apiport']), array_key_exists('apissl', $_REQUEST));
74
+ if (!$this->stream->connect()) {
75
+ $this->addStatus("httperror", "Cannot Open Connection to Host");
76
+ $this->addStatus("streamerrno", $this->stream->errno);
77
+ $this->addStatus("streamerrstr", $this->stream->errstr);
78
+ return false;
79
+ }
80
+ if (array_key_exists('acbmthd', $_REQUEST)) {
81
+ $url = $bvcb->bvmain->authenticatedUrl('/bvapi/'.$_REQUEST['acbmthd'], $_REQUEST['bvapicheck'], false);
82
+ if (array_key_exists('acbqry', $_REQUEST)) {
83
+ $url .= "&".$_REQUEST['acbqry'];
84
+ }
85
+ $this->stream->multipartChunkedPost($url);
86
+ } else {
87
+ $this->addStatus("httperror", "ApiCall method not present");
88
+ return false;
89
+ }
90
+ }
91
+ return true;
92
+ }
93
+
94
+ public function endStream() {
95
+ $this->stream->endStream();
96
+ if (array_key_exists('apicall', $_REQUEST)) {
97
+ $resp = $this->stream->getResponse();
98
+ if (array_key_exists('httperror', $resp)) {
99
+ $this->addStatus("httperror", $resp['httperror']);
100
+ } else {
101
+ $this->addStatus("respstatus", $resp['status']);
102
+ $this->addStatus("respstatus_string", $resp['status_string']);
103
+ }
104
+ }
105
+ }
106
+ }
107
+ endif;
callback/streams.php ADDED
@@ -0,0 +1,166 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if (!defined('ABSPATH')) exit;
4
+ if (!class_exists('BVRespStream')) :
5
+
6
+ class BVRespStream {
7
+ public function writeChunk($_string) {
8
+ echo "ckckckckck".$_string."ckckckckck";
9
+ }
10
+
11
+ public function endStream() {
12
+ echo "rerererere";
13
+ }
14
+ }
15
+
16
+ class BVHttpStream {
17
+ var $user_agent = 'BVHttpStream';
18
+ var $host;
19
+ var $port;
20
+ var $timeout = 20;
21
+ var $conn;
22
+ var $errno;
23
+ var $errstr;
24
+ var $boundary;
25
+ var $apissl;
26
+
27
+ /**
28
+ * PHP5 constructor.
29
+ */
30
+ function __construct($_host, $_port, $_apissl) {
31
+ $this->host = $_host;
32
+ $this->port = $_port;
33
+ $this->apissl = $_apissl;
34
+ }
35
+
36
+ public function connect() {
37
+ if ($this->apissl && function_exists('stream_socket_client')) {
38
+ $this->conn = stream_socket_client("ssl://".$this->host.":".$this->port, $errno, $errstr, $this->timeout);
39
+ } else {
40
+ $this->conn = @fsockopen($this->host, $this->port, $errno, $errstr, $this->timeout);
41
+ }
42
+ if (!$this->conn) {
43
+ $this->errno = $errno;
44
+ $this->errstr = $errstr;
45
+ return false;
46
+ }
47
+ socket_set_timeout($this->conn, $this->timeout);
48
+ return true;
49
+ }
50
+
51
+ public function write($data) {
52
+ fwrite($this->conn, $data);
53
+ }
54
+
55
+ public function sendChunk($data) {
56
+ $this->write(sprintf("%x\r\n", strlen($data)));
57
+ $this->write($data);
58
+ $this->write("\r\n");
59
+ }
60
+
61
+ public function sendRequest($method, $url, $headers = array(), $body = null) {
62
+ $def_hdrs = array("Connection" => "keep-alive",
63
+ "Host" => $this->host);
64
+ $headers = array_merge($def_hdrs, $headers);
65
+ $request = strtoupper($method)." ".$url." HTTP/1.1\r\n";
66
+ if (null != $body) {
67
+ $headers["Content-length"] = strlen($body);
68
+ }
69
+ foreach($headers as $key=>$val) {
70
+ $request .= $key.":".$val."\r\n";
71
+ }
72
+ $request .= "\r\n";
73
+ if (null != $body) {
74
+ $request .= $body;
75
+ }
76
+ $this->write($request);
77
+ return $request;
78
+ }
79
+
80
+ public function post($url, $headers = array(), $body = "") {
81
+ if(is_array($body)) {
82
+ $b = "";
83
+ foreach($body as $key=>$val) {
84
+ $b .= $key."=".urlencode($val)."&";
85
+ }
86
+ $body = substr($b, 0, strlen($b) - 1);
87
+ }
88
+ $this->sendRequest("POST", $url, $headers, $body);
89
+ }
90
+
91
+ public function streamedPost($url, $headers = array()) {
92
+ $headers['Transfer-Encoding'] = "chunked";
93
+ $this->sendRequest("POST", $url, $headers);
94
+ }
95
+
96
+ public function multipartChunkedPost($url) {
97
+ $mph = array(
98
+ "Content-Disposition" => "form-data; name=bvinfile; filename=data",
99
+ "Content-Type" => "application/octet-stream"
100
+ );
101
+ $rnd = rand(100000, 999999);
102
+ $this->boundary = "----".$rnd;
103
+ $prologue = "--".$this->boundary."\r\n";
104
+ foreach($mph as $key=>$val) {
105
+ $prologue .= $key.":".$val."\r\n";
106
+ }
107
+ $prologue .= "\r\n";
108
+ $headers = array('Content-Type' => "multipart/form-data; boundary=".$this->boundary);
109
+ $this->streamedPost($url, $headers);
110
+ $this->sendChunk($prologue);
111
+ }
112
+
113
+ public function writeChunk($data) {
114
+ $this->sendChunk($data);
115
+ }
116
+
117
+ public function closeChunk() {
118
+ $this->sendChunk("");
119
+ }
120
+
121
+ public function endStream() {
122
+ $epilogue = "\r\n\r\n--".$this->boundary."--\r\n";
123
+ $this->sendChunk($epilogue);
124
+ $this->closeChunk();
125
+ }
126
+
127
+ public function getResponse() {
128
+ $response = array();
129
+ $response['headers'] = array();
130
+ $state = 1;
131
+ $conlen = 0;
132
+ stream_set_timeout($this->conn, 300);
133
+ while (!feof($this->conn)) {
134
+ $line = fgets($this->conn, 4096);
135
+ if (1 == $state) {
136
+ if (!preg_match('/HTTP\/(\\d\\.\\d)\\s*(\\d+)\\s*(.*)/', $line, $m)) {
137
+ $response['httperror'] = "Status code line invalid: ".htmlentities($line);
138
+ return $response;
139
+ }
140
+ $response['http_version'] = $m[1];
141
+ $response['status'] = $m[2];
142
+ $response['status_string'] = $m[3];
143
+ $state = 2;
144
+ } else if (2 == $state) {
145
+ # End of headers
146
+ if (2 == strlen($line)) {
147
+ if ($conlen > 0)
148
+ $response['body'] = fread($this->conn, $conlen);
149
+ return $response;
150
+ }
151
+ if (!preg_match('/([^:]+):\\s*(.*)/', $line, $m)) {
152
+ // Skip to the next header
153
+ continue;
154
+ }
155
+ $key = strtolower(trim($m[1]));
156
+ $val = trim($m[2]);
157
+ $response['headers'][$key] = $val;
158
+ if ($key == "content-length") {
159
+ $conlen = intval($val);
160
+ }
161
+ }
162
+ }
163
+ return $response;
164
+ }
165
+ }
166
+ endif;
callback/wings/auth.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if (!defined('ABSPATH')) exit;
4
+ if (!class_exists('BVAuthCallback')) :
5
+ class BVAuthCallback {
6
+
7
+ function process($method) {
8
+ global $bvresp, $bvcb;
9
+ $auth = $bvcb->bvmain->auth;
10
+ switch ($method) {
11
+ case "addkeys":
12
+ $bvresp->addStatus("status", $auth->addKeys($_REQUEST['public'], $_REQUEST['secret']));
13
+ break;
14
+ case "updatekeys":
15
+ $bvresp->addStatus("status", $auth->updateKeys($_REQUEST['public'], $_REQUEST['secret']));
16
+ break;
17
+ case "rmkeys":
18
+ $bvresp->addStatus("status", $auth->rmKeys($_REQUEST['public']));
19
+ break;
20
+ default:
21
+ return false;
22
+ }
23
+ return true;
24
+ }
25
+ }
26
+ endif;
callback/wings/brand.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if (!defined('ABSPATH')) exit;
4
+ if (!class_exists('BVBrandCallback')) :
5
+
6
+ class BVBrandCallback {
7
+ public function process($method) {
8
+ global $bvresp, $bvcb;
9
+ $info = $bvcb->bvmain->info;
10
+ $option_name = $bvcb->bvmain->brand_option;
11
+ switch($method) {
12
+ case 'setbrand':
13
+ $brandinfo = array();
14
+ if (array_key_exists('hide', $_REQUEST)) {
15
+ $brandinfo['hide'] = $_REQUEST['hide'];
16
+ } else {
17
+ $brandinfo['name'] = $_REQUEST['name'];
18
+ $brandinfo['title'] = $_REQUEST['title'];
19
+ $brandinfo['description'] = $_REQUEST['description'];
20
+ $brandinfo['pluginuri'] = $_REQUEST['pluginuri'];
21
+ $brandinfo['author'] = $_REQUEST['author'];
22
+ $brandinfo['authorname'] = $_REQUEST['authorname'];
23
+ $brandinfo['authoruri'] = $_REQUEST['authoruri'];
24
+ $brandinfo['menuname'] = $_REQUEST['menuname'];
25
+ $brandinfo['logo'] = $_REQUEST['logo'];
26
+ $brandinfo['webpage'] = $_REQUEST['webpage'];
27
+ $brandinfo['appurl'] = $_REQUEST['appurl'];
28
+ if (array_key_exists('hide_plugin_details', $_REQUEST)) {
29
+ $brandinfo['hide_plugin_details'] = $_REQUEST['hide_plugin_details'];
30
+ }
31
+ if (array_key_exists('hide_from_menu', $_REQUEST)) {
32
+ $brandinfo['hide_from_menu'] = $_REQUEST['hide_from_menu'];
33
+ }
34
+ }
35
+ $info->updateOption($option_name, $brandinfo);
36
+ $bvresp->addStatus("setbrand", $info->getOption($option_name));
37
+ break;
38
+ case 'rmbrand':
39
+ $info->deleteOption($option_name);
40
+ $bvresp->addStatus("rmbrand", !$info->getOption($option_name));
41
+ break;
42
+ default:
43
+ return false;
44
+ }
45
+ return true;
46
+ }
47
+ }
48
+ endif;
callback/wings/db.php ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if (!defined('ABSPATH')) exit;
4
+ if (!class_exists('BVDBCallback')) :
5
+ class BVDBCallback {
6
+
7
+ public function getLastID($pkeys, $end_row) {
8
+ $last_ids = array();
9
+ foreach($pkeys as $pk) {
10
+ $last_ids[$pk] = $end_row[$pk];
11
+ }
12
+ return $last_ids;
13
+ }
14
+
15
+ public function getTableData($table, $tname, $rcount, $offset, $limit, $bsize, $filter, $pkeys, $include_rows = false) {
16
+ global $bvcb, $bvresp;
17
+ $tinfo = array();
18
+
19
+ $rows_count = $bvcb->bvmain->db->rowsCount($table);
20
+ $bvresp->addStatus('count', $rows_count);
21
+ if ($limit == 0) {
22
+ $limit = $rows_count;
23
+ }
24
+ $srows = 1;
25
+ while (($limit > 0) && ($srows > 0)) {
26
+ if ($bsize > $limit)
27
+ $bsize = $limit;
28
+ $rows = $bvcb->bvmain->db->getTableContent($table, '*', $filter, $bsize, $offset);
29
+ $srows = sizeof($rows);
30
+ $data = array();
31
+ $data["offset"] = $offset;
32
+ $data["size"] = $srows;
33
+ $data["md5"] = md5(serialize($rows));
34
+ array_push($tinfo, $data);
35
+ if (!empty($pkeys) && $srows > 0) {
36
+ $end_row = end($rows);
37
+ $last_ids = $this->getLastID($pkeys, $end_row);
38
+ $data['last_ids'] = $last_ids;
39
+ $bvresp->addStatus('last_ids', $last_ids);
40
+ }
41
+ if ($include_rows) {
42
+ $data["rows"] = $rows;
43
+ $str = serialize($data);
44
+ $bvresp->writeStream($str);
45
+ }
46
+ $offset += $srows;
47
+ $limit -= $srows;
48
+ }
49
+ $bvresp->addStatus('size', $offset);
50
+ $bvresp->addStatus('tinfo', $tinfo);
51
+ }
52
+
53
+ public function process($method) {
54
+ global $bvresp, $bvcb;
55
+ $db = $bvcb->bvmain->db;
56
+ switch ($method) {
57
+ case "gettbls":
58
+ $bvresp->addStatus("tables", $db->showTables());
59
+ break;
60
+ case "tblstatus":
61
+ $bvresp->addStatus("statuses", $db->showTableStatus());
62
+ break;
63
+ case "tablekeys":
64
+ $table = urldecode($_REQUEST['table']);
65
+ $bvresp->addStatus("table_keys", $db->tableKeys($table));
66
+ break;
67
+ case "describetable":
68
+ $table = urldecode($_REQUEST['table']);
69
+ $bvresp->addStatus("table_description", $db->describeTable($table));
70
+ break;
71
+ case "checktable":
72
+ $table = urldecode($_REQUEST['table']);
73
+ $type = urldecode($_REQUEST['type']);
74
+ $bvresp->addStatus("status", $db->checkTable($table, $type));
75
+ break;
76
+ case "repairtable":
77
+ $table = urldecode($_REQUEST['table']);
78
+ $bvresp->addStatus("status", $db->repairTable($table));
79
+ break;
80
+ case "gettcrt":
81
+ $table = urldecode($_REQUEST['table']);
82
+ $bvresp->addStatus("create", $db->showTableCreate($table));
83
+ break;
84
+ case "getrowscount":
85
+ $table = urldecode($_REQUEST['table']);
86
+ $bvresp->addStatus("count", $db->rowsCount($table));
87
+ break;
88
+ case "gettablecontent":
89
+ $table = urldecode($_REQUEST['table']);
90
+ $fields = urldecode($_REQUEST['fields']);
91
+ $filter = (array_key_exists('filter', $_REQUEST)) ? urldecode($_REQUEST['filter']) : "";
92
+ $limit = intval(urldecode($_REQUEST['limit']));
93
+ $offset = intval(urldecode($_REQUEST['offset']));
94
+ $pkeys = (array_key_exists('pkeys', $_REQUEST)) ? $_REQUEST['pkeys'] : array();
95
+ $bvresp->addStatus('timestamp', time());
96
+ $bvresp->addStatus('tablename', $table);
97
+ $rows = $db->getTableContent($table, $fields, $filter, $limit, $offset);
98
+ $srows = sizeof($rows);
99
+ if (!empty($pkeys) && $srows > 0) {
100
+ $end_row = end($rows);
101
+ $bvresp->addStatus('last_ids', $this->getLastID($pkeys, $end_row));
102
+ }
103
+ $bvresp->addStatus("rows", $rows);
104
+ break;
105
+ case "tableinfo":
106
+ $table = urldecode($_REQUEST['table']);
107
+ $offset = intval(urldecode($_REQUEST['offset']));
108
+ $limit = intval(urldecode($_REQUEST['limit']));
109
+ $bsize = intval(urldecode($_REQUEST['bsize']));
110
+ $filter = (array_key_exists('filter', $_REQUEST)) ? urldecode($_REQUEST['filter']) : "";
111
+ $rcount = intval(urldecode($_REQUEST['rcount']));
112
+ $tname = urldecode($_REQUEST['tname']);
113
+ $pkeys = (array_key_exists('pkeys', $_REQUEST)) ? $_REQUEST['pkeys'] : array();
114
+ $this->getTableData($table, $tname, $rcount, $offset, $limit, $bsize, $filter, $pkeys, false);
115
+ break;
116
+ case "uploadrows":
117
+ $table = urldecode($_REQUEST['table']);
118
+ $offset = intval(urldecode($_REQUEST['offset']));
119
+ $limit = intval(urldecode($_REQUEST['limit']));
120
+ $bsize = intval(urldecode($_REQUEST['bsize']));
121
+ $filter = (array_key_exists('filter', $_REQUEST)) ? urldecode($_REQUEST['filter']) : "";
122
+ $rcount = intval(urldecode($_REQUEST['rcount']));
123
+ $tname = urldecode($_REQUEST['tname']);
124
+ $pkeys = (array_key_exists('pkeys', $_REQUEST)) ? $_REQUEST['pkeys'] : array();
125
+ $this->getTableData($table, $tname, $rcount, $offset, $limit, $bsize, $filter, $pkeys, true);
126
+ break;
127
+ case "tblexists":
128
+ $bvresp->addStatus("tblexists", $db->isTablePresent($_REQUEST['tablename']));
129
+ break;
130
+ case "crttbl":
131
+ $bvresp->addStatus("crttbl", $db->createTable($_REQUEST['query'], $_REQUEST['tablename']));
132
+ break;
133
+ case "drptbl":
134
+ $bvresp->addStatus("drptbl", $db->dropBVTable($_REQUEST['name']));
135
+ break;
136
+ case "trttbl":
137
+ $bvresp->addStatus("trttbl", $db->truncateBVTable($_REQUEST['name']));
138
+ break;
139
+ default:
140
+ return false;
141
+ }
142
+ return true;
143
+ }
144
+ }
145
+ endif;
callback/wings/fs.php ADDED
@@ -0,0 +1,258 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if (!defined('ABSPATH')) exit;
4
+ if (!class_exists('BVFSCallback')) :
5
+ class BVFSCallback {
6
+ function fileStat($relfile) {
7
+ $absfile = ABSPATH.$relfile;
8
+ $fdata = array();
9
+ $fdata["filename"] = $relfile;
10
+ $stats = @stat($absfile);
11
+ if ($stats) {
12
+ foreach (preg_grep('#size|uid|gid|mode|mtime#i', array_keys($stats)) as $key ) {
13
+ $fdata[$key] = $stats[$key];
14
+ }
15
+ if (is_link($absfile)) {
16
+ $fdata["link"] = @readlink($absfile);
17
+ }
18
+ } else {
19
+ $fdata["failed"] = true;
20
+ }
21
+ return $fdata;
22
+ }
23
+
24
+ function scanFilesUsingGlob($initdir = "./", $offset = 0, $limit = 0, $bsize = 512, $recurse = true, $regex = '{.??,}*') {
25
+ global $bvresp;
26
+ $i = 0;
27
+ $dirs = array();
28
+ $dirs[] = $initdir;
29
+ $bfc = 0;
30
+ $bfa = array();
31
+ $current = 0;
32
+ $abspath = realpath(ABSPATH).'/';
33
+ $abslen = strlen($abspath);
34
+ # XNOTE: $recurse cannot be used directly here
35
+ while ($i < count($dirs)) {
36
+ $dir = $dirs[$i];
37
+
38
+ foreach (glob($abspath.$dir.$regex, GLOB_NOSORT | GLOB_BRACE) as $absfile) {
39
+ $relfile = substr($absfile, $abslen);
40
+ if (is_dir($absfile) && !is_link($absfile)) {
41
+ $dirs[] = $relfile."/";
42
+ }
43
+ $current++;
44
+ if ($offset >= $current)
45
+ continue;
46
+ if (($limit != 0) && (($current - $offset) > $limit)) {
47
+ $i = count($dirs);
48
+ break;
49
+ }
50
+ $bfa[] = $this->fileStat($relfile);
51
+ $bfc++;
52
+ if ($bfc == $bsize) {
53
+ $str = serialize($bfa);
54
+ $bvresp->writeStream($str);
55
+ $bfc = 0;
56
+ $bfa = array();
57
+ }
58
+ }
59
+ $regex = '{.??,}*';
60
+ $i++;
61
+ if ($recurse == false)
62
+ break;
63
+ }
64
+ if ($bfc != 0) {
65
+ $str = serialize($bfa);
66
+ $bvresp->writeStream($str);
67
+ }
68
+ }
69
+
70
+ function scanFiles($initdir = "./", $offset = 0, $limit = 0, $bsize = 512, $recurse = true) {
71
+ global $bvresp;
72
+ $i = 0;
73
+ $dirs = array();
74
+ $dirs[] = $initdir;
75
+ $bfc = 0;
76
+ $bfa = array();
77
+ $current = 0;
78
+ while ($i < count($dirs)) {
79
+ $dir = $dirs[$i];
80
+ $d = @opendir(ABSPATH.$dir);
81
+ if ($d) {
82
+ while (($file = readdir($d)) !== false) {
83
+ if ($file == '.' || $file == '..') { continue; }
84
+ $relfile = $dir.$file;
85
+ $absfile = ABSPATH.$relfile;
86
+ if (is_dir($absfile) && !is_link($absfile)) {
87
+ $dirs[] = $relfile."/";
88
+ }
89
+ $current++;
90
+ if ($offset >= $current)
91
+ continue;
92
+ if (($limit != 0) && (($current - $offset) > $limit)) {
93
+ $i = count($dirs);
94
+ break;
95
+ }
96
+ $bfa[] = $this->fileStat($relfile);
97
+ $bfc++;
98
+ if ($bfc == $bsize) {
99
+ $str = serialize($bfa);
100
+ $bvresp->writeStream($str);
101
+ $bfc = 0;
102
+ $bfa = array();
103
+ }
104
+ }
105
+ closedir($d);
106
+ }
107
+ $i++;
108
+ if ($recurse == false)
109
+ break;
110
+ }
111
+ if ($bfc != 0) {
112
+ $str = serialize($bfa);
113
+ $bvresp->writeStream($str);
114
+ }
115
+ }
116
+
117
+ function calculateMd5($absfile, $fdata, $offset, $limit, $bsize) {
118
+ if ($offset == 0 && $limit == 0) {
119
+ $md5 = md5_file($absfile);
120
+ } else {
121
+ if ($limit == 0)
122
+ $limit = $fdata["size"];
123
+ if ($offset + $limit < $fdata["size"])
124
+ $limit = $fdata["size"] - $offset;
125
+ $handle = fopen($absfile, "rb");
126
+ $ctx = hash_init('md5');
127
+ fseek($handle, $offset, SEEK_SET);
128
+ $dlen = 1;
129
+ while (($limit > 0) && ($dlen > 0)) {
130
+ if ($bsize > $limit)
131
+ $bsize = $limit;
132
+ $d = fread($handle, $bsize);
133
+ $dlen = strlen($d);
134
+ hash_update($ctx, $d);
135
+ $limit -= $dlen;
136
+ }
137
+ fclose($handle);
138
+ $md5 = hash_final($ctx);
139
+ }
140
+ return $md5;
141
+ }
142
+
143
+ function getFilesStats($files, $offset = 0, $limit = 0, $bsize = 102400, $md5 = false) {
144
+ global $bvresp;
145
+ foreach ($files as $file) {
146
+ $fdata = $this->fileStat($file);
147
+ $absfile = ABSPATH.$file;
148
+ if (!is_readable($absfile)) {
149
+ $bvresp->addArrayToStatus("missingfiles", $file);
150
+ continue;
151
+ }
152
+ if ($md5 === true) {
153
+ $fdata["md5"] = $this->calculateMd5($absfile, $fdata, $offset, $limit, $bsize);
154
+ }
155
+ $bvresp->addArrayToStatus("stats", $fdata);
156
+ }
157
+ }
158
+
159
+ function uploadFiles($files, $offset = 0, $limit = 0, $bsize = 102400) {
160
+ global $bvresp;
161
+
162
+ foreach ($files as $file) {
163
+ if (!is_readable(ABSPATH.$file)) {
164
+ $bvresp->addArrayToStatus("missingfiles", $file);
165
+ continue;
166
+ }
167
+ $handle = fopen(ABSPATH.$file, "rb");
168
+ if (($handle != null) && is_resource($handle)) {
169
+ $fdata = $this->fileStat($file);
170
+ $_limit = $limit;
171
+ $_bsize = $bsize;
172
+ if ($_limit == 0)
173
+ $_limit = $fdata["size"];
174
+ if ($offset + $_limit > $fdata["size"])
175
+ $_limit = $fdata["size"] - $offset;
176
+ $fdata["limit"] = $_limit;
177
+ $sfdata = serialize($fdata);
178
+ $bvresp->writeStream($sfdata);
179
+ fseek($handle, $offset, SEEK_SET);
180
+ $dlen = 1;
181
+ while (($_limit > 0) && ($dlen > 0)) {
182
+ if ($_bsize > $_limit)
183
+ $_bsize = $_limit;
184
+ $d = fread($handle, $_bsize);
185
+ $dlen = strlen($d);
186
+ $bvresp->writeStream($d);
187
+ $_limit -= $dlen;
188
+ }
189
+ fclose($handle);
190
+ } else {
191
+ $bvresp->addArrayToStatus("unreadablefiles", $file);
192
+ }
193
+ }
194
+ }
195
+
196
+ function process($method) {
197
+ switch ($method) {
198
+ case "scanfilesglob":
199
+ $initdir = urldecode($_REQUEST['initdir']);
200
+ $offset = intval(urldecode($_REQUEST['offset']));
201
+ $limit = intval(urldecode($_REQUEST['limit']));
202
+ $bsize = intval(urldecode($_REQUEST['bsize']));
203
+ $regex = urldecode($_REQUEST['regex']);
204
+ $recurse = true;
205
+ if (array_key_exists('recurse', $_REQUEST) && $_REQUEST["recurse"] == "false") {
206
+ $recurse = false;
207
+ }
208
+ $this->scanFilesUsingGlob($initdir, $offset, $limit, $bsize, $recurse, $regex);
209
+ break;
210
+ case "scanfiles":
211
+ $initdir = urldecode($_REQUEST['initdir']);
212
+ $offset = intval(urldecode($_REQUEST['offset']));
213
+ $limit = intval(urldecode($_REQUEST['limit']));
214
+ $bsize = intval(urldecode($_REQUEST['bsize']));
215
+ $recurse = true;
216
+ if (array_key_exists('recurse', $_REQUEST) && $_REQUEST["recurse"] == "false") {
217
+ $recurse = false;
218
+ }
219
+ $this->scanFiles($initdir, $offset, $limit, $bsize, $recurse);
220
+ break;
221
+ case "getfilesstats":
222
+ $files = $_REQUEST['files'];
223
+ $offset = intval(urldecode($_REQUEST['offset']));
224
+ $limit = intval(urldecode($_REQUEST['limit']));
225
+ $bsize = intval(urldecode($_REQUEST['bsize']));
226
+ $md5 = false;
227
+ if (array_key_exists('md5', $_REQUEST)) {
228
+ $md5 = true;
229
+ }
230
+ $this->getFilesStats($files, $offset, $limit, $bsize, $md5);
231
+ break;
232
+ case "sendmanyfiles":
233
+ $files = $_REQUEST['files'];
234
+ $offset = intval(urldecode($_REQUEST['offset']));
235
+ $limit = intval(urldecode($_REQUEST['limit']));
236
+ $bsize = intval(urldecode($_REQUEST['bsize']));
237
+ $this->uploadFiles($files, $offset, $limit, $bsize);
238
+ break;
239
+ case "filelist":
240
+ $initdir = $_REQUEST['initdir'];
241
+ $glob_option = GLOB_MARK;
242
+ if(array_key_exists('onlydir', $_REQUEST)) {
243
+ $glob_option = GLOB_ONLYDIR;
244
+ }
245
+ $regex = "*";
246
+ if(array_key_exists('regex', $_REQUEST)){
247
+ $regex = $_REQUEST['regex'];
248
+ }
249
+ $directoryList = glob($initdir.$regex, $glob_option);
250
+ $this->getFilesStats($directoryList);
251
+ break;
252
+ default:
253
+ return false;
254
+ }
255
+ return true;
256
+ }
257
+ }
258
+ endif;
callback/wings/info.php ADDED
@@ -0,0 +1,292 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if (!defined('ABSPATH')) exit;
4
+ if (!class_exists('BVInfoCallback')) :
5
+ class BVInfoCallback {
6
+ public function getPosts($post_type, $count = 5) {
7
+ global $bvresp;
8
+ $output = array();
9
+ $args = array('numberposts' => $count, 'post_type' => $post_type);
10
+ $posts = get_posts($args);
11
+ $keys = array('post_title', 'guid', 'ID', 'post_date');
12
+ foreach ($posts as $post) {
13
+ $pdata = array();
14
+ $post_array = get_object_vars($post);
15
+ foreach ($keys as $key) {
16
+ $pdata[$key] = $post_array[$key];
17
+ }
18
+ $bvresp->addArrayToStatus("posts", $pdata);
19
+ }
20
+ }
21
+
22
+ public function getStats() {
23
+ global $bvresp;
24
+ $bvresp->addStatus("posts", get_object_vars(wp_count_posts()));
25
+ $bvresp->addStatus("pages", get_object_vars(wp_count_posts("page")));
26
+ $bvresp->addStatus("comments", get_object_vars(wp_count_comments()));
27
+ }
28
+
29
+ public function getPlugins() {
30
+ global $bvresp;
31
+ if (!function_exists('get_plugins')) {
32
+ require_once (ABSPATH."wp-admin/includes/plugin.php");
33
+ }
34
+ $plugins = get_plugins();
35
+ foreach ($plugins as $plugin_file => $plugin_data) {
36
+ $pdata = array(
37
+ 'file' => $plugin_file,
38
+ 'title' => $plugin_data['Title'],
39
+ 'version' => $plugin_data['Version'],
40
+ 'active' => is_plugin_active($plugin_file),
41
+ 'network' => $plugin_data['Network']
42
+ );
43
+ $bvresp->addArrayToStatus("plugins", $pdata);
44
+ }
45
+ }
46
+
47
+ public function themeToArray($theme) {
48
+ if (is_object($theme)) {
49
+ $pdata = array(
50
+ 'name' => $theme->Name,
51
+ 'title' => $theme->Title,
52
+ 'stylesheet' => $theme->get_stylesheet(),
53
+ 'template' => $theme->Template,
54
+ 'version' => $theme->Version
55
+ );
56
+ } else {
57
+ $pdata = array(
58
+ 'name' => $theme["Name"],
59
+ 'title' => $theme["Title"],
60
+ 'stylesheet' => $theme["Stylesheet"],
61
+ 'template' => $theme["Template"],
62
+ 'version' => $theme["Version"]
63
+ );
64
+ }
65
+ return $pdata;
66
+ }
67
+
68
+ public function getThemes() {
69
+ global $bvresp;
70
+ $themes = function_exists('wp_get_themes') ? wp_get_themes() : get_themes();
71
+ foreach($themes as $theme) {
72
+ $pdata = $this->themeToArray($theme);
73
+ $bvresp->addArrayToStatus("themes", $pdata);
74
+ }
75
+ $theme = function_exists('wp_get_theme') ? wp_get_theme() : get_current_theme();
76
+ $pdata = $this->themeToArray($theme);
77
+ $bvresp->addStatus("currenttheme", $pdata);
78
+ }
79
+
80
+ public function getSystemInfo() {
81
+ global $bvresp;
82
+ $sys_info = array(
83
+ 'serverip' => $_SERVER['SERVER_ADDR'],
84
+ 'host' => $_SERVER['HTTP_HOST'],
85
+ 'phpversion' => phpversion(),
86
+ 'AF_INET6' => defined('AF_INET6')
87
+ );
88
+ if (function_exists('get_current_user')) {
89
+ $sys_info['user'] = get_current_user();
90
+ }
91
+ if (function_exists('getmygid')) {
92
+ $sys_info['gid'] = getmygid();
93
+ }
94
+ if (function_exists('getmyuid')) {
95
+ $sys_info['uid'] = getmyuid();
96
+ }
97
+ if (function_exists('posix_getuid')) {
98
+ $sys_info['webuid'] = posix_getuid();
99
+ $sys_info['webgid'] = posix_getgid();
100
+ }
101
+ $bvresp->addStatus("sys", $sys_info);
102
+ }
103
+
104
+ public function getWpInfo() {
105
+ global $wp_version, $wp_db_version, $wp_local_package;
106
+ global $bvresp, $bvcb;
107
+ $upload_dir = wp_upload_dir();
108
+ $info = $bvcb->bvmain->info;
109
+
110
+ $wp_info = array(
111
+ 'dbprefix' => $bvcb->bvmain->db->dbprefix(),
112
+ 'wpmu' => $info->isMultisite(),
113
+ 'mainsite' => $info->isMainSite(),
114
+ 'name' => get_bloginfo('name'),
115
+ 'siteurl' => $info->siteurl(),
116
+ 'homeurl' => $info->homeurl(),
117
+ 'charset' => get_bloginfo('charset'),
118
+ 'wpversion' => $wp_version,
119
+ 'dbversion' => $wp_db_version,
120
+ 'abspath' => ABSPATH,
121
+ 'uploadpath' => $upload_dir['basedir'],
122
+ 'uploaddir' => wp_upload_dir(),
123
+ 'contentdir' => defined('WP_CONTENT_DIR') ? WP_CONTENT_DIR : null,
124
+ 'contenturl' => defined('WP_CONTENT_URL') ? WP_CONTENT_URL : null,
125
+ 'plugindir' => defined('WP_PLUGIN_DIR') ? WP_PLUGIN_DIR : null,
126
+ 'dbcharset' => defined('DB_CHARSET') ? DB_CHARSET : null,
127
+ 'disallow_file_edit' => defined('DISALLOW_FILE_EDIT'),
128
+ 'disallow_file_mods' => defined('DISALLOW_FILE_MODS'),
129
+ 'locale' => get_locale(),
130
+ 'wp_local_string' => $wp_local_package,
131
+ 'charset_collate' => $bvcb->bvmain->db->getCharsetCollate()
132
+ );
133
+ $bvresp->addStatus("wp", $wp_info);
134
+ }
135
+
136
+ public function getUsers($args = array(), $full) {
137
+ global $bvresp, $bvcb;
138
+ $results = array();
139
+ $users = get_users($args);
140
+ if ('true' == $full) {
141
+ $results = $bvcb->bvmain->lib->objectToArray($users);
142
+ } else {
143
+ foreach( (array) $users as $user) {
144
+ $result = array();
145
+ $result['user_email'] = $user->user_email;
146
+ $result['ID'] = $user->ID;
147
+ $result['roles'] = $user->roles;
148
+ $result['user_login'] = $user->user_login;
149
+ $result['display_name'] = $user->display_name;
150
+ $result['user_registered'] = $user->user_registered;
151
+ $result['user_status'] = $user->user_status;
152
+ $result['user_url'] = $user->url;
153
+
154
+ $results[] = $result;
155
+ }
156
+ }
157
+ $bvresp->addStatus("users", $results);
158
+ }
159
+
160
+ public function availableFunctions(&$info) {
161
+ if (extension_loaded('openssl')) {
162
+ $info['openssl'] = "1";
163
+ }
164
+ if (function_exists('is_ssl') && is_ssl()) {
165
+ $info['https'] = "1";
166
+ }
167
+ if (function_exists('openssl_public_encrypt')) {
168
+ $info['openssl_public_encrypt'] = "1";
169
+ }
170
+ if (function_exists('openssl_public_decrypt')) {
171
+ $info['openssl_public_decrypt'] = "1";
172
+ }
173
+ $info['sha1'] = "1";
174
+ $info['apissl'] = "1";
175
+ if (function_exists('base64_encode')) {
176
+ $info['b64encode'] = true;
177
+ }
178
+ if (function_exists('base64_decode')) {
179
+ $info['b64decode'] = true;
180
+ }
181
+ return $info;
182
+ }
183
+
184
+ public function servicesInfo(&$info) {
185
+ global $bvcb;
186
+ $bvinfo = $bvcb->bvmain->info;
187
+ $info['dynsync'] = $bvinfo->getOption('bvDynSyncActive');
188
+ $info['woodyn'] = $bvinfo->getOption('bvWooDynSync');
189
+ $info['dynplug'] = $bvinfo->getOption('bvdynplug');
190
+ $info['ptplug'] = $bvinfo->getOption('bvptplug');
191
+ $info['fw'] = $this->getFWConfig();
192
+ $info['lp'] = $this->getLPConfig();
193
+ $info['brand'] = $bvinfo->getOption($bvcb->bvmain->brand_option);
194
+ $info['badgeinfo'] = $bvinfo->getOption($bvcb->bvmain->badgeinfo);
195
+ }
196
+
197
+ public function getLPConfig() {
198
+ global $bvcb;
199
+ $config = array();
200
+ $bvinfo = $bvcb->bvmain->info;
201
+ $mode = $bvinfo->getOption('bvlpmode');
202
+ $cplimit = $bvinfo->getOption('bvlpcaptchalimit');
203
+ $tplimit = $bvinfo->getOption('bvlptempblocklimit');
204
+ $bllimit = $bvinfo->getOption('bvlpblockAllLimit');
205
+ $config['mode'] = intval($mode ? $mode : 1);
206
+ $config['captcha_limit'] = intval($cplimit ? $cplimit : 3);
207
+ $config['temp_block_limit'] = intval($tplimit? $tplimit : 6);
208
+ $config['block_all_limit'] = intval($bllimit ? $bllimit : 100);
209
+ return $config;
210
+ }
211
+
212
+ public function getFWConfig() {
213
+ global $bvcb;
214
+ $config = array();
215
+ $bvinfo = $bvcb->bvmain->info;
216
+ $mode = $bvinfo->getOption('bvfwmode');
217
+ $drules = $bvinfo->getOption('bvfwdisabledrules');
218
+ $rmode = $bvinfo->getOption('bvfwrulesmode');
219
+ $config['mode'] = intval($mode ? $mode : 1);
220
+ $config['disabled_rules'] = $drules ? $drules : array();
221
+ $config['rules_mode'] = intval($rmode ? $rmode : 1);
222
+ return $config;
223
+ }
224
+
225
+ public function dbconf(&$info) {
226
+ global $bvcb;
227
+ if (defined('DB_CHARSET'))
228
+ $info['dbcharset'] = DB_CHARSET;
229
+ $info['dbprefix'] = $bvcb->bvmain->db->dbprefix();
230
+ $info['charset_collate'] = $bvcb->bvmain->db->getCharsetCollate();
231
+ return $info;
232
+ }
233
+
234
+ public function activate() {
235
+ global $bvcb, $bvresp;
236
+ $resp = array();
237
+ $bvcb->bvmain->info->basic($resp);
238
+ $this->servicesInfo($resp);
239
+ $this->dbconf($resp);
240
+ $this->availableFunctions($resp);
241
+ $bvresp->addStatus('actinfo', $resp);
242
+ }
243
+
244
+ public function process($method) {
245
+ global $bvresp, $bvcb;
246
+ switch ($method) {
247
+ case "activateinfo":
248
+ $this->activate();
249
+ break;
250
+ case "gtpsts":
251
+ $count = 5;
252
+ if (array_key_exists('count', $_REQUEST))
253
+ $count = $_REQUEST['count'];
254
+ $this->getPosts($_REQUEST['post_type'], $count);
255
+ break;
256
+ case "gtsts":
257
+ $this->getStats();
258
+ break;
259
+ case "gtplgs":
260
+ $this->getPlugins();
261
+ break;
262
+ case "gtthms":
263
+ $this->getThemes();
264
+ break;
265
+ case "gtsym":
266
+ $this->getSystemInfo();
267
+ break;
268
+ case "gtwp":
269
+ $this->getWpInfo();
270
+ break;
271
+ case "getoption":
272
+ $bvresp->addStatus("option", $bvresp->getOption($_REQUEST['name']));
273
+ break;
274
+ case "gtusrs":
275
+ $full = false;
276
+ if (array_key_exists('full', $_REQUEST))
277
+ $full = true;
278
+ $this->getUsers($_REQUEST['args'], $full);
279
+ break;
280
+ case "gttrnsnt":
281
+ $transient = $bvcb->bvmain->info->getTransient($_REQUEST['name']);
282
+ if ($transient && array_key_exists('asarray', $_REQUEST))
283
+ $transient = $bvcb->bvmain->lib->objectToArray($transient);
284
+ $bvresp->addStatus("transient", $transient);
285
+ break;
286
+ default:
287
+ return false;
288
+ }
289
+ return true;
290
+ }
291
+ }
292
+ endif;
callback/wings/misc.php ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if (!defined('ABSPATH')) exit;
4
+ if (!class_exists('BVMiscCallback')) :
5
+
6
+ class BVMiscCallback {
7
+
8
+ function process($method) {
9
+ global $bvcb, $bvresp;
10
+ $info = $bvcb->bvmain->info;
11
+ switch ($method) {
12
+ case "enablebadge":
13
+ $option = $bvcb->bvmain->badgeinfo;
14
+ $badgeinfo = array();
15
+ $badgeinfo['badgeurl'] = $_REQUEST['badgeurl'];
16
+ $badgeinfo['badgeimg'] = $_REQUEST['badgeimg'];
17
+ $badgeinfo['badgealt'] = $_REQUEST['badgealt'];
18
+ $info->updateOption($option, $badgeinfo);
19
+ $bvresp->addStatus("status", $info->getOption($option));
20
+ break;
21
+ case "disablebadge":
22
+ $option = $bvcb->bvmain->badgeinfo;
23
+ $info->deleteOption($option);
24
+ $bvresp->addStatus("status", !$info->getOption($option));
25
+ break;
26
+ case "getoption":
27
+ $bvresp->addStatus('getoption', $info->getOption($_REQUEST['opkey']));
28
+ break;
29
+ case "setdynplug":
30
+ $info->updateOption('bvdynplug', $_REQUEST['dynplug']);
31
+ $bvresp->addStatus("setdynplug", $info->getOption('bvdynplug'));
32
+ break;
33
+ case "unsetdynplug":
34
+ $info->deleteOption('bvdynplug');
35
+ $bvresp->addStatus("unsetdynplug", $info->getOption('bvdynplug'));
36
+ break;
37
+ case "setptplug":
38
+ $info->updateOption('bvptplug', $_REQUEST['ptplug']);
39
+ $bvresp->addStatus("setptplug", $info->getOption('bvptplug'));
40
+ break;
41
+ case "unsetptplug":
42
+ $info->deleteOption('bvptlug');
43
+ $bvresp->addStatus("unsetptplug", $info->getOption('bvptlug'));
44
+ break;
45
+ case "wpupplgs":
46
+ $bvresp->addStatus("wpupdateplugins", wp_update_plugins());
47
+ break;
48
+ case "wpupthms":
49
+ $bvresp->addStatus("wpupdatethemes", wp_update_themes());
50
+ break;
51
+ case "wpupcre":
52
+ $bvresp->addStatus("wpupdatecore", wp_version_check());
53
+ break;
54
+ case "rmmonitime":
55
+ $bvcb->bvmain->unSetMonitTime();
56
+ $bvresp->addStatus("rmmonitime", !$bvcb->bvmain->getMonitTime());
57
+ break;
58
+ case "phpinfo":
59
+ phpinfo();
60
+ die();
61
+ break;
62
+ case "dlttrsnt":
63
+ $bvresp->addStatus("dlttrsnt", $bvcb->bvmain->info->deleteTransient($_REQUEST['key']));
64
+ break;
65
+ default:
66
+ return false;
67
+ }
68
+ return true;
69
+ }
70
+ }
71
+ endif;
css/style.css ADDED
@@ -0,0 +1,391 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .wrapper {
2
+ margin: 0px !important;
3
+ }
4
+
5
+ .horizontal-header {
6
+ padding: 0px 24px 0px 24px;
7
+ border-bottom: 1px solid #e9e9e9;
8
+ height: 70px;
9
+ display: flex;
10
+ flex-direction: row;
11
+ align-items: center;
12
+ }
13
+
14
+ .mg-branding {
15
+ display: flex;
16
+ flex-direction: row;
17
+ align-items: center;
18
+ justify-content: center;
19
+ float: left;
20
+ }
21
+
22
+ .mg-heading {
23
+ font-size: 26px;
24
+ color: #565656;
25
+ }
26
+
27
+ .bv-branding {
28
+ float: right;
29
+ display: flex;
30
+ flex-direction: row;
31
+ align-items: center;
32
+ justify-content: center;
33
+ float: right;
34
+ }
35
+
36
+ .bv-logo {
37
+ margin-left: 10px;
38
+ }
39
+
40
+ .header-left,
41
+ .header-right {
42
+ width: 50%;
43
+ }
44
+
45
+ .main-content {
46
+ background-repeat: no-repeat;
47
+ background-size: contain;
48
+ background-position: top right;
49
+ /*height: 800px !important;*/
50
+ padding: 64px;
51
+ padding-top: 32px;
52
+ }
53
+
54
+ .migrations {
55
+ display: flex;
56
+ flex-direction: row;
57
+ align-items: center;
58
+ }
59
+
60
+ .mig-left,
61
+ .mig-right {
62
+ width: 50%;
63
+ padding: 24px;
64
+ }
65
+
66
+ .form-heading {
67
+ font-size: 40px;
68
+ color: #2C3751;
69
+ font-weight: 700;
70
+ width: 600px;
71
+ line-height: 1.5;
72
+ }
73
+
74
+ .mig-img {
75
+ float: right;
76
+ }
77
+
78
+ .form-fields {
79
+ display: flex;
80
+ flex-direction: row;
81
+ align-items: baseline;
82
+ margin-top: 5%;
83
+ }
84
+
85
+ .form-fields>form>input {
86
+ height: 60px;
87
+ width: 360px;
88
+ border-radius: 100px;
89
+ border: 1px solid #e9e9e9;
90
+ margin-right: 10px;
91
+ padding-top: 5px;
92
+ outline: none;
93
+ text-align: left;
94
+ padding-left: 40px;
95
+ font-size: 15px;
96
+ display: flex;
97
+ flex-direction: column;
98
+ align-items: center;
99
+ justify-content: center;
100
+ }
101
+
102
+ .form-fields>form>input[type="submit"] {
103
+ height: 60px;
104
+ width: unset;
105
+ border-radius: 100px;
106
+ border: 1px solid #e9e9e9;
107
+ margin-right: unset;
108
+ margin-left: unset;
109
+ padding-top: 5px;
110
+ outline: none;
111
+ text-align: center;
112
+ font-size: 15px;
113
+ display: flex;
114
+ flex-direction: column;
115
+ align-items: center;
116
+ justify-content: center;
117
+ }
118
+
119
+ .primary-button {
120
+ background-color: #1ADCDE;
121
+ border-radius: 100px;
122
+ color: #ffffff;
123
+ padding: 0px 24px 0px 24px;
124
+ height: 60px;
125
+ display: flex;
126
+ flex-direction: row;
127
+ align-items: center;
128
+ box-shadow: 0px 0px 20px 0 rgba(76, 189, 191, 0.48);
129
+ }
130
+
131
+ .normal-text {
132
+ font-size: 15px;
133
+ color: #6E6E6E;
134
+ }
135
+
136
+ .link {
137
+ color: #12B7B9;
138
+ }
139
+
140
+ .horizontal {
141
+ display: flex;
142
+ flex-direction: row;
143
+ align-items: center;
144
+ justify-content: normal;
145
+ }
146
+
147
+ .tnc-check {
148
+ margin-top: 3%;
149
+ }
150
+
151
+ .form {
152
+ display: flex;
153
+ flex-direction: column;
154
+ align-items: center;
155
+ justify-content: center;
156
+ }
157
+
158
+
159
+
160
+ a {
161
+ text-decoration: none;
162
+ outline: none;
163
+ }
164
+
165
+ .video-link {
166
+ margin-top: 5%;
167
+ }
168
+
169
+ .video-text {
170
+ margin-left: 5px;
171
+ }
172
+
173
+ .supp-hosts {
174
+ margin-top: 20%;
175
+ }
176
+
177
+ .supp-heading {
178
+ font-weight: 600;
179
+ text-transform: uppercase;
180
+ }
181
+
182
+ .logos {
183
+ display: flex;
184
+ flex-direction: row;
185
+ align-items: center;
186
+ justify-content: normal;
187
+ flex-wrap: wrap;
188
+ width: 90%;
189
+ margin-top: 3%;
190
+ }
191
+
192
+ .ind-logo {
193
+ margin-right: 36px;
194
+ margin-bottom: 36px;
195
+ }
196
+
197
+ .video-first {
198
+ display: none;
199
+ }
200
+
201
+ .info-row-first {
202
+ display: flex;
203
+ flex-direction: row;
204
+ align-items: center;
205
+ justify-content: flex-end;
206
+ width: 100%;
207
+ }
208
+
209
+ .info-row-second {
210
+ display: flex;
211
+ flex-direction: row;
212
+ align-items: center;
213
+ justify-content: center;
214
+ width: 100%;
215
+ padding-top: 24px;
216
+ border-top: 1px solid #e9e9e9;
217
+ }
218
+
219
+ .info {
220
+ padding-left: 5px;
221
+ padding-right: 5px;
222
+ border-right: 1px solid #e9e9e9;
223
+ }
224
+
225
+ .no-border {
226
+ border: none !important;
227
+ }
228
+
229
+ .bv-button {
230
+ padding: 5px 20px;
231
+ display: inline-block;
232
+ margin-right: 10px;
233
+ background: #17252A;
234
+ color: #FFF;
235
+ border-radius: 5px;
236
+ }
237
+ .bv-button:hover {
238
+ background: #444;
239
+ color: #FFF;
240
+ }
241
+ .side-header {
242
+ text-align: center;
243
+ font-size: 18px;
244
+ padding: 8px;
245
+ background: #17252a;
246
+ color: #FFF;
247
+ }
248
+ .side-box {
249
+ border: 1px solid #17252a;
250
+ padding-bottom: 10px;
251
+ margin-top: 20px;
252
+ }
253
+ .brand-name {
254
+ text-align: center;
255
+ padding: 5px;
256
+ }
257
+ .bv-tick {
258
+ color: #52BE80;
259
+ font-weight: 700;
260
+ padding-left: 3px;
261
+ }
262
+ .checkout-button {
263
+ margin-right: 0px;
264
+ background: #FF6037;
265
+ float: right;
266
+ margin-top: 10px;
267
+ }
268
+ .bv-quote {
269
+ text-align: center;
270
+ font-style: italic;
271
+ font-size: 15px;
272
+ }
273
+
274
+ @media (min-width: 769px) {
275
+ .info-row-second {
276
+ display: none;
277
+ }
278
+ }
279
+
280
+ @media (max-width: 768px) {
281
+ .horizontal-header {
282
+ padding: 0px;
283
+ }
284
+
285
+ .bv-branding {
286
+ width: 120px;
287
+ }
288
+
289
+ .bv-logo {
290
+ margin-left: 0px;
291
+ }
292
+
293
+ .main-content {
294
+ background: none;
295
+ }
296
+
297
+ .mg-heading {
298
+ display: none;
299
+ }
300
+
301
+ .bv-branding {
302
+ flex-wrap: wrap;
303
+ justify-content: normal;
304
+ }
305
+
306
+ .form-heading {
307
+ width: 90%;
308
+ text-align: center;
309
+ font-size: 30px;
310
+ }
311
+
312
+ .reg-form {
313
+ display: flex;
314
+ flex-direction: column;
315
+ align-items: center;
316
+ justify-content: center;
317
+ }
318
+
319
+ .main-content {
320
+ padding: 5%;
321
+ }
322
+
323
+ .migrations {
324
+ flex-direction: column;
325
+ }
326
+
327
+ .mig-left {
328
+ width: 100%
329
+ }
330
+
331
+ .mig-right {
332
+ display: none;
333
+ }
334
+
335
+ .form-fields {
336
+ flex-direction: column;
337
+ align-items: center;
338
+ }
339
+
340
+ .form-fields>form>input {
341
+ margin-right: 0px;
342
+ width: 80%;
343
+ }
344
+
345
+ .primary-button {
346
+ margin-top: 5%;
347
+ }
348
+
349
+ .horizontal {
350
+ flex-wrap: wrap;
351
+ line-height: 1.5;
352
+ }
353
+
354
+ .tnc-check {
355
+ margin-top: 10%;
356
+ }
357
+
358
+ .video-second {
359
+ display: none;
360
+ }
361
+
362
+ .video-first {
363
+ display: flex;
364
+ }
365
+
366
+ .logos {
367
+ width: 100%;
368
+ margin-top: 8%;
369
+ justify-content: center;
370
+ }
371
+
372
+ form {
373
+ display: flex;
374
+ flex-direction: column;
375
+ align-items: center;
376
+ justify-content: center;
377
+ }
378
+
379
+ .tnc-check {
380
+ width: 90%;
381
+ margin-top: 5%;
382
+ }
383
+
384
+ .info-row-first {
385
+ display: none;
386
+ }
387
+
388
+ .supp-heading {
389
+ text-align: center;
390
+ }
391
+ }
img/CPanel_logo.svg.png ADDED
Binary file
img/DreamHost_transparent-624x172.png ADDED
Binary file
img/GoDaddy.png ADDED
Binary file
img/HostGator-logo.png ADDED
Binary file
img/bluehost-logo.png ADDED
Binary file
img/bv-logo.png ADDED
Binary file
img/flywheeltransparent@2x-e1475766955840-825x392.png ADDED
Binary file
img/icon.png ADDED
Binary file
img/inMotion_Logo.png ADDED
Binary file
img/logo (5).png ADDED
Binary file
img/logo (6).png ADDED
Binary file
img/logo.png ADDED
Binary file
img/mc-logo.png ADDED
Binary file
img/mg-logo.png ADDED
Binary file
img/mig-img.png ADDED
Binary file
img/migrateguru.png ADDED
Binary file
img/play-video.svg ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <!-- Generator: Sketch 51.2 (57519) - http://www.bohemiancoding.com/sketch -->
4
+ <title>ic_play_circle_filled_black_24px (1)</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <defs></defs>
7
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
8
+ <g id="migrate-guru-desktop-copy" transform="translate(-221.000000, -582.000000)">
9
+ <g id="Group-29" transform="translate(219.000000, 578.000000)">
10
+ <g id="Group-28">
11
+ <g id="Group-3">
12
+ <g id="ic_play_circle_filled_black_24px-(1)" transform="translate(0.000000, 2.000000)">
13
+ <polygon id="Shape" points="0 0 24 0 24 24 0 24"></polygon>
14
+ <path d="M12,2 C6.48,2 2,6.48 2,12 C2,17.52 6.48,22 12,22 C17.52,22 22,17.52 22,12 C22,6.48 17.52,2 12,2 Z M10,16.5 L10,7.5 L16,12 L10,16.5 Z" id="Shape" fill="#12B7B9" fill-rule="nonzero"></path>
15
+ </g>
16
+ </g>
17
+ </g>
18
+ </g>
19
+ </g>
20
+ </g>
21
+ </svg>
img/siteground-logo.png ADDED
Binary file
img/supported_hosts.png ADDED
Binary file
img/triangle-bg.png ADDED
Binary file
img/wp_engine_logo_bb.png ADDED
Binary file
license.txt ADDED
@@ -0,0 +1,385 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ WordPress - Web publishing software
2
+
3
+ Copyright 2015 by the contributors
4
+
5
+ This program is free software; you can redistribute it and/or modify
6
+ it under the terms of the GNU General Public License as published by
7
+ the Free Software Foundation; either version 2 of the License, or
8
+ (at your option) any later version.
9
+
10
+ This program is distributed in the hope that it will be useful,
11
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ GNU General Public License for more details.
14
+
15
+ You should have received a copy of the GNU General Public License
16
+ along with this program; if not, write to the Free Software
17
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
+
19
+ This program incorporates work covered by the following copyright and
20
+ permission notices:
21
+
22
+ b2 is (c) 2001, 2002 Michel Valdrighi - m@tidakada.com -
23
+ http://tidakada.com
24
+
25
+ Wherever third party code has been used, credit has been given in the code's
26
+ comments.
27
+
28
+ b2 is released under the GPL
29
+
30
+ and
31
+
32
+ WordPress - Web publishing software
33
+
34
+ Copyright 2003-2010 by the contributors
35
+
36
+ WordPress is released under the GPL
37
+
38
+ =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
39
+
40
+ GNU GENERAL PUBLIC LICENSE
41
+ Version 2, June 1991
42
+
43
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
44
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
45
+ Everyone is permitted to copy and distribute verbatim copies
46
+ of this license document, but changing it is not allowed.
47
+
48
+ Preamble
49
+
50
+ The licenses for most software are designed to take away your
51
+ freedom to share and change it. By contrast, the GNU General Public
52
+ License is intended to guarantee your freedom to share and change free
53
+ software--to make sure the software is free for all its users. This
54
+ General Public License applies to most of the Free Software
55
+ Foundation's software and to any other program whose authors commit to
56
+ using it. (Some other Free Software Foundation software is covered by
57
+ the GNU Lesser General Public License instead.) You can apply it to
58
+ your programs, too.
59
+
60
+ When we speak of free software, we are referring to freedom, not
61
+ price. Our General Public Licenses are designed to make sure that you
62
+ have the freedom to distribute copies of free software (and charge for
63
+ this service if you wish), that you receive source code or can get it
64
+ if you want it, that you can change the software or use pieces of it
65
+ in new free programs; and that you know you can do these things.
66
+
67
+ To protect your rights, we need to make restrictions that forbid
68
+ anyone to deny you these rights or to ask you to surrender the rights.
69
+ These restrictions translate to certain responsibilities for you if you
70
+ distribute copies of the software, or if you modify it.
71
+
72
+ For example, if you distribute copies of such a program, whether
73
+ gratis or for a fee, you must give the recipients all the rights that
74
+ you have. You must make sure that they, too, receive or can get the
75
+ source code. And you must show them these terms so they know their
76
+ rights.
77
+
78
+ We protect your rights with two steps: (1) copyright the software, and
79
+ (2) offer you this license which gives you legal permission to copy,
80
+ distribute and/or modify the software.
81
+
82
+ Also, for each author's protection and ours, we want to make certain
83
+ that everyone understands that there is no warranty for this free
84
+ software. If the software is modified by someone else and passed on, we
85
+ want its recipients to know that what they have is not the original, so
86
+ that any problems introduced by others will not reflect on the original
87
+ authors' reputations.
88
+
89
+ Finally, any free program is threatened constantly by software
90
+ patents. We wish to avoid the danger that redistributors of a free
91
+ program will individually obtain patent licenses, in effect making the
92
+ program proprietary. To prevent this, we have made it clear that any
93
+ patent must be licensed for everyone's free use or not licensed at all.
94
+
95
+ The precise terms and conditions for copying, distribution and
96
+ modification follow.
97
+
98
+ GNU GENERAL PUBLIC LICENSE
99
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
100
+
101
+ 0. This License applies to any program or other work which contains
102
+ a notice placed by the copyright holder saying it may be distributed
103
+ under the terms of this General Public License. The "Program", below,
104
+ refers to any such program or work, and a "work based on the Program"
105
+ means either the Program or any derivative work under copyright law:
106
+ that is to say, a work containing the Program or a portion of it,
107
+ either verbatim or with modifications and/or translated into another
108
+ language. (Hereinafter, translation is included without limitation in
109
+ the term "modification".) Each licensee is addressed as "you".
110
+
111
+ Activities other than copying, distribution and modification are not
112
+ covered by this License; they are outside its scope. The act of
113
+ running the Program is not restricted, and the output from the Program
114
+ is covered only if its contents constitute a work based on the
115
+ Program (independent of having been made by running the Program).
116
+ Whether that is true depends on what the Program does.
117
+
118
+ 1. You may copy and distribute verbatim copies of the Program's
119
+ source code as you receive it, in any medium, provided that you
120
+ conspicuously and appropriately publish on each copy an appropriate
121
+ copyright notice and disclaimer of warranty; keep intact all the
122
+ notices that refer to this License and to the absence of any warranty;
123
+ and give any other recipients of the Program a copy of this License
124
+ along with the Program.
125
+
126
+ You may charge a fee for the physical act of transferring a copy, and
127
+ you may at your option offer warranty protection in exchange for a fee.
128
+
129
+ 2. You may modify your copy or copies of the Program or any portion
130
+ of it, thus forming a work based on the Program, and copy and
131
+ distribute such modifications or work under the terms of Section 1
132
+ above, provided that you also meet all of these conditions:
133
+
134
+ a) You must cause the modified files to carry prominent notices
135
+ stating that you changed the files and the date of any change.
136
+
137
+ b) You must cause any work that you distribute or publish, that in
138
+ whole or in part contains or is derived from the Program or any
139
+ part thereof, to be licensed as a whole at no charge to all third
140
+ parties under the terms of this License.
141
+
142
+ c) If the modified program normally reads commands interactively
143
+ when run, you must cause it, when started running for such
144
+ interactive use in the most ordinary way, to print or display an
145
+ announcement including an appropriate copyright notice and a
146
+ notice that there is no warranty (or else, saying that you provide
147
+ a warranty) and that users may redistribute the program under
148
+ these conditions, and telling the user how to view a copy of this
149
+ License. (Exception: if the Program itself is interactive but
150
+ does not normally print such an announcement, your work based on
151
+ the Program is not required to print an announcement.)
152
+
153
+ These requirements apply to the modified work as a whole. If
154
+ identifiable sections of that work are not derived from the Program,
155
+ and can be reasonably considered independent and separate works in
156
+ themselves, then this License, and its terms, do not apply to those
157
+ sections when you distribute them as separate works. But when you
158
+ distribute the same sections as part of a whole which is a work based
159
+ on the Program, the distribution of the whole must be on the terms of
160
+ this License, whose permissions for other licensees extend to the
161
+ entire whole, and thus to each and every part regardless of who wrote it.
162
+
163
+ Thus, it is not the intent of this section to claim rights or contest
164
+ your rights to work written entirely by you; rather, the intent is to
165
+ exercise the right to control the distribution of derivative or
166
+ collective works based on the Program.
167
+
168
+ In addition, mere aggregation of another work not based on the Program
169
+ with the Program (or with a work based on the Program) on a volume of
170
+ a storage or distribution medium does not bring the other work under
171
+ the scope of this License.
172
+
173
+ 3. You may copy and distribute the Program (or a work based on it,
174
+ under Section 2) in object code or executable form under the terms of
175
+ Sections 1 and 2 above provided that you also do one of the following:
176
+
177
+ a) Accompany it with the complete corresponding machine-readable
178
+ source code, which must be distributed under the terms of Sections
179
+ 1 and 2 above on a medium customarily used for software interchange; or,
180
+
181
+ b) Accompany it with a written offer, valid for at least three
182
+ years, to give any third party, for a charge no more than your
183
+ cost of physically performing source distribution, a complete
184
+ machine-readable copy of the corresponding source code, to be
185
+ distributed under the terms of Sections 1 and 2 above on a medium
186
+ customarily used for software interchange; or,
187
+
188
+ c) Accompany it with the information you received as to the offer
189
+ to distribute corresponding source code. (This alternative is
190
+ allowed only for noncommercial distribution and only if you
191
+ received the program in object code or executable form with such
192
+ an offer, in accord with Subsection b above.)
193
+
194
+ The source code for a work means the preferred form of the work for
195
+ making modifications to it. For an executable work, complete source
196
+ code means all the source code for all modules it contains, plus any
197
+ associated interface definition files, plus the scripts used to
198
+ control compilation and installation of the executable. However, as a
199
+ special exception, the source code distributed need not include
200
+ anything that is normally distributed (in either source or binary
201
+ form) with the major components (compiler, kernel, and so on) of the
202
+ operating system on which the executable runs, unless that component
203
+ itself accompanies the executable.
204
+
205
+ If distribution of executable or object code is made by offering
206
+ access to copy from a designated place, then offering equivalent
207
+ access to copy the source code from the same place counts as
208
+ distribution of the source code, even though third parties are not
209
+ compelled to copy the source along with the object code.
210
+
211
+ 4. You may not copy, modify, sublicense, or distribute the Program
212
+ except as expressly provided under this License. Any attempt
213
+ otherwise to copy, modify, sublicense or distribute the Program is
214
+ void, and will automatically terminate your rights under this License.
215
+ However, parties who have received copies, or rights, from you under
216
+ this License will not have their licenses terminated so long as such
217
+ parties remain in full compliance.
218
+
219
+ 5. You are not required to accept this License, since you have not
220
+ signed it. However, nothing else grants you permission to modify or
221
+ distribute the Program or its derivative works. These actions are
222
+ prohibited by law if you do not accept this License. Therefore, by
223
+ modifying or distributing the Program (or any work based on the
224
+ Program), you indicate your acceptance of this License to do so, and
225
+ all its terms and conditions for copying, distributing or modifying
226
+ the Program or works based on it.
227
+
228
+ 6. Each time you redistribute the Program (or any work based on the
229
+ Program), the recipient automatically receives a license from the
230
+ original licensor to copy, distribute or modify the Program subject to
231
+ these terms and conditions. You may not impose any further
232
+ restrictions on the recipients' exercise of the rights granted herein.
233
+ You are not responsible for enforcing compliance by third parties to
234
+ this License.
235
+
236
+ 7. If, as a consequence of a court judgment or allegation of patent
237
+ infringement or for any other reason (not limited to patent issues),
238
+ conditions are imposed on you (whether by court order, agreement or
239
+ otherwise) that contradict the conditions of this License, they do not
240
+ excuse you from the conditions of this License. If you cannot
241
+ distribute so as to satisfy simultaneously your obligations under this
242
+ License and any other pertinent obligations, then as a consequence you
243
+ may not distribute the Program at all. For example, if a patent
244
+ license would not permit royalty-free redistribution of the Program by
245
+ all those who receive copies directly or indirectly through you, then
246
+ the only way you could satisfy both it and this License would be to
247
+ refrain entirely from distribution of the Program.
248
+
249
+ If any portion of this section is held invalid or unenforceable under
250
+ any particular circumstance, the balance of the section is intended to
251
+ apply and the section as a whole is intended to apply in other
252
+ circumstances.
253
+
254
+ It is not the purpose of this section to induce you to infringe any
255
+ patents or other property right claims or to contest validity of any
256
+ such claims; this section has the sole purpose of protecting the
257
+ integrity of the free software distribution system, which is
258
+ implemented by public license practices. Many people have made
259
+ generous contributions to the wide range of software distributed
260
+ through that system in reliance on consistent application of that
261
+ system; it is up to the author/donor to decide if he or she is willing
262
+ to distribute software through any other system and a licensee cannot
263
+ impose that choice.
264
+
265
+ This section is intended to make thoroughly clear what is believed to
266
+ be a consequence of the rest of this License.
267
+
268
+ 8. If the distribution and/or use of the Program is restricted in
269
+ certain countries either by patents or by copyrighted interfaces, the
270
+ original copyright holder who places the Program under this License
271
+ may add an explicit geographical distribution limitation excluding
272
+ those countries, so that distribution is permitted only in or among
273
+ countries not thus excluded. In such case, this License incorporates
274
+ the limitation as if written in the body of this License.
275
+
276
+ 9. The Free Software Foundation may publish revised and/or new versions
277
+ of the General Public License from time to time. Such new versions will
278
+ be similar in spirit to the present version, but may differ in detail to
279
+ address new problems or concerns.
280
+
281
+ Each version is given a distinguishing version number. If the Program
282
+ specifies a version number of this License which applies to it and "any
283
+ later version", you have the option of following the terms and conditions
284
+ either of that version or of any later version published by the Free
285
+ Software Foundation. If the Program does not specify a version number of
286
+ this License, you may choose any version ever published by the Free Software
287
+ Foundation.
288
+
289
+ 10. If you wish to incorporate parts of the Program into other free
290
+ programs whose distribution conditions are different, write to the author
291
+ to ask for permission. For software which is copyrighted by the Free
292
+ Software Foundation, write to the Free Software Foundation; we sometimes
293
+ make exceptions for this. Our decision will be guided by the two goals
294
+ of preserving the free status of all derivatives of our free software and
295
+ of promoting the sharing and reuse of software generally.
296
+
297
+ NO WARRANTY
298
+
299
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
300
+ FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
301
+ OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
302
+ PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
303
+ OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
304
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
305
+ TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
306
+ PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
307
+ REPAIR OR CORRECTION.
308
+
309
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
310
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
311
+ REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
312
+ INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
313
+ OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
314
+ TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
315
+ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
316
+ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
317
+ POSSIBILITY OF SUCH DAMAGES.
318
+
319
+ END OF TERMS AND CONDITIONS
320
+
321
+ How to Apply These Terms to Your New Programs
322
+
323
+ If you develop a new program, and you want it to be of the greatest
324
+ possible use to the public, the best way to achieve this is to make it
325
+ free software which everyone can redistribute and change under these terms.
326
+
327
+ To do so, attach the following notices to the program. It is safest
328
+ to attach them to the start of each source file to most effectively
329
+ convey the exclusion of warranty; and each file should have at least
330
+ the "copyright" line and a pointer to where the full notice is found.
331
+
332
+ <one line to give the program's name and a brief idea of what it does.>
333
+ Copyright (C) <year> <name of author>
334
+
335
+ This program is free software; you can redistribute it and/or modify
336
+ it under the terms of the GNU General Public License as published by
337
+ the Free Software Foundation; either version 2 of the License, or
338
+ (at your option) any later version.
339
+
340
+ This program is distributed in the hope that it will be useful,
341
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
342
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
343
+ GNU General Public License for more details.
344
+
345
+ You should have received a copy of the GNU General Public License along
346
+ with this program; if not, write to the Free Software Foundation, Inc.,
347
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
348
+
349
+ Also add information on how to contact you by electronic and paper mail.
350
+
351
+ If the program is interactive, make it output a short notice like this
352
+ when it starts in an interactive mode:
353
+
354
+ Gnomovision version 69, Copyright (C) year name of author
355
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
356
+ This is free software, and you are welcome to redistribute it
357
+ under certain conditions; type `show c' for details.
358
+
359
+ The hypothetical commands `show w' and `show c' should show the appropriate
360
+ parts of the General Public License. Of course, the commands you use may
361
+ be called something other than `show w' and `show c'; they could even be
362
+ mouse-clicks or menu items--whatever suits your program.
363
+
364
+ You should also get your employer (if you work as a programmer) or your
365
+ school, if any, to sign a "copyright disclaimer" for the program, if
366
+ necessary. Here is a sample; alter the names:
367
+
368
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
369
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
370
+
371
+ <signature of Ty Coon>, 1 April 1989
372
+ Ty Coon, President of Vice
373
+
374
+ This General Public License does not permit incorporating your program into
375
+ proprietary programs. If your program is a subroutine library, you may
376
+ consider it more useful to permit linking proprietary applications with the
377
+ library. If this is what you want to do, use the GNU Lesser General
378
+ Public License instead of this License.
379
+
380
+ WRITTEN OFFER
381
+
382
+ The source code for any program binaries or compressed scripts that are
383
+ included with WordPress can be freely obtained at the following URL:
384
+
385
+ https://wordpress.org/download/source/
main.php ADDED
@@ -0,0 +1,167 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('ABSPATH')) exit;
3
+ if (!class_exists('MigrateGuru')) :
4
+
5
+ require_once dirname( __FILE__ ) . '/main/lib.php';
6
+ require_once dirname( __FILE__ ) . '/main/site_info.php';
7
+ require_once dirname( __FILE__ ) . '/main/auth.php';
8
+ require_once dirname( __FILE__ ) . '/main/db.php';
9
+
10
+ class MigrateGuru {
11
+ public $version = '1.88';
12
+ public $plugname = 'migrateguru';
13
+ public $brandname = 'Migrate Guru';
14
+ public $webpage = 'https://www.migrateguru.com';
15
+ public $appurl = 'https://mg.blogvault.net';
16
+ public $slug = 'migrate-guru/migrateguru.php';
17
+ public $plug_redirect = 'bvmgredirect';
18
+ public $badgeinfo = 'bvmgbadge';
19
+ public $logo = '../img/migrateguru.png';
20
+
21
+ public $ip_header_option = 'bvmgipheader';
22
+ public $brand_option = 'bvmgbrand';
23
+
24
+ public $lib;
25
+ public $info;
26
+ public $auth;
27
+ public $db;
28
+ function __construct() {
29
+ $this->lib = new MGLib();
30
+ $this->info = new MGSiteInfo($this->lib);
31
+ $this->auth = new MGAuth($this->info);
32
+ $this->db = new MGDb();
33
+ }
34
+
35
+ public function appUrl() {
36
+ if (defined('BV_APP_URL')) {
37
+ return BV_APP_URL;
38
+ } else {
39
+ $brand = $this->getBrandInfo();
40
+ if ($brand && array_key_exists('appurl', $brand)) {
41
+ return $brand['appurl'];
42
+ }
43
+ return $this->appurl;
44
+ }
45
+ }
46
+
47
+ public function getIPHeader() {
48
+ return $this->info->getOption($this->ip_header_option);
49
+ }
50
+
51
+ public function getBrandName() {
52
+ $brand = $this->getBrandInfo();
53
+ if ($brand && array_key_exists('menuname', $brand)) {
54
+ return $brand['menuname'];
55
+ }
56
+ return $this->brandname;
57
+ }
58
+
59
+ public function isMalcare() {
60
+ return $this->getBrandName() === 'MalCare - Pro';
61
+ }
62
+
63
+ public function isBlogvault() {
64
+ return $this->getBrandName() === 'BlogVault';
65
+ }
66
+
67
+ public function getBrandInfo() {
68
+ return $this->info->getOption($this->brand_option);
69
+ }
70
+
71
+ public function authenticatedUrl($method, $apicheck = null, $full = true) {
72
+ $_params = $this->auth->newAuthParams($this->version);
73
+ if ($apicheck) {
74
+ $_params['bvapicheck'] = $apicheck;
75
+ }
76
+ $qstr = http_build_query($_params);
77
+ if (!$full)
78
+ return $method."?".$qstr;
79
+ return $this->appUrl().$method."?".$qstr;
80
+ }
81
+
82
+ public function isConfigured() {
83
+ return $this->auth->defaultPublic();
84
+ }
85
+
86
+ public function getMonitTime() {
87
+ $time = $this->info->getOption('bvmonittime');
88
+ return ($time ? $time : 0);
89
+ }
90
+
91
+ public function unSetMonitTime() {
92
+ return $this->info->deleteOption('bvmonittime');
93
+ }
94
+
95
+ public function setMonitTime() {
96
+ return $this->info->updateOption('bvmonittime', time());
97
+ }
98
+
99
+ public function isActivePlugin() {
100
+ $expiry_time = time() - (3 * 24 * 3600);
101
+ return ($this->getMonitTime() > $expiry_time);
102
+ }
103
+
104
+ public function isProtectModuleEnabled() {
105
+ return ($this->info->getOption('bvptplug') === $this->plugname) &&
106
+ $this->isActivePlugin();
107
+ }
108
+
109
+ public function isDynSyncModuleEnabled() {
110
+ return ($this->info->getOption('bvdynplug') === $this->plugname) &&
111
+ $this->isActivePlugin();
112
+ }
113
+
114
+ public function pingbv($method) {
115
+ $body = array();
116
+ $this->info->basic($body);
117
+ $body['plug'] = $this->plugname;
118
+ $url = $this->authenticatedUrl($method);
119
+ $this->lib->http_request($url, $body);
120
+ }
121
+
122
+ public function setup($rand_secret) {
123
+ $this->info->updateOption('bvSecretKey', $rand_secret);
124
+ $this->info->updateOption($this->plug_redirect, 'yes');
125
+ $this->info->updateOption('bvActivateTime', time());
126
+ }
127
+
128
+ public function isActivateRedirectSet() {
129
+ if ($this->info->getOption($this->plug_redirect) === 'yes') {
130
+ $this->info->updateOption($this->plug_redirect, 'no');
131
+ return true;
132
+ }
133
+ return false;
134
+ }
135
+
136
+ public function activate() {
137
+ if (!isset($_REQUEST['blogvaultkey'])) {
138
+ ##BVKEYSLOCATE##
139
+ }
140
+ if ($this->isConfigured()) {
141
+ /* This informs the server about the activation */
142
+ $this->pingbv('/bvapi/activate');
143
+ } else {
144
+ $this->setup($this->lib->randString(32));
145
+ }
146
+ }
147
+
148
+ public function footerHandler() {
149
+ $bvfooter = $this->info->getOption($this->badgeinfo);
150
+ if ($bvfooter) {
151
+ echo '<div style="max-width:150px;min-height:70px;margin:0 auto;text-align:center;position:relative;">
152
+ <a href='.$bvfooter['badgeurl'].' target="_blank" ><img src="'.plugins_url($bvfooter['badgeimg'], __FILE__).'" alt="'.$bvfooter['badgealt'].'" /></a></div>';
153
+ }
154
+ }
155
+
156
+ public function deactivate() {
157
+ $this->pingbv('/bvapi/deactivate');
158
+ }
159
+
160
+ public static function uninstall() {
161
+ ##CLEARLPCONFIG##
162
+ ##CLEARFWCONFIG##
163
+ ##CLEARIPSTORE##
164
+ ##CLEARDYNSYNCCONFIG##
165
+ }
166
+ }
167
+ endif;
main/auth.php ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if (!defined('ABSPATH')) exit;
4
+ if (!class_exists('MGAuth')) :
5
+
6
+ class MGAuth {
7
+ public $info;
8
+ function __construct($info) {
9
+ $this->info = $info;
10
+ }
11
+
12
+ public function defaultPublic() {
13
+ return $this->info->getOption('bvPublic');
14
+ }
15
+
16
+ public function defaultSecret() {
17
+ return $this->info->getOption('bvSecretKey');
18
+ }
19
+
20
+ public function allKeys() {
21
+ $keys = $this->info->getOption('bvkeys');
22
+ if (!is_array($keys)) {
23
+ $keys = array();
24
+ }
25
+ $public = $this->defaultPublic();
26
+ $secret = $this->defaultSecret();
27
+ if ($public)
28
+ $keys[$public] = $secret;
29
+ $keys['default'] = $secret;
30
+ return $keys;
31
+ }
32
+
33
+ public function publicParam() {
34
+ if (array_key_exists('pubkey', $_REQUEST)) {
35
+ return $_REQUEST['pubkey'];
36
+ } else {
37
+ return $this->defaultPublic();
38
+ }
39
+ }
40
+
41
+ public function secretForPublic($public = false) {
42
+ $bvkeys = $this->allKeys();
43
+ if ($public && array_key_exists($public, $bvkeys) && isset($bvkeys[$public]))
44
+ return $bvkeys[$public];
45
+ else
46
+ return $this->defaultSecret();
47
+ }
48
+
49
+ public function addKeys($public, $secret) {
50
+ $bvkeys = $this->info->getOption('bvkeys');
51
+ if ($bvkeys && is_array($bvkeys))
52
+ $bvkeys[$public] = $secret;
53
+ else
54
+ $bvkeys = array($public => $secret);
55
+ $this->info->updateOption('bvkeys', $bvkeys);
56
+ }
57
+
58
+ public function updateKeys($publickey, $secretkey) {
59
+ $this->info->updateOption('bvPublic', $publickey);
60
+ $this->info->updateOption('bvSecretKey', $secretkey);
61
+ $this->addKeys($publickey, $secretkey);
62
+ }
63
+
64
+ public function rmKeys($publickey) {
65
+ $bvkeys = $this->info->getOption('bvkeys');
66
+ if ($bvkeys && is_array($bvkeys)) {
67
+ unset($bvkeys[$publickey]);
68
+ $this->info->updateOption('bvkeys', $bvkeys);
69
+ return true;
70
+ }
71
+ return false;
72
+ }
73
+
74
+ public function validate($public, $method, $time, $version, $sig) {
75
+ $secret = $this->secretForPublic($public);
76
+ if ($time < intval($this->info->getOption('bvLastRecvTime')) - 300) {
77
+ return false;
78
+ }
79
+ if (array_key_exists('sha1', $_REQUEST)) {
80
+ $sig_match = sha1($method.$secret.$time.$version);
81
+ } else {
82
+ $sig_match = md5($method.$secret.$time.$version);
83
+ }
84
+ if ($sig_match !== $sig) {
85
+ return $sig_match;
86
+ }
87
+ $this->info->updateOption('bvLastRecvTime', $time);
88
+ return 1;
89
+ }
90
+
91
+ public function newAuthParams($version) {
92
+ $args = array();
93
+ $time = time();
94
+ $public = $this->publicParam();
95
+ $secret = $this->secretForPublic($public);
96
+
97
+ $sig = sha1($public.$secret.$time.$version);
98
+ $args['sig'] = $sig;
99
+ $args['bvTime'] = $time;
100
+ $args['bvPublic'] = $public;
101
+ $args['bvVersion'] = $version;
102
+ $args['sha1'] = '1';
103
+ return $args;
104
+ }
105
+ }
106
+ endif;
main/db.php ADDED
@@ -0,0 +1,166 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if (!defined('ABSPATH')) exit;
4
+ if (!class_exists('MGDb')) :
5
+
6
+ class MGDb {
7
+ function dbprefix() {
8
+ global $wpdb;
9
+ $prefix = $wpdb->base_prefix ? $wpdb->base_prefix : $wpdb->prefix;
10
+ return $prefix;
11
+ }
12
+
13
+ function prepare($query, $args) {
14
+ global $wpdb;
15
+ return $wpdb->prepare($query, $args);
16
+ }
17
+
18
+ function getSiteId() {
19
+ global $wpdb;
20
+ return $wpdb->siteid;
21
+ }
22
+
23
+ function getResult($query, $obj = ARRAY_A) {
24
+ global $wpdb;
25
+ return $wpdb->get_results($query, $obj);
26
+ }
27
+
28
+ function query($query) {
29
+ global $wpdb;
30
+ return $wpdb->query($query);
31
+ }
32
+
33
+ function getVar($query, $col = 0, $row = 0) {
34
+ global $wpdb;
35
+ return $wpdb->get_var($query, $col, $row);
36
+ }
37
+
38
+ function getCol($query, $col = 0) {
39
+ global $wpdb;
40
+ return $wpdb->get_col($query, $col);
41
+ }
42
+
43
+ function tableName($table) {
44
+ return $table[0];
45
+ }
46
+
47
+ function showTables() {
48
+ $tables = $this->getResult("SHOW TABLES", ARRAY_N);
49
+ return array_map(array($this, 'tableName'), $tables);
50
+ }
51
+
52
+ function showTableStatus() {
53
+ return $this->getResult("SHOW TABLE STATUS");
54
+ }
55
+
56
+ function tableKeys($table) {
57
+ return $this->getResult("SHOW KEYS FROM $table;");
58
+ }
59
+
60
+ function describeTable($table) {
61
+ return $this->getResult("DESCRIBE $table;");
62
+ }
63
+
64
+ function checkTable($table, $type) {
65
+ return $this->getResult("CHECK TABLE $table $type;");
66
+ }
67
+
68
+ function repairTable($table) {
69
+ return $this->getResult("REPAIR TABLE $table;");
70
+ }
71
+
72
+ function showTableCreate($table) {
73
+ return $this->getVar("SHOW CREATE TABLE $table;", 1);
74
+ }
75
+
76
+ function rowsCount($table) {
77
+ $count = $this->getVar("SELECT COUNT(*) FROM $table;");
78
+ return intval($count);
79
+ }
80
+
81
+ function createTable($query, $name) {
82
+ $table = $this->getBVTable($name);
83
+ if (!$this->isTablePresent($table)) {
84
+ if (array_key_exists('usedbdelta', $_REQUEST)) {
85
+ if (!function_exists('dbDelta'))
86
+ require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
87
+ dbDelta($query);
88
+ } else {
89
+ $this->query($query);
90
+ }
91
+ }
92
+ return $this->isTablePresent($table);
93
+ }
94
+
95
+ function getTableContent($table, $fields = '*', $filter = '', $limit = 0, $offset = 0) {
96
+ $query = "SELECT $fields from $table $filter";
97
+ if ($limit > 0)
98
+ $query .= " LIMIT $limit";
99
+ if ($offset > 0)
100
+ $query .= " OFFSET $offset";
101
+ $rows = $this->getResult($query);
102
+ return $rows;
103
+ }
104
+
105
+ function isTablePresent($table) {
106
+ return ($this->getVar("SHOW TABLES LIKE '$table'") === $table);
107
+ }
108
+
109
+ function getCharsetCollate() {
110
+ global $wpdb;
111
+ if (method_exists($wpdb, 'get_charset_collate')) {
112
+ return $wpdb->get_charset_collate();
113
+ }
114
+ return '';
115
+ }
116
+
117
+ function getWPTable($name) {
118
+ return ($this->dbprefix() . $name);
119
+ }
120
+
121
+ function getBVTable($name) {
122
+ return ($this->getWPTable("bv_" . $name));
123
+ }
124
+
125
+ function truncateBVTable($name) {
126
+ $table = $this->getBVTable($name);
127
+ if ($this->isTablePresent($table)) {
128
+ return $this->query("TRUNCATE TABLE $table;");
129
+ } else {
130
+ return false;
131
+ }
132
+ }
133
+
134
+ function deleteBVTableContent($name, $filter = "") {
135
+ $table = $this->getBVTable($name);
136
+ if ($this->isTablePresent($table)) {
137
+ return $this->query("DELETE FROM $table $filter;");
138
+ } else {
139
+ return false;
140
+ }
141
+ }
142
+
143
+ function dropBVTable($name) {
144
+ $table = $this->getBVTable($name);
145
+ if ($this->isTablePresent($table)) {
146
+ $this->query("DROP TABLE IF EXISTS $table;");
147
+ }
148
+ return !$this->isTablePresent($table);
149
+ }
150
+
151
+ function deleteRowsFromtable($name, $count = 1) {
152
+ $table = $this->getBVTable($name);
153
+ if ($this->isTablePresent($table)) {
154
+ return $this->getResult("DELETE FROM $table LIMIT $count;");
155
+ } else {
156
+ return false;
157
+ }
158
+ }
159
+
160
+ function replaceIntoBVTable($name, $value) {
161
+ global $wpdb;
162
+ $table = $this->getBVTable($name);
163
+ return $wpdb->replace($table, $value);
164
+ }
165
+ }
166
+ endif;
main/lib.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if (!defined('ABSPATH')) exit;
4
+ if (!class_exists('MGLib')) :
5
+
6
+ class MGLib {
7
+ public function objectToArray($obj) {
8
+ return json_decode(json_encode($obj), true);
9
+ }
10
+
11
+ public function dbsig($full = false) {
12
+ if (defined('DB_USER') && defined('DB_NAME') &&
13
+ defined('DB_PASSWORD') && defined('DB_HOST')) {
14
+ $sig = sha1(DB_USER.DB_NAME.DB_PASSWORD.DB_HOST);
15
+ } else {
16
+ $sig = "bvnone".$this->randString(34);
17
+ }
18
+ if ($full)
19
+ return $sig;
20
+ else
21
+ return substr($sig, 0, 6);
22
+ }
23
+
24
+ public function randString($length) {
25
+ $chars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
26
+
27
+ $str = "";
28
+ $size = strlen($chars);
29
+ for( $i = 0; $i < $length; $i++ ) {
30
+ $str .= $chars[rand(0, $size - 1)];
31
+ }
32
+ return $str;
33
+ }
34
+
35
+ public function http_request($url, $body) {
36
+ $_body = array(
37
+ 'method' => 'POST',
38
+ 'timeout' => 15,
39
+ 'body' => $body);
40
+
41
+ return wp_remote_post($url, $_body);
42
+ }
43
+ }
44
+ endif;
main/site_info.php ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if (!defined('ABSPATH')) exit;
4
+ if (!class_exists('MGSiteInfo')) :
5
+
6
+ class MGSiteInfo {
7
+ public function getOption($key) {
8
+ $res = false;
9
+ if (function_exists('get_site_option')) {
10
+ $res = get_site_option($key, false);
11
+ }
12
+ if ($res === false) {
13
+ $res = get_option($key, false);
14
+ }
15
+ return $res;
16
+ }
17
+
18
+ public function deleteOption($key) {
19
+ if (function_exists('delete_site_option')) {
20
+ return delete_site_option($key);
21
+ } else {
22
+ return delete_option($key);
23
+ }
24
+ }
25
+
26
+ public function updateOption($key, $value) {
27
+ if (function_exists('update_site_option')) {
28
+ return update_site_option($key, $value);
29
+ } else {
30
+ return update_option($key, $value);
31
+ }
32
+ }
33
+
34
+ public function setTransient($name, $value, $time) {
35
+ if (function_exists('set_site_transient')) {
36
+ return set_site_transient($name, $value, $time);
37
+ }
38
+ return false;
39
+ }
40
+
41
+ public function deleteTransient($name) {
42
+ if (function_exists('delete_site_transient')) {
43
+ return delete_site_transient($name);
44
+ }
45
+ return false;
46
+ }
47
+
48
+ public function getTransient($name) {
49
+ if (function_exists('get_site_transient')) {
50
+ return get_site_transient($name);
51
+ }
52
+ return false;
53
+ }
54
+
55
+ public function wpurl() {
56
+ if (function_exists('network_site_url'))
57
+ return network_site_url();
58
+ else
59
+ return get_bloginfo('wpurl');
60
+ }
61
+
62
+ public function siteurl() {
63
+ if (function_exists('site_url')) {
64
+ return site_url();
65
+ } else {
66
+ return get_bloginfo('wpurl');
67
+ }
68
+ }
69
+
70
+ public function homeurl() {
71
+ if (function_exists('home_url')) {
72
+ return home_url();
73
+ } else {
74
+ return get_bloginfo('url');
75
+ }
76
+ }
77
+
78
+ public function isMultisite() {
79
+ if (function_exists('is_multisite'))
80
+ return is_multisite();
81
+ return false;
82
+ }
83
+
84
+ public function isMainSite() {
85
+ if (!function_exists('is_main_site' ) || !$this->isMultisite())
86
+ return true;
87
+ return is_main_site();
88
+ }
89
+
90
+ public function basic(&$info) {
91
+ $info['wpurl'] = $this->wpurl();
92
+ $info['siteurl'] = $this->siteurl();
93
+ $info['homeurl'] = $this->homeurl();
94
+ $info['serverip'] = $_SERVER['SERVER_ADDR'];
95
+ $info['abspath'] = ABSPATH;
96
+ return $info;
97
+ }
98
+ }
99
+ endif;
migrateguru.php ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Plugin Name: Migrate Guru
4
+ Plugin URI: https://www.migrateguru.com
5
+ Description: Migrating your site(s) to any WordPress Hosting platform has never been so easy.
6
+ Author: Migrate Guru
7
+ Author URI: http://www.migrateguru.com
8
+ Version: 1.88
9
+ Network: True
10
+ */
11
+
12
+ /* Copyright 2017 Migrate Guru (email : support@migrateguru.com)
13
+
14
+ This program is free software; you can redistribute it and/or modify
15
+ it under the terms of the GNU General Public License, version 2, as
16
+ published by the Free Software Foundation.
17
+
18
+ This program is distributed in the hope that it will be useful,
19
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
20
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
+ GNU General Public License for more details.
22
+
23
+ You should have received a copy of the GNU General Public License
24
+ along with this program; if not, write to the Free Software
25
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26
+ */
27
+
28
+ /* Global response array */
29
+
30
+ if (!defined('ABSPATH')) exit;
31
+ global $bvcb, $bvresp;
32
+
33
+ require_once dirname( __FILE__ ) . '/main.php';
34
+ $bvmain = new MigrateGuru();
35
+
36
+ register_uninstall_hook(__FILE__, array('MigrateGuru', 'uninstall'));
37
+ register_activation_hook(__FILE__, array($bvmain, 'activate'));
38
+ register_deactivation_hook(__FILE__, array($bvmain, 'deactivate'));
39
+
40
+ add_action('wp_footer', array($bvmain, 'footerHandler'), 100);
41
+
42
+ if (is_admin()) {
43
+ require_once dirname( __FILE__ ) . '/admin.php';
44
+ $bvadmin = new MGAdmin($bvmain);
45
+ add_action('admin_init', array($bvadmin, 'initHandler'));
46
+ add_filter('all_plugins', array($bvadmin, 'initBranding'));
47
+ add_filter('plugin_row_meta', array($bvadmin, 'hidePluginDetails'), 10, 2);
48
+ if ($bvmain->info->isMultisite()) {
49
+ add_action('network_admin_menu', array($bvadmin, 'menu'));
50
+ } else {
51
+ add_action('admin_menu', array($bvadmin, 'menu'));
52
+ }
53
+ add_filter('plugin_action_links', array($bvadmin, 'settingsLink'), 10, 2);
54
+ ##ACTIVATEWARNING##
55
+ add_action('admin_enqueue_scripts', array($bvadmin, 'mgsecAdminMenu'));
56
+ }
57
+
58
+ if ((array_key_exists('bvreqmerge', $_POST)) || (array_key_exists('bvreqmerge', $_GET))) {
59
+ $_REQUEST = array_merge($_GET, $_POST);
60
+ }
61
+
62
+ if ((array_key_exists('bvplugname', $_REQUEST)) &&
63
+ stristr($_REQUEST['bvplugname'], $bvmain->plugname)) {
64
+ require_once dirname( __FILE__ ) . '/callback.php';
65
+ $bvcb = new BVCallback($bvmain);
66
+ $bvresp = new BVResponse();
67
+ if ($bvcb->preauth() === 1) {
68
+ if ($bvcb->authenticate() === 1) {
69
+ if (array_key_exists('afterload', $_REQUEST)) {
70
+ add_action('wp_loaded', array($bvcb, 'execute'));
71
+ } else if (array_key_exists('adajx', $_REQUEST)) {
72
+ add_action('wp_ajax_bvadm', array($bvcb, 'bvAdmExecuteWithUser'));
73
+ add_action('wp_ajax_nopriv_bvadm', array($bvcb, 'bvAdmExecuteWithoutUser'));
74
+ } else {
75
+ $bvcb->execute();
76
+ }
77
+ } else {
78
+ $bvcb->terminate(false, array_key_exists('bvdbg', $_REQUEST));
79
+ }
80
+ }
81
+ } else {
82
+ ##PROTECTMODULE##
83
+ ##DYNSYNCMODULE##
84
+ }
readme.txt ADDED
@@ -0,0 +1,187 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Migrate Guru: Migrate & Clone WordPress Free ===
2
+ Contributors: migrateguru, backup-by-blogvault
3
+ Tags: migrate, migrate WordPress, WordPress migration, migration, clone, transfer, copy, move
4
+ Plugin URI: https://www.migrateguru.com/
5
+ Donate link: https://www.migrateguru.com/
6
+ Requires at least: 4.0
7
+ Tested up to: 5.2.1
8
+ Stable tag: trunk
9
+ License: GPLv2 or later
10
+ License URI: [http://www.gnu.org/licenses/gpl-2.0.html](http://www.gnu.org/licenses/gpl-2.0.html)
11
+
12
+ Migrate, Clone or Move your WordPress site to 5000+ web hosts with Migrate Guru. Proud Migration Partners for WP Engine, Pantheon, FlyWheel, etc.
13
+
14
+ == DESCRIPTION ==
15
+
16
+ Migrate Guru is the fastest way to migrate WordPress sites. It simplifies difficult WordPress migrations (e.g. multi-site networks, 200 GB sites, etc.).
17
+
18
+ Powered by BlogVault (an onboarding partner of top WordPress hosts in the world), Migrate Guru uses intelligent processes on its own servers… So there is ZERO risk to your sites. It automatically rewrites URLs, bypasses import-export scripts, and handles serialised data. It also can clone WordPress sites without any manual work, add-ons, or additional tools.
19
+
20
+ **OVERVIEW**
21
+
22
+ [youtube https://www.youtube.com/watch?v=iE0sC71uS9Q]
23
+
24
+ **TOP FEATURES**
25
+
26
+ = TRUE ONE-CLICK MIGRATION =
27
+
28
+ Move 80% faster! (Clone 1GB sites in <30 minutes). Enter host details & click ‘Migrate’. That’s it!
29
+
30
+ = NO OVERLOAD ON SITE =
31
+
32
+ The website transfer or migration process works on our servers, so it doesn’t crash your site.
33
+
34
+ = BUILT FOR LARGE SITES =
35
+
36
+ Move or clone sites as large as 200 GB in a breeze. Large site migrations usually fail because of live-site server import limits.
37
+
38
+ = NO ADDONS =
39
+
40
+ You don’t need add-ons to move multi-sites, or sites with serialised data.
41
+
42
+ = NO STORAGE SPACE REQUIRED =
43
+
44
+ Migrate Guru automatically copies your site to our servers. After the migration is complete, the copy is erased.
45
+
46
+ = COMPATIBLE WITH EVERY WEB HOST =
47
+
48
+ Move your site from & to *any web host*.
49
+
50
+ = FULLY AUTOMATIC, BUILT-IN SEARCH & REPLACE =
51
+
52
+ Comfortably handle serialised data with accurate Search&Replace.
53
+
54
+ = TIMELY ALERTS =
55
+
56
+ Sit back. Relax. Our real-time & email alerts will keep you up to date with the website migrate status.
57
+
58
+ = DISCLAIMER =
59
+
60
+ Currently we don't support:
61
+
62
+ * Local host migrations
63
+ * Migration of multi-site network sub-sites to a different domain or migration of a site to multi-site network subdivision.
64
+
65
+ = HOW TO PERFORM A MIGRATION =
66
+
67
+ 1. Install Migrate Guru on the site you want to clone.
68
+ 2. Install WordPress on the destination.
69
+ 3. Choose the destination web host that you want to clone your website to, enter details.
70
+ 4. Click ‘Migrate’.
71
+
72
+ = PROUD MIGRATION PARTNERS of WP Engine and Pantheon =
73
+
74
+ = SUPPORTS ALL 5,000+ WEB HOSTS AROUND THE WORLD =
75
+
76
+ WPEngine, Pantheon, FlyWheel, LiquidWeb, Cloudways, Savvii, DigitalOcean, Hostgator, Godaddy, Bluehost, SiteGround, Kinsta, AWS, Pressable, Webhostingtalk, Inmotion Hosting, Softlayer, Reverbnation, Homestead, Site5, Linode, Fatcow, Dreamhost, Liquid Web, Rackspace, etc.
77
+
78
+ == Installation ==
79
+
80
+ = Automatic installation =
81
+
82
+ 1. Log in to your WordPress dashboard, navigate to the Plugins menu. Click **Add New**.
83
+ 2. Type *Migrate Guru*, click *Install Now*, and activate it.
84
+
85
+ = Manual installation =
86
+
87
+ 1. In the search field type *Migrate Guru* and click *Search Plugins*.
88
+ 2. Click *Download*.
89
+ 3. Upload the .zip file to your web server via an FTP application. [Instructions here](http://codex.wordpress.org/Managing_Plugins#Manual_Plugin_Installation)
90
+
91
+ == Frequently Asked Questions ==
92
+
93
+ =What do I need to use MG?=
94
+ You’ll need:
95
+ * An account on the new web hosting service
96
+ * A domain on the new host, with WordPress installed
97
+ * The destination’s FTP/cPanel details
98
+
99
+ =How long does MG take to move a site?=
100
+ MG can move a 1 GB (files & database) site in <30 Mins*
101
+ (*Approximate & depends on a number of factors).
102
+
103
+ =Are there any limitations on the number of migrations?=
104
+ Yes. We’ve enforced a limit of 5 site migrations/user/month (developers can request to have this limit extended). This cap ensures that our servers aren’t overburdened. Each of the 5 sites can be moved unlimited times.
105
+
106
+ =Does MG backup my site?=
107
+ No.
108
+
109
+ =Do I need to have WordPress installed in the destination?=
110
+ Yes.
111
+
112
+ =Do I need to have MG installed in the destination to transfer my site?=
113
+ No. It’s only needed on the source site.
114
+
115
+ =Why do you need FTP/cPanel details?=
116
+ MG needs these details since FTP/cPanel is the safest way to move your site.
117
+
118
+ =How do I move a multi-site network?=
119
+ When installed on a WordPress multi-site network, the plugin automatically becomes ‘network activated’. Once this is done you can go by the same steps as a single site.
120
+
121
+ =Do you have a help guide/documentation?=
122
+ Yes, we do. You can access it here: https://migrateguru.freshdesk.com/support/home
123
+
124
+ == Screenshots ==
125
+
126
+ 1. Click on 'Migrate' leads to a choice of host-based or cPanel/FTP based migrations
127
+ 2. Selecting a web host to move your site to
128
+ 3. Enter host-specific details.
129
+ 4. Selecting cPanel
130
+ 5. Selecting FTP
131
+ 6. Click ‘Migrate’.
132
+
133
+ == Changelog =
134
+ = 1.88 =
135
+ * Callback improvements
136
+
137
+ = 1.86 =
138
+ * Updating tested upto 5.1
139
+
140
+ = 1.84 =
141
+ * Disable form on submit
142
+
143
+ = 1.82 =
144
+ * Updating tested upto 5.0
145
+
146
+ = 1.81 =
147
+ * Adding support for migrating non-WordPress folders
148
+
149
+ = 1.77 =
150
+ * Adding function_exists for getmyuid and get_current_user functions
151
+
152
+ = 1.76 =
153
+ * Removing create_funtion for PHP 7.2 compatibility
154
+
155
+ = 1.75 =
156
+ * New and improved UI
157
+
158
+ = 1.72 =
159
+ * Adding Misc Callback
160
+
161
+ = 1.71 =
162
+ * Adding logout functionality in the plugin
163
+
164
+ = 1.69 =
165
+ * Adding support for chunked base64 encoding
166
+
167
+ = 1.68 =
168
+ * Updating upload rows
169
+
170
+ = 1.66 =
171
+ * Updating TOS and privacy policies
172
+
173
+ = 1.64 =
174
+ * Bug fixes for lp and fw
175
+
176
+ = 1.62 =
177
+ * SSL support in plugin for API calls
178
+ * Adding support for plugin branding
179
+
180
+ = 1.53 =
181
+ * PHP 5.2 support
182
+
183
+ = 1.51 =
184
+ * Code Restructuring
185
+
186
+ = 1.49 =
187
+ * Releasing the Migrate Guru migration plugin into the WordPress repository.