Skip to content

Instantly share code, notes, and snippets.

View mnixry's full-sized avatar
😴
Sleeping

Mix mnixry

😴
Sleeping
View GitHub Profile
@mnixry
mnixry / scrcpy.Dockerfile
Created May 28, 2024 19:08
Running Scrcpy in Docker with VNC support.
# stage for building scrcpy
FROM ubuntu:latest AS builder
RUN apt-get update && \
apt-get install -y --no-install-recommends \
curl gcc git pkg-config meson ninja-build libsdl2-dev ca-certificates \
libavcodec-dev libavdevice-dev libavformat-dev libavutil-dev \
libswresample-dev libusb-1.0-0-dev libswscale-dev libvncserver-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
@mnixry
mnixry / class_ical.py
Last active February 26, 2024 14:57
Generate iCalendar file for BUPT class schedule.
"""
Generate iCalendar file for BUPT class schedule.
Usage:
python this_file.py <username> <password>
Note:
1. You need to install the following packages:
- httpx
- ics
@mnixry
mnixry / remarkable2-chinese-user-checklist.md
Last active March 12, 2024 05:49
reMarkable2 国内用户自救指南

reMarkable2 国内用户自救指南

请在系统更新/出厂设置后食用。

将设备连接至电脑,打开Settings -> General -> About -> Copyrights and License, 翻到最底部可以看到系统root密码。

在电脑上使用 ssh root@10.11.99.1 进行连接,下列说明均基于已连接到的前提。

中文字体

@mnixry
mnixry / ast.py
Created December 18, 2023 08:39
Python Jail, QWB2023, by @crazymanarmy
import ast
BAD_ATS = {
ast.Attribute,
ast.Subscript,
ast.comprehension,
ast.Delete,
ast.Try,
ast.For,
ast.ExceptHandler,
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env
RUN apt-get update && \
apt-get install -y --no-install-recommends git && \
git clone https://github.com/LagrangeDev/Lagrange.Core /app
WORKDIR /app
RUN dotnet publish Lagrange.OneBot/Lagrange.OneBot.csproj \
--self-contained \
-p:PublishSingleFile=true \
@mnixry
mnixry / shell_client.c
Last active November 8, 2023 15:48
Reverse shell with TTY and RC4 obfuscated traffic.
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <unistd.h>
#include <pty.h>
#include <time.h>
#include <arpa/inet.h>
#include <signal.h>
#include <sys/select.h>
#include <sys/wait.h>
@mnixry
mnixry / hashcash_pow.py
Created October 30, 2023 06:56
Pure Python implementation for HashCash proof-of work, friendly for CTF.
from typing import Optional
import re
from pwn import *
def mint(
resource: str,
bits: int = 20,
now: Optional[float] = None,
ext: str = "",
@mnixry
mnixry / base3050.php
Created September 27, 2023 00:28
Base3050 Challenge (TSCTF-J 2023)
<?php
class BaseN
{
protected $charset;
protected $reverseCharset;
public function __construct(array $charset)
{
$this->charset = $charset;
<!DOCTYPE html>
<head>
<meta charset="UTF-8" />
<title>Document</title>
</head>
<body>
<div id="app" class="container">
<div class="info">
<svg
xmlns="http://www.w3.org/2000/svg"
from functools import cached_property
from timeit import timeit
class BaseN:
def __init__(self, charset: str) -> None:
self.charset = charset
self.reverse_charset = {c: i for i, c in enumerate(charset)}
assert len(self.charset) == len(self.reverse_charset), "charset must be unique"