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
window["setPosition"] = (...args) => { console.log(args); }; | |
window["jsperform"] = (...args) => { console.log(args); }; | |
// 探测登录页面中,用户名文本框、密码文本框和登录按钮的位置 | |
;(function() { | |
// 退出前做的工作 | |
var exit = () => { | |
// 通知机器人 js 执行完毕 | |
window.jsperform("login"); | |
}, setPosition = (x, y) => { |
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
# -*- coding: utf-8 -*- | |
""" | |
pip install cryptography | |
""" | |
import os | |
import sys | |
from cryptography.hazmat.backends import default_backend | |
from cryptography.hazmat.primitives.ciphers import (Cipher, algorithms, modes) |
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
# Only used for testing the docker images | |
# from: https://github.com/elastic/elasticsearch/blob/master/distribution/docker/docker-compose.yml | |
version: '3.4' | |
services: | |
elasticsearch-default-1: | |
image: elasticsearch:test | |
environment: | |
- node.name=elasticsearch-default-1 | |
- cluster.initial_master_nodes=elasticsearch-default-1,elasticsearch-default-2 | |
- discovery.seed_hosts=elasticsearch-default-2:9300 |
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 | |
ANDROID_VERSION=29.0.2 | |
[ "x$ANDROID_HOME" = "x" ] && ANDROID_HOME=/data/android/sdk | |
APKSIGNER=$ANDROID_HOME/build-tools/$ANDROID_VERSION/bin/apksigner | |
keytool -genkeypair -keystore debug.keystore -alias debug -validity 36500 -keyalg RSA -keysize 2048 | |
#keytool -list -v -keystore debug.keystore | |
$APKSIGNER sign --v2-signing-enabled false --ks debug.store xxx.apk |
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 parse($str) { | |
$s = ltrim($str, '|@.'); | |
$host = null; | |
if (false !== strpos($s, '//')) { | |
$url = parse_url($s); | |
if (!empty($url['host'])) { | |
$host = $url['host']; | |
} |
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
FROM php:7.3-fpm | |
MAINTAINER Simon Kuang<me@simonkuang.com> | |
RUN ([ -f /etc/apt/sources.list ] && mv /etc/apt/sources.list /etc/apt/sources.list.bak) \ | |
&& echo "# Tsinghua Tuna Mirror" > /etc/apt/sources.list \ | |
&& echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main non-free contrib" >> /etc/apt/sources.list \ | |
&& echo "deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main non-free contrib" >> /etc/apt/sources.list \ | |
&& echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main" >> /etc/apt/sources.list \ | |
&& echo "deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main" >> /etc/apt/sources.list \ | |
&& echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main non-free contrib" >> /etc/apt/sources.list \ |
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 | |
_DIR=$(cd "$(dirname "$0")";pwd) | |
cd $_DIR | |
## ============== retrieve rpms and prepare repo meta data | |
yum install -y createrepo | |
_ID=$(docker run --rm centos:7.2.1511 /bin/bash -c "sleep 10800") | |
export _ID |
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 | |
yum install -y epel-release | |
yum install -y gcc gcc-c++ glibc glibc-devel curl git \ | |
libffi-devel sqlite-devel bzip2-devel bzip2 readline-devel | |
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | /bin/bash | |
cat <<EOF >> $HOME/.bashrc | |
# Load pyenv automatically by adding | |
# the following to ~/.bash_profile: | |
export PATH="/root/.pyenv/bin:\$PATH" |
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 | |
# Only for MacOS | |
brew install nmap | |
for i in $(nmap -p3389 192.168.1.0/24 | grep -B5 "3389/tcp open" | grep "report for" | awk "{print \$5}"); do | |
echo $i: $(smbutil status $i | awk '!(NR%3){print $2}') | |
done |
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
windows CMD命令大全及详细解释和语法 | |
引用: | |
http://letle.iteye.com/blog/169045 | |
http://www.cppblog.com/kyelin/archive/2007/04/21/22540.aspx | |
windows批处理程序中的特殊字符 | |
批处理介绍 | |
纯以dos系统而言,可执行程序大约可以细分为五类,依照执行优先级由高到低排列分别是: | |
DOSKEY宏命令(预先驻留内存) |