dhcp-script=/etc/detect_new_device.sh
Reference:
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # Author: ficapy | |
| import io | |
| from urllib.parse import urlencode | |
| from base64 import b64encode | |
| from pdf2image import convert_from_bytes | |
| from PyPDF2 import PdfFileWriter, PdfFileReader |
dhcp-script=/etc/detect_new_device.sh
Reference:
| function decodeBase62(number) { | |
| var alphabet = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
| var out = 0 | |
| var len = number.length - 1 | |
| for (var t = 0; t <= len; t++) { | |
| out = out + alphabet.indexOf(number.substr(t, 1)) * Math.pow(62, len - t) | |
| } | |
| return out | |
| } |
| #!/usr/bin/python | |
| import socket, os, select, struct | |
| import errno | |
| import logging | |
| from logging import info, warn, error | |
| logging.root.setLevel(logging.INFO) |
Located in alphabetical order (not prefer)
Cab), also designed as a more modern replacement, written in Cgolang)golang)Cgolang)| #!/usr/bin/python | |
| # -*- coding: utf-8 -*- | |
| # __author__ = 'ihciah' | |
| # cid_hash_file function from https://github.com/binux/lixian.xunlei/blob/master/libs/tools.py | |
| import hashlib | |
| import inotify.adapters | |
| import os | |
| import requests | |
| import re |
After a couple of days of trying to get ipkg woking on my DS214 I found this article by trepmag. It is written for the DS213j, but it’s been working for me and others for the DS214 too.
I have done some minor changed to clarify some things, but if you are a Linux guy (unlike me) my changes might be of no use to you.
| #!/bin/bash | |
| mount_disk() | |
| { | |
| sudo umount $disk | |
| mkdir ~/Desktop/$diskname | |
| sudo mount_ntfs -o rw,auto,nodev,nobrowse,noowners,noatime $disk ~/Desktop/$diskname | |
| echo "Mount $disk to ~/Desktop/$diskname" | |
| open ~/Desktop/$diskname | |
| } |