Skip to content

Instantly share code, notes, and snippets.

View jindaxia's full-sized avatar
💊
a commit a day keeps your girlfriend away

虾哥哥 jindaxia

💊
a commit a day keeps your girlfriend away
View GitHub Profile
@CODeRUS
CODeRUS / README.md
Last active October 2, 2023 09:27
Klipper + moonraker + KlipperScreen linuxdeploy android install

Prerequisites

  • Disto: Debian
  • Version: stable
  • Size: at least 4000
  • Username and password: please set
  • Autorun: enable
  • Init system: sysv
  • Mount folders: one can enable android folder mount for config and gcode
  • SSH: enable
@LupusArgentum
LupusArgentum / openwrt-8021x.md
Last active April 21, 2024 11:43
OpenWrt-router as 802.1x-client

OpenWrt-router as 802.1x-client

This use-case is a pretty rare one, but in some circumstances, it can be very helpful. For example when you live in a student dormatory which only offers one 802.1x-encrypted LAN-port in your room, but you want to run your own wifi-network to be online with other clients, too, like your laptop or smartphone. In this case, normal routers with stock firmware won't help you out because most don't support this networking protocol. OpenWrt on the other hand offers you the possibility to connect your router (you could buy this one if you don't already have a suiting router) to the 802.1x-network via WAN and enable you to have an own, independent network. Here's how.

Important: before you attempt to do this, it is NECESSARY to ask your network admin if he/she is okay with your usage scenario. This can cause some trouble if you do it without permission, as many 802.1x-networks aim to prevent this exact use-case.

So here's the deal

@stecman
stecman / dump-pyc-with-gdb.md
Last active March 25, 2024 09:20
Dumping all bytecode from a packaged Python application

This is a technique for extracting all imported modules from a packaged Python application as .pyc files, then decompiling them. The target program needs to be run from scratch, but no debugging symbols are necessary (assuming an unmodified build of Python is being used).

This was originally performed on 64-bit Linux with a Python 3.6 target. The Python scripts have since been updated to handle pyc files for Python 2.7 - 3.9.

Theory

In Python we can leverage the fact that any module import involving a .py* file will eventually arrive as ready-to-execute Python code object at this function:

PyObject* PyEval_EvalCode(PyObject *co, PyObject *globals, PyObject *locals);