Skip to content

Instantly share code, notes, and snippets.

View olkitu's full-sized avatar

Minh Truong olkitu

View GitHub Profile

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:

@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
@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 / .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 / 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: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 / .htaccess
Created March 7, 2019 21:12
Block access to PHP files on wp-content/upload, wp-content and wp-include directory
<Files ~ "\.ph(?:p[345]?|t|tml)$">
deny from all
</Files>
@olkitu
olkitu / functions.php
Created March 7, 2019 21:13
Hide WordPress version
<?php
remove_action('wp_head', 'wp_generator');
function wpbeginner_remove_version() {
return '';
}
add_filter('the_generator', 'wpbeginner_remove_version');
@olkitu
olkitu / Caddyfile
Last active May 18, 2019 14:42
Caddy WebServer configuration for Wordpress
example.org www.example.org {
tls username@example.org # Email for Let's Encrypt
root /var/www
gzip
fastcgi / /run/php/php7.2-fpm.sock php {
except /wp-content/upload
}
rewrite {
if {path} not_match ^\/wp-admin
if {path} not_match ^\/wp-includes
@olkitu
olkitu / ianmacd.json
Last active June 10, 2019 06:25
Magisk Repo for Sony X1
{
"app": {
"version": "v7.0.1-2019032801-ianmacd",
"versionCode": "2019032801",
"link": "https://github.com/ianmacd/MagiskBuilds/raw/94eafcd8679c1590c14f8375c3c1a97c6f65c40b/MagiskManager-v7.0.1-2019032801-ianmacd.apk"
},
"magisk": {
"version": "18.2-2019032801-ianmacd",
"versionCode": "2019032801",
"link": "https://github.com/ianmacd/MagiskBuilds/raw/94eafcd8679c1590c14f8375c3c1a97c6f65c40b/Magisk-v18.2-2019032801-ianmacd.zip",