I have been trying for a while now to get a batch file to check a discord nitro gift code to see if it is valid. I used code from a token checker but cant figure out what I need to change to make it work. when it runs and I put the nitro codes (or any text) in they return as valid when they are not.
:tokenchecker
echo [40;37mDrag the tokens file (.txt) to the console
set /p tpath="[40;30m.[40;37mPath: "
echo.
if not exist %tpath% echo [40;31m[-] File not found &pause>nul & exit
for /F "usebackq tokens=*" %%T in ("%tpath%") do (
curl -s -H "Content-Type: application/json" -H "Authorization: %%T" https://discordapp.com/api/v8/users/@me > %temp%\tokenchecker.json
find /i "401: Unauthorized" %temp%\tokenchecker.json >nul
if errorlevel 1 (
echo [40;32m[+] %%T
echo %%T>>hits.txt
) else (
echo [40;31m[-] %%T
del %temp%\tokenchecker.json /q /f )
)
echo.
echo [40;37mValid tokens have been saved in [40;32mhits.txt
pause
:nitrochecker
echo [40;37mDrag the nitro gifts file (.txt) to the console
set /p tpath="[40;30m.[40;37mPath: "
echo.
if not exist %tpath% echo [40;31m[-] File not found &pause>nul & exit
for /F "usebackq tokens=*" %%T in ("%tpath%") do (
curl -s -H "Content-Type: application/json" -H "Authorization: %%T" https://discordapp.com/api/v6/entitlements/gift-codes/ > %temp%\tokenchecker.json
find /i "401: Unauthorized" %temp%\tokenchecker.json >nul
if errorlevel 1 (
echo [40;32m[+] %%T
echo %%T>>nitrohits.txt
) else (
echo [40;31m[-] %%T
del %temp%\tokenchecker.json /q /f )
)
echo.
echo [40;37mValid nitro gifts have been saved in [40;32mnitrohits.txt
I changed this link: https://discordapp.com/api/v8/users/@me to https://discordapp.com/api/v6/entitlements/gift-codes/ but that didn't work. If anyone could help me that would be great.