Skip to content

Instantly share code, notes, and snippets.

at work

Gabriel Valky gabonator

at work
View GitHub Profile
gabonator / hikvision.js
Created May 16, 2021
Nodejs downloads still image from hikvision nvr
View hikvision.js
// nodejs script for downloading still images from hikvision nvr
// uses request-digest for basic http authenticatication
// Still images are available at this url:
var digestRequest = require('request-digest')('user', 'password');
var fs = require('fs');
var cam = 3;
View MainForm.cs
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.IO.Ports;
using System.Resources;
using System.Text.RegularExpressions;
using System.Windows.Forms;
namespace UartRc522
gabonator / aut64.h
Created Oct 6, 2020
Aut64 cryptographic functions in C++
View aut64.h
// Aut64 cryptographic module, Gabriel Valky 2020
// based on
// rewritten from python to C++ and implemented decryption function
#include <iostream>
#include <iomanip>
#define COUNT(a) (sizeof(a)/sizeof(a[0]))
class Aut64
gabonator / mt1000.cpp
Last active Apr 6, 2021
AMScope MT1000 camera driver
View mt1000.cpp
// AmScope MT1000 camera (Anchor Chips Inc. 10M USBCam) test application
// Reverse engineered camera driver using Wireshark by Gabriel Valky
// libusb code based on Christophe Augier CDC-ACM USB example
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <cassert>
#include <libusb-1.0/libusb.h>
gabonator / etherdream2_test.js
Created Jan 5, 2020
Etherdream 2 ethernet ILDA interface in nodejs
View etherdream2_test.js
// Ether dream 2 test
var Parser = require("binary-parser").Parser;
handler = () => 0;
var phase = 0;
function buildBuffer()
var n = 5000;
gabonator / server.js
Created Apr 4, 2019
nodejs web server with cors workaround
View server.js
const express = require('express');
const app = express();
const spawn = require('child_process').spawn;
const request = require('request');"/cors/*", function(req, res)
var url = decodeURIComponent(req.url.substr(6));
var body = '';
gabonator / orangepi.txt
Last active Jan 9, 2021
orange pi iot 2g notes
View orangepi.txt
General notes on OrangePi boards:
On the download page you will find many SD card images but not a single image works as one would expect.
Do not forget to set the boot switch to SDCARD instead of NAND!!!! If you are not sure what are you doing, try turning the device on
without SD card and if it is booting, it uses NAND. You will also notice this after logging in, when you are not able to create or modify
any file, since the FS is mounted as read only.
There is on board UART running at unusual 921600 bauds next to USB port (GND/RX/TX), or for OrangePi IOT 3G you need to connect to
USART2 on extension header. Use putty on windows or screen on linux/osx to talk to this device. If you receive garbage even when
the baudrate is correct, check your UART connection if it is correctly grounded or power the orangePi directly from USB port of your
computer. If you will receive shitload of debugging messages, reduce them by calling
gabonator / ps2002h.txt
Last active Nov 9, 2019
PS2002H/TP3016M power supply uart commands
View ps2002h.txt
pcb markings: MPT3050A-V5.6 2015-08-06 QJB7.820.290 698580
sold as PS2002H or Tekpower TP3016M
On the PCB there is CN2 connector with pins: TX, GND, RX. It is a uart at 115200 bauds which
generates some debugging information from STM32F100 processor.
It does not respond to common AT commands, neither to any random characters transmitted over
uart, list of some received messages follows. If you will find out what protocol this device
uses, please let us know in comments section
gabonator / monitor.ino
Created Jun 24, 2018
ESP8266 uart monitor and uploader
View monitor.ino
#include <ESP8266WiFi.h>
const char* ssid = "*********";
const char* password = "*********";
const int bufferLength = 4096;
int bufferIndex = 0;
char buffer[bufferLength];
char bufferTemp[bufferLength];
long lastSend = 0;
gabonator / sygichud.ino
Last active Apr 14, 2020
Sygic navigation external HUD display with ESP32 TTGO board with 128x64 pixel oled display and Wifi
View sygichud.ino
// Sygic navigation external HUD display with ESP32 TTGO board with 128x64 pixel oled display and Wifi
// Board description: 16 Mt Bytes (128 Mt bit) Pro ESP32 OLED V2.0 TTGO For Arduino ESP32 OLED WiFi Mo
// Board info:
// Board installation for arduino:
// Used libraries:
// Websocket protocol: