Skip to content

Instantly share code, notes, and snippets.

@cuter44
cuter44 / zfbot.js
Last active July 9, 2018 03:06
正方抢课脚本
var zfbot = {
interval:5000,
data:null,
count:null,
started:false,
load_jq:function()
{
var jq = document.createElement("script");
jq.type = "text/javascript";
jq.src = "http://libs.baidu.com/jquery/1.10.2/jquery.min.js";
  1. 开启ipv4转发
vi /etc/sysctl.conf
# 将net.ipv4.ip_forward=0更改为net.ipv4.ip_forward=1
sysctl -p
  1. 安装dnsmasq 和pdnsd解决dns污染

DNS的解析方案为 resolve.conf ==> dnsmasq ==> pdnsd

@kekru
kekru / 01nginx-tls-sni.md
Last active June 19, 2024 17:24
nginx TLS SNI routing, based on subdomain pattern

Nginx TLS SNI routing, based on subdomain pattern

Nginx can be configured to route to a backend, based on the server's domain name, which is included in the SSL/TLS handshake (Server Name Indication, SNI).
This works for http upstream servers, but also for other protocols, that can be secured with TLS.

prerequisites

  • at least nginx 1.15.9 to use variables in ssl_certificate and ssl_certificate_key.
  • check nginx -V for the following:
    ...
    TLS SNI support enabled
@SwimmingTiger
SwimmingTiger / README.md
Last active September 24, 2022 13:58
向日葵控控A2(OrayKVM)U盘救砖/USB恢复模式说明/免U盘刷机教程

控控A2是向日葵推出的IP KVM硬件盒子,通过模拟USB键鼠输入,并采集显卡HDMI输出,使受控电脑不需要安装远控软件就能被远程控制,甚至还能远程控制电脑进BIOS调设置,甚至远程重装系统,还是非常好用的。 https://sunlogin.oray.com/personal/kongkong2/

不过,这盒子还提供了SSH功能,而且还是root权限的。虽然会话chroot了,但要记住“chroot不是安全措施”。所以“chroot后的根目录看起来什么也没有”完全不能阻止我折腾。位于“SSH会话根目录之外”的sunlogin_client进程被我逆向了一番,顺便发现了它的隐藏功能(斗鱼直播推流)该怎么用(用法之后写)。

此外,通过直接访问/dev/mtdblock2,我完成了原厂固件的备份。然后用file命令确定这是squashfs固件,于是安装squashfs-tools进行解压、修改和重打包。

然后我就试着用dd命令把修改后的固件刷入控控,然而刷完就开不了机了。我猜也是如此,很多mtd设备用dd if=/dev/new.img of=/dev/mtdblock2这样的命令是无法正确写入的。

@veltlion
veltlion / natter-hook.sh
Last active March 31, 2024 05:05
Natter/NATMap 打洞后自动更新 qBittorrent/Transmission 监听端口和 OpenWrt 防火墙规则/iptables 规则 并推送到 Telegram
#!/bin/sh
# Natter
protocol=$1
inner_ip=$2
inner_port=$3
outter_ip=$4
outter_port=$5
# ipv4hex=$(printf '%02x' ${outter_ip//./ })
# ip4p="2001::$(printf '%2x' ${outter_port}):${ipv4hex:0:4}:${ipv4hex:4}"