Skip to content

Instantly share code, notes, and snippets.

@npenin
npenin / notes.md
Last active February 7, 2022 11:46
Reverse engineering netatmo TCP protocol

Goal

Understand the traffic going it and potentially setup a local server mimicing the cloud behaviour

Spec

  • 4500 Start byte
  • XXXX Message length (including start byte)
  • XXXX Sequence number
  • XXXX Direction ? (4000 : cloud->local, 0000 : local -> cloud)
FROM alpine:latest
RUN apk add cups cups-libs cups-client cups-filters
COPY ./cupsd.conf /etc/cupsd.conf
RUN mkdir /home/print
RUN adduser -h /home/print -D print
#RUN adduser print sudo
RUN adduser print lp
RUN adduser print lpadmin
#RUN #&& sed -i '/%sudo[[:space:]]/ s/ALL[[:space:]]*$/NOPASSWD:ALL/' /etc/sudoers
@npenin
npenin / bing.sh
Created June 18, 2020 03:52
bing wallpaper download
wget -O - "http://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1&mkt=en-US" 2>/dev/null | jq .images[0].url -r | sed -n -e "s/^/http:\/\/www.bing.com/p" | xargs wget -O bing.jpg
@npenin
npenin / socksproxy.js
Last active June 30, 2016 09:11 — forked from telamon/socksproxy.js
Socks5 proxy implementation in Node.JS
// http://www.ietf.org/rfc/rfc1928.txt
// Tested with: curl http://www.google.se/ --socks5 1080 --proxy-user foo:bar
var States = {
CONNECTED:0,
VERIFYING:1,
READY:2,
PROXY: 3
};
@npenin
npenin / server.js
Created December 22, 2015 16:31 — forked from mixonic/server.js
Node.js + Socket.io + Bash. A collaborative terminal for your browser.
//
// This server will start a bash shell and expose it
// over socket.io to a browser. See ./term.html for the
// client side.
//
// You should probably:
//
// npm install socket.io
// curl -O https://github.com/LearnBoost/Socket.IO/raw/master/socket.io.min.js
//