Skip to content

Instantly share code, notes, and snippets.

View badmonkey7's full-sized avatar
🐟
moyu

badmonkey badmonkey7

🐟
moyu
View GitHub Profile
;Custom_OpenClash_Rules
;全分组防 DNS 泄漏订阅转换模板
;作者:https://github.com/Aethersailor
;项目地址:https://github.com/Aethersailor/Custom_OpenClash_Rules
;基于 ACL4SSR 模板魔改而来,感谢原作者!
;<必须>搭配本项目配套教程,实现最佳化的 OpenClash 使用效果!
;教程:https://github.com/Aethersailor/Custom_OpenClash_Rules/wiki/OpenClash-%E8%AE%BE%E7%BD%AE%E6%96%B9%E6%A1%88
;有问题可提 issue,或者加入本项目 Telegram 群组进行讨论
;Telegram 群组:https://t.me/custom_openclash_rules_group
;Telegram 通知频道:https://t.me/custom_openclash_rules
DOMAIN-SUFFIX,byr.pt
@badmonkey7
badmonkey7 / tea.py
Created August 22, 2021 13:50 — forked from twheys/tea.py
Python implementation of the Tiny Encryption Algorithm (TEA)
# coding: utf-8
"""
Implementation of the Tiny Encryption Algorithm (TEA) for Python
https://en.wikipedia.org/wiki/Tiny_Encryption_Algorithm
Example Usage:
import tea
# The key must be 16 characters
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocksConfig version="1">
<editor>
<colour_sets>
<ACTIVE_COLOUR_SET>
<str>
<![CDATA[modnokai night shift v2]]>
</str>
</ACTIVE_COLOUR_SET>
<ACTIVE_LANG>
@badmonkey7
badmonkey7 / extract.py
Created November 14, 2020 11:00
提取当前目录下所有的压缩文件到对应的文件夹下
#! /usr/bin/python
'''
@author: badmonkey
@software: PyCharm
@file: extract.py.py
@time: 2020/11/14 下午6:31
'''
import os
# 获取当前路径
pwd = os.getcwd()
@badmonkey7
badmonkey7 / dynamic_task.sh
Created October 25, 2020 15:44
根据task.py文件,动态生成flag及其需要的数据,并打包成附件到指定文件夹中
#! /usr/bin/bash
# 动态附件的数量
if [ $# -lt 2 ]; then
echo "请指定动态附件的数量,及题目名称!如:dynamic_task.sh 10 simple_math";
exit 0;
else
number=$1
save_path=$2
fi
@badmonkey7
badmonkey7 / change_screen.sh
Created October 2, 2020 13:46
manjaro 高分辨率问题
#! /bin/bash
# cvt 1920 1080 40 (height ,weight,fps)
xrandr --newmode "1920x1080_40" 110.50 1920 2016 2208 2496 1080 1083 1088 1108 -hsync +vsync
xrandr --addmode eDP1 "1920x1080_40"
xrandr --output eDP1 --mode "1920x1080_40"
@badmonkey7
badmonkey7 / exp1.py
Created September 22, 2020 11:54
金融密码部分题解
#!/usr/bin/python3
# @Author : badmonkey
# @FileName: exp.py
# @Software: PyCharm
# https://en.wikipedia.org/wiki/Slide_attack
f = open("ciphertext",'r').readlines()
cipher = []
@badmonkey7
badmonkey7 / exp.py
Created September 19, 2020 15:35
2020第五空间题解
from Crypto.Util.number import *
from sage.all import *
def lcg(seed,a,b,m):
x = seed%m
while True:
x = (a*x+b)%m
yield x
def decrypt(key,leak_data):
a,b,m = key
@badmonkey7
badmonkey7 / lfsr_recover.py
Created September 19, 2020 15:31
basic-lfsr-recover
#!/usr/bin/python3
# @Time : 2020-09-19 22:03:20
# @Author : badmonkey
# @FileName: Recover.py
# @Software: PyCharm
from sage.all import *
def lfsr_msb(R, mask, N):
'''