# 2>nul || cd "%~dp0" && python "%~nx0" %* && goto :eof
print('Hello World')
''' 2>nul
@echo off
# 2>nul || cd "%~dp0" && python "%~nx0" %* && goto :eof
print('Hello World')
''' 2>nul
@echo off
import cv2 | |
import numpy as np | |
import win32con | |
import win32gui | |
import win32ui | |
class Screencap(object): | |
def __init__(self, class_name, window_name): | |
self.hwnd = win32gui.FindWindow(class_name, window_name) |
import asyncio | |
async def main(): | |
# do something | |
pass | |
if __name__ == '__main__': | |
loop = asyncio.new_event_loop() | |
try: | |
loop.run_until_complete(main()) |
L.append(x)
L1.extend(L2)
x = L[i]
x = L.pop()
L1[i:j] = L2
L.sort()
x = y
/** | |
* code in inject.js | |
* added "web_accessible_resources": ["injected.js"] to manifest.json | |
*/ | |
var script = document.createElement('script'); | |
script.src = chrome.extension.getURL('injected.js'); | |
script.onload = function() { | |
this.remove(); | |
}; | |
(document.head || document.documentElement).appendChild(script); |
adb shell
进入终端dumpsys activity | grep mFocusedWindow | grep -Eo '{.+}'
import re | |
import os | |
from fpdf import FPDF | |
pdf_file = FPDF(unit='pt', format=(2112, 3158)) # 页面尺寸 | |
pdf_file.set_auto_page_break(False) # 关闭自动分页 | |
pdf_file.set_left_margin(0) # 设置页边距 | |
pdf_file.set_top_margin(0) | |
images = os.listdir('images/') |
async def ainput(prompt: str = ''): | |
with ThreadPoolExecutor(1, 'ainput') as executor: | |
return ( | |
await asyncio.get_event_loop().run_in_executor(executor, input, prompt) | |
).rstrip() |
ActivityThread = Java.use('android.app.ActivityThread')
let mApplication = ActivityThread.currentActivityThread().mInitialApplication.value
Java.classFactory.loader
不正常,可用下面的方法尝试修复adb kill-server && adb -a nodaemon server start
接下来执行 adb forward
等操作,可以从 127.0.0.1
以外的地方访问