hackmd 用的圖床 imgur 要清掉舊圖了
怕 hackmd 文件裡面的圖全都被清光 所以來備份一下
- 設定 > 筆記設定 > 備份 > 下載所有筆記
- 解壓縮
- 把 image.py 搬進去同個資料夾
- 執行 image.py
wget -i url.txt
來下載所有圖片
import json | |
from urllib.parse import parse_qs | |
import requests as r | |
from bs4 import BeautifulSoup as Soup | |
import concurrent.futures | |
HEADERS = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/114.0"} |
import subprocess | |
command = """powershell -Command \"(Get-WmiObject -Query \\"Select SerialNumber FROM Win32_BIOS\\")[\\"SerialNumber\\"].ToString()\"""" | |
serial_number = subprocess.check_output(command, shell=True).decode().strip() | |
print("Serial Number:") | |
print(serial_number) | |
str1 = serial_number[10:10+3] | |
text = serial_number[13:13+5] |
writeup: hackmd
textbox-demo: https://acsc-2023-quals-pcap-preview.pages.dev/preview
import random | |
from random import randint | |
print("1-1", "11-11", "11-0", "1-0", sep="\n") | |
for i in range(100): | |
op = random.choice(("+", "-")) | |
if op == "-": | |
a = randint(2**10, 2**20) | |
b = randint(0, a) | |
else: |
import json | |
with open("cac.json", "r", encoding="utf-8") as f: | |
cac_db = json.load(f) | |
with open("ntut.json", "r", encoding="utf-8") as f: | |
ntut = json.load(f) | |
with open("ntust.json", "r", encoding="utf-8") as f: | |
ntust = json.load(f) |
async function sleep(ms) { | |
return new Promise((res, rej) => { | |
setTimeout(() => { res() }, ms); | |
}); | |
} | |
(async () => { | |
$('#adult').click(); | |
await sleep(500); | |
$('.vast-skip-button').addClass('enabled'); |
This script read ckap.txt
and auto login for ckap
You can setup your network manager to run this script if connected to ckap.
This script used requests
, you can install from pip.
If your account is ck1071234
and password is mypasword
Separate account and password with space
Save ckap.txt
with content:
len = (document.querySelector('._6CZji .coreSpriteRightChevron')) ? document.querySelectorAll('div.tN4sQ li._-1_m6').length : 1 | |
index = 1 | |
timer = setInterval(doing,500) | |
urls = [] | |
function doing() { | |
imgs = document.querySelectorAll('._97aPb img') | |
if (index == 1){ | |
urls.push(imgs[0].getAttribute('src')) | |
} else { | |
urls.push(imgs[1].getAttribute('src')) |
/* required ES6 */ | |
var fs = require('fs'); | |
var path = require('path'); | |
var json = JSON.parse(fs.readFileSync(path.resolve(__dirname, "./message.json"), 'utf8')); | |
var messages = json["messages"]; | |
/* var messages = [ | |
{ | |
"sender_name": "Tony Yang", | |
"timestamp": 1526469371, |