суббота, 15 июля 2017 г.

Cloud Lockers

Lockers with cloud synchronization of account data. Opens a door when you bring your card close to reader.
https://t.co/SU5b5Ht5hn

Connectivity: RS-485
Server-side: Sqlite3 + Nodejs
Client-side: AngularJS
Type of access card: Em-Marine


GUI of lockers management software
Screenshots.





FAQ Dreambox DM800 HD.


Речь пойдет о Дримбоксе 800hd с прошивкой Gemini Enigma 5x, image 07.21.2010, kernel 2.16
  1. Q: Как удаленно войти в командную консоль консоль (SSH) ?
    A:
    ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 root@192.168.1.120

  2. Q: Как скопировать файлы на dreambox (по SSH) ?
    A: 
    scp -r -oKexAlgorithms=+diffie-hellman-group1-sha1 enigma2-plugin-wicardd\ 1.18-dm800hd\,se-gemini  root@192.168.1.120:/home/root

  3. Q: Как временно сменить адрес шлюза по умолчанию для получения интернета с резервного роутера?
    A:
    допустим есть резервный роутер с
     адресом 192.168.1.203, тогда выполним:
    ip route replace default via 192.168.1.203 dev wlan0
    для возврата к основному роутеру 203 надо заменить на 1 или др.

  4. Q: После перехода на плагин wicard происходят подвисания, приходится перезапускать плагин.
    A:
    - по возможности обновитесь до версии 1.19 [1]
    - в конфигурационном файле wicardd.conf в раздел настроек [reader] добавьте опции auto_update = 1, ecm_ttl = 5000, reconnect_delay = 20
    [reader]
    active = 1
    name = shara
    account = login:pass@server
    multiport = 5000
    type = newcamd525
    debug = 0
    auto_update = 1
    ecm_ttl = 5000
    reconnect_delay = 20
  5. Q: Как настроить запуск wicardd в качестве плагина графической оболочки Enigma?
    A:
    добавьте скрипт /usr/script/wicardd_cam.sh, см. файл в проекте [2].

  6. Q: Как распаковать пакет Cam-Wicardd-OpenPLI_1.19-RAED.ipk ?
    A:
    ar -xv Cam-Wicardd-OpenPLI_1.19-RAED.ipk

  7. Q: После выхода из стенд-бая пропал сигнал, не показывают даже каналы без кодировки.
    A: Возможные причины:
    - пыль, осевшая на дорожках платы -- снимите верхнюю крышку и аккуратно пропылесосьте
    - высохшие / вспучившиеся электролитические конденсаторы -- замените их.

  8. Q:  Как добавить в систему wiicard в виде плагина
    A:
    cat > /usr/script/wicardd_cam.sh << EOF
    #!/bin/sh
    CAMD_ID=7387
    CAMD_NAME="wicardd"
    CAMD_BIN=wicardd
    INFOFILE_A=ecm0.info
    INFOFILE_B=ecm1.info
    INFOFILE_C=ecm2.info
    INFOFILE_D=ecm3.info
    INFOFILE_E=ecm4.info
    INFOFILE_F=ecm5.info
    INFOFILE_LINES=1111111111000000
    REZAPP=0
    logger \$0 \$1
    echo \$0 \$1
    remove_tmp () {
    rm -rf /tmp/*.info* /tmp/*.tmp*
    }
    
    case "\$1" in
      start)
      remove_tmp
      /usr/bin/\$CAMD_BIN -d -c /etc/tuxbox/config/wicardd.conf
      ;;
      stop)
      killall -9 \$CAMD_BIN 2>/dev/null
      sleep 2
      remove_tmp
      ;;
      *)
      \$0 stop
      exit 0
      ;;
    esac
    
    exit 0
    EOF
    

четверг, 22 июня 2017 г.

How to debug https without root on Android

One viable option -- use app called “Packet Capture”. This is vpn with embedded proxy & certificate authority, thanks to wich it’s capable to capture data in SSL.

This app saved me a lot of time, and it requres no root.
https://play.google.com/store/apps/detailsid=app.greyshirts.sslcapture&rdid=app.greyshirts.sslcapture

At the moment still has one limitation: cannot capture SLL on non-standard port. Problem already reported to the author.

понедельник, 19 декабря 2016 г.

Automatically respawning socat.

When user disconnects from socat the process terminates, so you have to restart it.
To automate this process, you can use /etc/inittab.


Here
2345 -- is enumeration of runlevels for which process is started,
s1 -- is a unique sequence of 1-4 characters which identifies an entry in inittab.

This socat configuration is used to provide access to serial port (UART / RS-485) over TCP/IP.

воскресенье, 20 ноября 2016 г.

Using Makefile with MSVC on example of libsqlite3_unicode

Cygwin Makefile can be used for building C programs with Visual Studio C compiler in simple regular way without .sln files.

Here I have an examaple on GitHub: https://github.com/Zensey/sqlite3_unicode
It is an minimized extension w/o external dependencies, which adds support of Unicode to sqlite3 used for search and sort operations with non-latin strings.

To build this extension under Windows platform simply run make in Cygwin terminal or run mk.cmd. Below you can see how this Makefile is arranged. Note, that variable M is used to set target architecture of executable object.


вторник, 8 ноября 2016 г.

Setup Syncthing as a service on Windows

To setup and start Syncthing as a service:
- download Syncthing, unpack
- download nssm.exe and put it into directory of syncthing
- put syncthing-svc-setup-win32.bat script into directory of syncthing
- run syncthing-svc-setup-win32.bat as Administrator