Skip to content

Commit 2070b87

Browse files
committed
sucuri-cleanup
1 parent ea8487d commit 2070b87

8 files changed

Lines changed: 76 additions & 24 deletions

File tree

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,6 @@
4343
[submodule "multipart-robotstxt-editor"]
4444
path = multipart-robotstxt-editor
4545
url = git@github.com:szepeviktor/multipart-robotstxt-editor.git
46+
[submodule "frontend-debugger"]
47+
path = frontend-debugger
48+
url = git@github.com:szepeviktor/frontend-debugger.git

mu-protect-plugins/protect-plugins.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ class O1_Protect_Plugins {
2424

2525
/**
2626
* List of protected plugins.
27-
* Add your plugins here!
27+
*
28+
* Add your plugins here! jQuery one-liner to list plugin paths.
29+
*
30+
* var parser=document.createElement('a');jQuery('#wpbody .plugins .plugin-title .deactivate a').each(function(){parser.href=jQuery(this).attr('href');console.log(decodeURIComponent(parser.search.split('&')[1].split('=')[1]));});
2831
*
2932
* @var array
3033
* @access private

mu-smtp-uri/smtp-uri.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@ function o1_smtp_options( $mail ) {
7777
$mail->isSMTP();
7878
$mail->SMTPAuth = true;
7979

80-
/*
80+
/**
8181
* Bcc someone.
8282
*/
8383
//$mail->addBCC( '<BCC-ADDRESS', '<BCC-NAME>' );
84-
/*
84+
/**
8585
* Turn on debugging.
8686
*/
8787
//$mail->SMTPDebug = 4;

shared-hosting-aid/Malware.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@
33
## Check website
44

55
- http://sitecheck.sucuri.net/
6-
- http://urlfind.org/?site=
6+
- http://urlquery.net/
7+
- http://urlfind.org/
78

8-
## Emergency to-do
9+
## Emergency to-dos
910

1011
### Block direct PHP file access
1112

1213
```apache
14+
# BEGIN WordPress
1315
<IfModule mod_rewrite.c>
1416
RewriteEngine On
1517
RewriteBase /
@@ -19,6 +21,8 @@
1921
RewriteCond %{REMOTE_ADDR} !=<MY-IP-ADDRESS>
2022
RewriteRule . /index.php [L]
2123
</IfModule>
24+
25+
# END WordPress
2226
```
2327

2428
### Redirect all traffic to a cleaned `/index.html`
@@ -79,17 +83,20 @@ http://www.unphp.net/
7983
### Search for malware patterns
8084

8185
```
82-
grep -rI --include="*.php" "\$[a-zA-Z0-9_]\+(" *
86+
grep -rI --include="*.php" "\$[a-zA-Z0-9_]\+\s*(" *
8387
grep -ri '<iframe.*src=\|<script.*src=' *
84-
grep -ri 'eval(\|base64(\|<?\$\|?><?php' *
88+
grep -ri 'eval\s*(\|base64\s*(\|<?\$\|?><?php\|preg_replace\s*(.*e' *
8589
find -type f -mtime -30
8690
```
8791

88-
### Search DB dump
92+
### Search DB
8993

9094
- Search for found malware signatures
9195
- Search for malware patterns
9296

97+
https://github.com/interconnectit/Search-Replace-DB/raw/master/index.php
98+
https://github.com/interconnectit/Search-Replace-DB/raw/master/srdb.class.php
99+
93100
### Reinstall WordPress and plugins
94101

95102
Dashboard / Updates

shared-hosting-aid/README.md

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
```bash
44
SSLOFF="set ftp:ssl-allow off;"
55

6-
# lftp -e "$SSLOFF" -u 'FTP-USER,FTP_PASS' FTP_HOST.
7-
lftp -e "cd ~" -u 'FTP-USER,FTP_PASS' FTP_HOST.
6+
# lftp -e "$SSLOFF cd" -u 'FTP-USER,FTP_PASS' FTP_HOST.
7+
lftp -e "cd" -u 'FTP-USER,FTP_PASS' FTP_HOST.
88
```
99

1010
### Check hosting
@@ -280,3 +280,34 @@ exit;
280280
- Analytics @weekly
281281
- Google WMT @weekly
282282
- PageSpeed, webpagetest.org @weekly
283+
284+
### List WordPress plugin names and paths
285+
286+
```js
287+
plugin_names=jQuery('#wpbody .plugins .plugin-title strong').each(function (){console.log(jQuery(this).text());});
288+
289+
plugin_slugs=jQuery('#wpbody .plugins #the-list tr').each(function (){console.log(jQuery(this).attr('id'));});
290+
```
291+
292+
### Move/clone site
293+
294+
```bash
295+
# lftp
296+
mkdir sr; cd sr
297+
!wget -qN https://github.com/interconnectit/Search-Replace-DB/raw/master/index.php
298+
!wget -qN https://github.com/interconnectit/Search-Replace-DB/raw/master/srdb.class.php
299+
put index.php; put srdb.class.php
300+
#mrm *; rmdir sr
301+
```
302+
303+
#### Things to replace
304+
305+
1. http://domain.tld (no trailing slash)
306+
2. /var/www/path/to/site (no trailing slash)
307+
3. email@address.es
308+
4. domain.tld
309+
310+
#### Change salt
311+
312+
Sucuri plugin
313+
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
/*
3+
Plugin Name: Sucuri Scanner Firewall menu hider
4+
Description: Hide Firewall menu and Plugin advertisements.
5+
Version: 1.1.0
6+
*/
7+
8+
add_action( 'admin_menu', 'o1_sucuri_remove_firewall', 0 );
9+
add_filter( 'pre_option_' . 'sucuriscan_ads_visibility', 'o1_sucuri_ads_visibility', 9999 );
10+
add_filter( 'pre_update_option_' . 'sucuriscan_ads_visibility', 'o1_sucuri_ads_visibility', 9999 );
11+
12+
function o1_sucuri_remove_firewall() {
13+
global $sucuriscan_pages;
14+
15+
unset( $sucuriscan_pages['sucuriscan_monitoring'] );
16+
}
17+
18+
function o1_sucuri_ads_visibility( $value ) {
19+
20+
return 'disabled';
21+
}

shared-hosting-aid/sucuri-remove-firewall/sucuri-remove-firewall.php

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)