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
# 启动任意 wsa 程序 | |
Start-Process "wsa://jp.co.craftegg.band" | |
timeout 3 | Out-Null | |
Remove-NetFirewallRule -DisplayName "WSLCore" | Out-Null # 删除旧的防火墙规则并重新添加 | |
New-NetFirewallRule -DisplayName "WSLCore" -Direction Inbound -InterfaceAlias "vEthernet (WSLCore)" -Action Allow | Out-Null | |
# 获取 WSA IP | |
$ip = Get-NetIPAddress -InterfaceAlias 'vEthernet (WSLCore)' -AddressFamily IPV4 | Select-Object -ExpandProperty IPAddress | |
Write-Output "添加端口映射" | |
netsh interface portproxy reset # 清除端口映射规则,然后重新添加,wsa 访问 28080 将会转发到 windows 的 127.0.0.1:8080 |
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 selenium.webdriver import Chrome, ChromeOptions | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.support.select import Select | |
from requests import get | |
from requests.exceptions import RequestException | |
# from selenium.webdriver import Remote | |
query_ip_url = "https://4.ipw.cn" | |
# query_ip_url = "https://ipinfo.io" |
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
@echo off | |
pushd %~dp0 | |
%1 start "" mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c ""%~s0"" ::","","runas",1)(window.close)&&exit | |
echo "判断当前状态..." | |
bcdedit /enum {default} | find /I "hypervisorlaunchtype Auto" > nul | |
if %errorlevel% == 0 ( | |
bcdedit /set {current} HyperVisorLaunchType OFF | |
echo "Hyper-V 已关闭!" | |
) else ( |
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/sh | |
# https://github.com/Sucareto/Android_HID_Keyboard | |
device_path="/config/usb_gadget/KB216" | |
ms_file="/data/data/com.termux/files/home/storage/tmp/mass_storage.img" | |
# create mass_storage image file | |
# dd if=/dev/zero of=$ms_file bs=1024MiB count=1 | |
# fallocate -l 1G $ms_file | |
# loop_device=$(losetup -f) |
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
[Version] | |
signature="$CHICAGO$" | |
[DefaultInstall] | |
CopyFiles = Scheme.Cur | |
AddReg = Scheme.Reg,Wreg | |
[DestinationDirs] |
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 time import sleep | |
keycode = { | |
"KEY_1": '\x1e', # Keyboard 1 and ! | |
"KEY_2": '\x1f', # Keyboard 2 and @ | |
"KEY_3": '\x20', # Keyboard 3 and # | |
"KEY_4": '\x21', # Keyboard 4 and $ | |
"KEY_5": '\x22', # Keyboard 5 and % | |
"KEY_6": '\x23', # Keyboard 6 and ^ | |
"KEY_7": '\x24', # Keyboard 7 and & | |
"KEY_8": '\x25', # Keyboard 8 and * |
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
str1 = "E0 06 00 0F 40 01 03 59" | |
REQ = str1.split(" ") | |
print(REQ) | |
rSYN, rESC, rLEN, rSUM, rESCsw = 0, 0, 0, 0, False | |
if REQ[0] == "E0": | |
rSYN = "E0" | |
rESC = "D0" | |
rLEN = int(REQ[1], 16) |
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
#include <Wire.h> | |
#include <PN532_I2C.h> | |
#include <PN532.h> | |
PN532_I2C pn532i2c(Wire); | |
PN532 nfc(pn532i2c); | |
#define SerialDevice SerialUSB //32u4,samd21 |
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
import os | |
for i in os.listdir('source'): | |
with open('source/' + i, 'rb') as f: | |
print(i + " : ") | |
data = f.read() | |
index = data[0:].find(b'DDS') | |
os.mkdir(i[:-4]) | |
while True: | |
endindex = data[index+1:].find(b'DDS') | |
if endindex == -1: |
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
@echo off | |
echo "确保文件夹内包含 avrdude.exe,avrdude.conf,libusb0.dll,32u4Serial.ino.promicro.hex,Upload.py,Upload.spec,icon.ico 这些文件" | |
pause | |
pyinstaller -F -i icon.ico Upload.spec | |
pause |
NewerOlder