Hi
I am trying to recover a finance file that's required by the business. We have a script that I don't think contains anything sensitive in that encrypts the file and confirms to a log file:
CODE
setlocal enableextensions enabledelayedexpansion
Set logFile=%1
Set fileDir=%2
Set fileName=%3
Set timeoutSecs=%4
Set arcFile=%5
Set timeoutMillisecs=%timeoutSecs%000
Echo. >>%logFile%
Echo ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: >>%logFile%
Echo %date% %time% : %fileName% detected in %fileDir%. %timeoutSecs% seconds left to complete LloydsLink upload. >>%logFile%
PING 1.1.1.1 -n 1 -w %timeoutMillisecs% >NUL
SET /A myCount=0
for /f "tokens=1-11 delims= " %%a in (ArchiveLloydsFiles.dat) do (
Set /A myCount+=1
If !myCount! LSS 5 Set myDta=%%g%%b%%d%%d%%c%%h%%e%%a%%f%%f%%k%%j%%i%%d
)
"C:\Program Files\7-Zip\7za.exe" a -p%myDta% %arcFile% %fileDir%\%fileName% -mem=AES256>>%logFile%
Set myDta=HiddenFromYou
Del %fileDir%\%fileName% >NUL
If Exist %fileDir%\%fileName% (
Echo %date% %time% : Failed to delete %fileName% from %fileDir% >>%logFile%
) Else (
Echo %date% %time% : Deleted %fileName% from %fileDir% >>%logFile%
)
endlocal
ENDCODE
I guess it's the line:
Set myDta=%%g%%b%%d%%d%%c%%h%%e%%a%%f%%f%%k%%j%%i%%d
before it encrypts:
C:\Program Files\7-Zip\7za.exe" a -p%myDta% %arcFile% %fileDir%\%fileName% -mem=AES256>>%logFile%
I have low knowledge on 7za usage and switches, I have the .zip file that's encrypted but not sure if the first "set myDta" is genuinely random or if this is linked to something, and if there is anything I can do from a date/time stamp point of view. I cannot upload the zip as it's financial data.
Is there anything obvious I am missing for me to be able to unzip? Or is the above generating something random. I don't know why I would store the zip for example, if it's random and irretrievable.
I see this may not be the right place, so close this ticket from this location :)