./avatar.png
should be the targeted avatar file.- Setup
Pyrogram
(MTProto
) at first: https://docs.pyrogram.ml/start/ProjectSetup.
View README.md
View get-cert-issuer.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Maintainer: Gowe Wang<i@gowe.wang> | |
# Reference: https://tools.ietf.org/html/rfc5280#section-4.2.2.1 | |
# Notice: Just available in most cases. | |
curl -s $(openssl x509 -in $1 -noout -text | grep -Po "((?<=CA Issuers - URI:)http://.*)$") | openssl x509 -inform DER -outform PEM |
View pptpclient@.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Modified from OpenVPN systemd service script. | |
[Unit] | |
Description=PPTP Client connection to %I | |
After=syslog.target network.target network-online.target | |
[Service] | |
PrivateTmp=true | |
Type=forking | |
ExecStart=/usr/bin/pon %i persist | |
PIDFile=/run/ppp0.pid |
View CNRoutesGen.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import urllib.request | |
import re | |
from collections import namedtuple | |
from math import log | |
def ip2num(ip_address: str) -> int: | |
a, b, c, d = map(int, ip_address.split(".")) | |
return (a << 24) + (b << 16) + (c << 8) + d |
View Timetable2iCal_SWU.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/dev python3 | |
# -*- coding: utf-8 -*- | |
import requests | |
import json | |
from ics import Calendar, Event | |
import arrow | |
from uuid import uuid4 | |
# Below are your credentials for log-in. |
View chaoxing.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/dev python3 | |
# -*- coding: utf-8 -*- | |
import requests | |
from bs4 import BeautifulSoup | |
import urllib.parse | |
import json | |
from PIL import Image | |
import pytesseract | |
import time |
View getRawPostData.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function getRawPostData(){ | |
$eol = "\r\n"; | |
$BOUNDARY = substr(ltrim(explode(";", $_SERVER["CONTENT_TYPE"])[1]), strlen("boundary=")); | |
$postData = ""; | |
foreach($_POST as $name => $value){ | |
$postData .= "--" . $BOUNDARY . $eol; | |
$postData .= 'Content-Disposition: form-data; name="' . $name . '"' . $eol . $eol; | |
$postData .= $value . $eol; | |
} |
NewerOlder