使用 powershell 设置 linux 机器免密登录
> type ~\.ssh\id_rsa.pub | ssh root@10.168.10.144 "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"
2024-1-16 10:49
|
884
|
|
1 字
|
几秒读完
adb 列出用户当前运行用户 ID
# 返回当前用户 id .\adb.exe shell am get-current-user .\adb.exe shell cmd activity get-current-user # alternative command .\adb.exe shell 'dumpsys activity | grep mCurrentUser&…
2023-12-23 21:49
|
1,216
|
|
31 字
|
1 分钟内
Android 开启副屏操作流程
开启开发者模式 使用命令开启副屏 ./adb.exe shell settings put global overlay_display_devices 1920x1080/180 多个副屏的话 .\adb.exe shell "settings put global overlay_display_devices '1920x…
2023-12-23 19:57
|
1,107
|
|
420 字
|
2 分钟
windows 下检测应用端口
# 列出指定进程名的监听端口 netstat -aon | findstr $(Get-Process adb -ErrorAction SilentlyContinue).Id 0..100 | % { Start-Sleep 1 ; netstat -aon | ? { $_ -like '*5432*' -and $_ -…
2023-12-09 15:37
|
818
|
|
13 字
|
1 分钟内
解码 rdp 或是 rdg 远程配置文件中的密码
# https://superuser.com/questions/1103193/decrypt-rdp-password-stored-in-rdg-file # 解码 rdp 或是 rdg 远程配置文件中的密码 # 使用 SysinternalsSuite 的 RDCMan 模块中的函数进行解密 $rdcmanPath = Get-Proce…
2023-11-05 20:36
|
698
|
|
35 字
|
2 分钟
python 命令
python.exe -m venv .venv source .venv/bin/activate # linux .venv/bin/activate.ps1 # windows python.exe -m pip install -r .\requirements.txt --proxy=192.168.0.90:17890 python -…
2023-10-22 22:44
|
1,128
|
|
14 字
|
1 分钟内
linq 一样使用 powershell
引用自这里 这是对应的 pdf 文件 [TOP] 数组 定义 # 定义数组 $myArray = @( “a”,”b”,”c”,”d”,”e”,”f”,”g”,”h” ) $myArray = “a”,”b”,”c”,”d”,”e”,”f”,”g”,”h” $myArray = @(25) $myArray = ,25 [int[]] $a = 1…
2023-10-22 14:07
|
436
|
|
311 字
|
13 分钟
windows 免密登录 linux
# 生成密钥 ssh-keygen -t rsa ## windows # 使用 type 代替 cat 复制公钥至 linux 机器 type ~\.ssh\id_rsa.pub | ssh root@10.168.10.138 -p 12025 "cat >> .ssh/authorized_keys" ## l…
2023-10-12 23:05
|
1,243
|
|
10 字
|
1 分钟内
uiautomatorviewer 无法执行
# uiautomatorviewer.bat 需要 java 8.0 $programDir = ${env:ProgramFiles(x86)} $javaDir = [System.IO.Path]::Combine($programDir, 'Java\jre-1.8') $javaBin = [System.IO.Pa…
2023-9-10 18:30
|
1,153
|
|
26 字
|
2 分钟