Skip to content

Instantly share code, notes, and snippets.

@kroko23
kroko23 / find_open_resolvers.pl
Created Dec 17, 2015 — forked from bitfolk/find_open_resolvers.pl
Quick bit of perl code to scan an IP range for open DNS resolvers. I use it to check for misconfigured customer resolvers on my network, so that I can hopefully open a ticket with the customer before they get used as a DDoS multiplier.
View find_open_resolvers.pl
#!/usr/bin/perl
use warnings;
use strict;
use Net::IP;
use Net::DNS;
use IO::Select;
use Getopt::Long;
use Pod::Usage;
@kroko23
kroko23 / password.txt
Created Oct 2, 2016 — forked from gabonator/password.txt
HiSilicon IP camera root passwords
View password.txt
Login Password
root xmhdipc
root klv123
root xc3511
root 123456
root jvbzd
default OxhlwSG8
defaul tlJwpbo6
defaul S2fGqNFs
root hi3518
@kroko23
kroko23 / camera.md
Created Oct 2, 2016 — forked from gabonator/camera.md
Cheap chinese IP camera with H264 encoding based on Hisilicon 8M (Hi3518E) chip
View camera.md

Cheap chinese IP camera with H264 encoding based on Hisilicon 8M (Hi3518E) chip

Video stream url for VLC/DVR:

  • rtsp://192.168.1.93:554/user=admin&password=&channel=&stream=.sdp?real_stream--rtp-caching=100

Telnet access

  • telnet 192.168.1.10 23
  • Localhost login: root
  • Password: xmhdipc
View Repair synology BTRFS volume
btrfs fi show -d
(/dev/mapper/vg1000-lv)
syno_poweroff_task -d
(or: umount /volume1)
(or2: umount /volume1 -f -k)
Check to see if all us unmounted:
df -h
View synology speed tweaks.md

Got and ssh into your box. Find what is using swap:

find /proc -maxdepth 2 -path "/proc/[0-9]*/status" -readable -exec awk -v FS=":" -v TOTSWP="$(cat /proc/swaps | sed 1d | awk 'BEGIN{sum=0} {sum=sum+$(NF-2)} END{print sum}')" '{process[$1]=$2;sub(/^[ \t]+/,"",process[$1]);} END {if(process["VmSwap"] && process["VmSwap"] != "0 kB") {used_swap=process["VmSwap"];sub(/[ a-zA-Z]+/,"",used_swap);percent=(used_swap/TOTSWP*100); printf "%10s %-30s %20s %6.2f%\n",process["Pid"],process["Name"],process["VmSwap"],percent} }' '{}' \;  | awk '{print $(NF-2),$0}' | sort -hr | head | cut -d " " -f2-

Update synoinfo.conf to correct memory in MB (https://www.gbmb.org/gb-to-mb) for 8GB:

/etc/synoinfo.conf & /etc.defaults/synoinfo.conf
mem_default_mb="8192"
View Synolgy_docker_backup.sh
#!/bin/bash
location=<your backup location>
date=`date "+%Y%m%d"`
for name in $(docker ps --format '{{.Names}}'); do
#Backup location per container
backup_location=$location"/"$name
#Make the directory when it doesn't exist