@penpen, what if i encode whole binary file into base64.
It seems to me that encoding and decoding works well with certutil. But even encoded binary can't be extracted without damaging encoded code using findstr.
Is there any flags, internal (native) tools that can extract encoded base64 code without damaging it?
I'm almost sure it's possible, but the findstr is not getting right settings to do so, so it cuts something out.
example of the encoded binary (only some part of it) with base64 using certutil:
Code: Select all
TVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAA+AAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5v
dCBiZSBydW4gaW4gRE9TIG1vZGUuDQ0KJAAAAAAAAABFILttAUHVPgFB1T4BQdU+
CDlGPjdB1T7cvho+AEHVPty+GD4DQdU+AUHUPghA1T7cvh4+CEHVPty+Gz4XQdU+
3L4CPiRB1T7cvhw+AEHVPty+GT4AQdU+UmljaAFB1T4AAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAABQRQAAZIYHALFCUFQAAAAAAAAAAPAAIgALAgsAAMICAACuAgAAAAAA
IG4AAAAQAAAAAABAAQAAAAAQAAAAAgAABgADAAYAAwAGAAMAAAAAAADQBQAABAAA
R64FAAMAYMEAABAAAAAAAADADwAAAAAAAAAQAAAAAAAAEAAAAAAAAAAAAAAQAAAA
AAAAAAAAAAB4+AQAgAIAAAAwBQBYhAAAALAEAFA3AAAAAAAAAAAAAADABQBMAQAA
iKMCADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQbQEAlAAAAAAAAAAAAAAA
APAEAHAIAAD4oAIAYAAAAAAAAAAAAAAAAAAAAAAAAAAudGV4dAAAAOzAAgAAEAAA
AMICAAAEAAAAAAAAAAAAAAAAAAAgAABgLmRhdGEAAABAwQEAAOACAADCAQAAxgIA
AAAAAAAAAAAAAAAAQAAAwC5wZGF0YQAAUDcAAACwBAAAOAAAAIgEAAAAAAAAAAAA
AAAAAEAAAEAuaWRhdGEAAMIoAAAA8AQAACoAAADABAAAAAAAAAAAAAAAAABAAABA
LmRpZGF0AACAAAAAACAFAAACAAAA6gQAAAAAAAAAAAAAAAAAQAAAwC5yc3JjAAAA
WIQAAAAwBQAAhgAAAOwEAAAAAAAAAAAAAAAAAEAAAEAucmVsb2MAAEwBAAAAwAUA
AAIAAAByBQAAAAAAAAAAAAAAAABAAABCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
I have no idea how to extract encoded base64 binary from batch safely, so i'm asking for help.
Ps. i actually want to place more than one small file into batch. But i'm guessing it might be really hard to do so or even imposible?
Why i want that? I want it because i and others don't want to download those little tools like wget everytime on every new computer.
I want to automate the process for sure. Some tasks batch can't do it self or it's not that simple.
Yes, maybe wget can be replaced with powershell, but it have restrictions and can't be automated that fast... requires for people interuption to enable use of script for the first time... And so on.
Yeah there is work around with vbscripts... But let's be honest, there is no need to tell whole story why i decided choose encoding executable and merge with batch. It is not going to help finding solution for extracting base64 safely.
Difference between original base64 and extractted is only 29 bytes...
Okey, everything seems to work. Thanx everybody who tried to help.
Except for the multifile output.