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 / 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
@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 / dnsmasq-wlan
Created May 5, 2018
Start dnsmaq when connected to wifi
View dnsmasq-wlan
#!/bin/bash
# Write file /etc/network/if-up.d/ and link to /etc/network/if-post-down.d/
# by default, scripts on that directories will be triggered by NetworkManager
PID="/var/run/dnsmasq/wlan.pid"
WLAN="wlan0"
DNSMASQCONF="/etc/dnsmasq.conf"
IP=$(ifconfig $WLAN | sed -En 's/.*inet ([0-9\\.]+) .+/\1/p')
ME="$IFACE-dnsmasq:"
@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 / histat-fast-load.html
Created May 13, 2018
Histat Code quick load
View histat-fast-load.html
<!-- OLD CODE: -->
<!-- Histats.com START (aync)-->
<script type="text/javascript">var _Hasync= _Hasync|| [];
_Hasync.push(['Histats.start', '1,3630122,4,0,0,0,00010000']);
_Hasync.push(['Histats.fasi', '1']);
_Hasync.push(['Histats.track_hits', '']);
(function() {
var hs = document.createElement('script'); hs.type = 'text/javascript'; hs.async = true;
hs.src = ('//s10.histats.com/js15_as.js');
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(hs);
@ndunks
ndunks / stats.php
Last active Jun 21, 2018
PHP-FPM status wrapper for each serverpilot web apps
View stats.php
<?php
/**
* Serverpilot PHP-FPM Status wrapper for all apps
* Install required package:
* $ sudo apt install libfcgi-bin
*
* Add .htaccess:
* RewriteRule ^php\-stats/ stats.php [NC,L]
*
* Place this script on 'default' web app.
@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 / how-to-mount-ubifs.sh
Last active Jan 13, 2020
an UbiFS Example, Nand_sim MTDBlock Ubi UbiFS playgrond and poc for Linux PC
View how-to-mount-ubifs.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
if [ ! -f ubinize.cfg ]; then
@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!
@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';
You can’t perform that action at this time.