Skip to content

Instantly share code, notes, and snippets.

View olkitu's full-sized avatar

Minh Truong olkitu

View GitHub Profile
@olkitu
olkitu / .htaccess
Created March 7, 2019 21:11
Redirect WordPress site to HTTPS exclude Let's Encrypt Webroot directory
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# End WordPress
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} !^/\.well\-known/acme\-challenge/
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
@olkitu
olkitu / nginx.conf
Created March 7, 2019 21:10
Block accessto WordPress directory and files
location = ~* /xmlrpc.php {
deny all;
access_log off;
log_not_found off;
}
location = ~* /wp-config.php {
deny all;
log_not_found off;
}
@olkitu
olkitu / .htaccess
Created March 7, 2019 21:09
Block access to Wordpress files and directory
Options -Indexes
<files xmlrpc.php>
order allow,deny
deny from all
</files>
<files wp-config.php>
order allow,deny
deny from all
</files>
<files ~ "^.*\.([Hh][Tt][Aa])">
@olkitu
olkitu / php_haittakoodi_metsastys.md
Last active March 21, 2019 14:08
PHP-haittaohjelman mestästyskoodi

Tässä on yleinen ohje PHP haittakoodin metsästämiseen. Tätä voi käyttää eri sisällönhaittaohjelmistojen PHP-haittakoodin mestästämiseen.

Etsi eval()-funktiota

Etsi PHP-haittakoodiaeval() haitallisia koodeja. Eval-koodi usein kertoo että sivuston tiedostoissa on haitallista koodia. Kaikki eval()-funktiolla ei ole haitallista koodia kuten class-pclzip.php tiedostossa on ihan Wordpressin omaa koodia.

Lisää tiedostot mistä eval() funktio löytyy:

grep -lr --include=*.php -PHn "(eval\(.*\);)" .
@olkitu
olkitu / overrideconfig
Last active March 31, 2020 05:55
EVS_SWB and EVS_WB config for Qualcomm Phones. More info on my blog: https://wp.me/p92Xl7-Gc
[DPL:Common]
*ParamSrc = 4
[QIPCALL:EVS_1]
#Bandwidth, 0 = NB, 1 = WB, 2 = SWB, 3 = FB, 4 = NB-WB, 5 = NB-SWB, 6 = NB-FB
*Bandwidth = 5
# Bitrate: 127 = 5.9 - 24.4Kbps
*BitRate = 127
*ch_aw_recv = 0

Keybase proof

I hereby claim:

  • I am olkitu on github.
  • I am olkitu (https://keybase.io/olkitu) on keybase.
  • I have a public key ASAizXrvQIXsIiBAWmys3_Z5gNewZlz_E35a7epRfhB1dAo

To claim this, I am signing this object: