gpt4 book ai didi

windows - 使用 Windows 命令提示符 (cmd.exe) 的 StackOverflow 信誉

转载 作者:可可西里 更新时间:2023-11-01 13:18:41 28 4
gpt4 key购买 nike

如何使用命令提示符脚本查看我的声誉?

(回复StackOverflow reputation using PowerShell,因为我无聊死了。)

最佳答案

@echo off & setlocal:: Supports curl, wget, plink, and ncset SoUID=YOUR UID HERE:: Example: set SoUID=49849set SoHost=stackoverflow.comset FlairPath=/users/flair/%SoUID%.jsonset FlairURL=http://%SoHost%%FlairPath%set TempTag=%SoHost%-%SoUID%-%random%set TempFile=%TEMP%\%TempTag%.jsonset Script=%TEMP%\%TempTag%.scriptset RawOut=%TEMP%\%TempTag%.outcall :Check curlif not "%App%"=="" "%App%" -o "%TempFile%" -s "%FlairURL%" & goto :Nextcall :Check wgetif not "%App%"=="" "%App%" -O "%TempFile%" -q "%FlairURL%" & goto :Nextcall :Check plinkif not "%App%"=="" call :MakeScript & "%App%" -raw %SoHost% -P 80 -batch  "%RawOut%" & goto :NextHdrcall :Check ncif not "%App%"=="" call :MakeScript & "%App%" %SoHost% 80  "%RawOut%" & goto :NextHdr>&2 echo curl, wget, plink or netcat not found. Downloading plink from PuTTY site.set App=%TEMP%\plink.execall :Mirror ftp.chiark.greenend.org.uk /users/sgtatham/putty-latest/x86/plink.exeif not exist "%App%" call :Mirror ftp.samurai.com /pub/putty/putty-latest/x86/plink.exeif not exist "%App%" call :Mirror ftp.totem.fix.no /pub/mirrors/putty/putty-latest/x86/plink.exeif not exist "%App%" call :Mirror ftp.ds5.agh.edu.pl /pub/putty/putty-latest/x86/plink.exeif not exist "%App%" goto :NoAppcall :MakeScript & "%App%" -raw %SoHost% -P 80 -batch  "%RawOut%" & del "%App%" & goto :NextHdr:Mirrorif exist "%App%" del "%App%"> "%Script%" echo=lcd "%TEMP%">>"%Script%" echo=binary>>"%Script%" echo=get %~2>>"%Script%" echo=byeftp -s:"%Script%" -A -v -i %~1 > nul 2> nulgoto :EOF:NextHdrfor /f "usebackq tokens=1,* delims=:" %%a in ("%RawOut%") do (    if [%%a]==[{"id"] set Flair=%%a:%%b & del "%Script%" "%RawOut%" & goto :Next2):NoApp>&2 echo Giving up. & goto :EOF:Nextif not exist "%TempFile%" echo Error downloading data. & goto :EOFset /p Flair=&2 echo Something went bad.) else (    if "%SoName%"=="" (        echo Your reputation is %SoReputation%.    ) else (        echo Reputation of %SoName% is %SoReputation%.    ))goto :EOF:Parseif "%~1"=="" goto :EOFset Line=%~1shiftif /i "%Line:~0,11%"=="reputation:" (    set SoReputation=%Line:~11%    goto :Parse)if /i "%Line:~0,12%"=="displayName:" (    set SoName=%Line:~12%    goto :Parse)goto :Parse:Checkset App=for %%e in (%PATHEXT%) do for %%i in (%1%%e) do if NOT "%%~$PATH:i"=="" set App=%%~$PATH:igoto :EOF:MakeScript> "%Script%" echo=GET %FlairPath% HTTP/1.1>>"%Script%" echo=Host: %SoHost%>>"%Script%" echo=Connection: close>>"%Script%" echo=goto :EOF

关于windows - 使用 Windows 命令提示符 (cmd.exe) 的 StackOverflow 信誉,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/951182/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com