Post by Stefan ClaasI decoded the image and had one error in the certutil file
(one byte missing in one line at the end). The video was
a bad .mp4, which I could not decode.
How did you manage to precisely insert 12 QR-Codes nicely on
an A4 page?
Some time ago I wrote a batch to make a paper backup
from a 13 kByte binary file (so it will make only two
pages with 12 QR codes each). The input file is hard
coded (t.jpg in this case). qrencode.exe I downloaded
somewhere from the internet and convert.exe is the
universal picture tool from https://imagemagick.org .
split.exe just splits the input file in small chunks
to be encoded in single QR code (source at the end of
this post). To get the binary back from the paper print,
you have just to start a text editor and scan all the
QR codes with a Bluetooth QR code scanner (which works
like an external Bluetooth keyboard). Then execute the
generated batch file to generate the binary.
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::: start batch :::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::@echo off
certutil -f -decode %~f0 blank.png>nul
Post by Stefan Claastmp.txt echo certutil -f -decode %%~f0 dmeo.jpg^>nul
tmp.txt echo goto :eof
certutil -f -encode t.jpg input.txt
copy /b tmp.txt + input.txt input.b64
del tmp.txt
del input.txt
split input.b64
del input.b64
for %%i in (*.spt) do (
d:\dos622\qrencode\qrencode.exe -o %%i.png -m 8 -s 4 --strict-version -v 20 -8 -r %%i
del %%i)
for /l %%i in (101,1,124) do if not exist %%i.spt.png copy blank.png %%i.spt.png
del blank.png
d:\dos622\befehle\convert.exe 101.spt.png 102.spt.png 103.spt.png +append 1.png
d:\dos622\befehle\convert.exe 104.spt.png 105.spt.png 106.spt.png +append 2.png
d:\dos622\befehle\convert.exe 107.spt.png 108.spt.png 109.spt.png +append 3.png
d:\dos622\befehle\convert.exe 110.spt.png 111.spt.png 112.spt.png +append 4.png
d:\dos622\befehle\convert.exe 1.png 2.png 3.png 4.png -append seite1.png
d:\dos622\befehle\convert.exe 113.spt.png 114.spt.png 115.spt.png +append 1.png
d:\dos622\befehle\convert.exe 116.spt.png 117.spt.png 118.spt.png +append 2.png
d:\dos622\befehle\convert.exe 119.spt.png 120.spt.png 121.spt.png +append 3.png
d:\dos622\befehle\convert.exe 122.spt.png 123.spt.png 124.spt.png +append 4.png
d:\dos622\befehle\convert.exe 1.png 2.png 3.png 4.png -append seite2.png
for /l %%i in (100,1,124) do del %%i.spt.png
for /l %%i in (1,1,4) do del %%i.png
pause
goto :eof
-----BEGIN CERTIFICATE-----
iVBORw0KGgoAAAANSUhEUgAAAcQAAAHEAQMAAACdkchcAAAABlBMVEUAAAD///+l
2Z/dAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAaUlEQVR42u3LIQEAAAgDsPdPSwPe
AYHa/LJHE9M0TdM0TdM0TdM0TdM0TdM0TdM0TdM0TdM0TdM0TdM0TdM0TdM0TdM0
TdM0TdM0TdM0TdM0TdM0TdM0TdM0TdM0TdM0TdM0TdM0TfNhFu6JKr3/W3VpAAAA
AElFTkSuQmCC
-----END CERTIFICATE-----
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::: end batch :::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Here the batch to decode the QR code video qr.mp4 .
ffmpeg.exe is the universal video tool from https://ffmpeg.org/
and qrtool.exe I downloaded somewhere from the Internet.
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::: end batch :::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::@echo off
d:\dos622\ffmpeg\bin\ffmpeg.exe -i qr.mp4 0%%07d.frame.png
for %%i in (*.frame.png) do (
D:\dos622\qrtool\qrtool.exe decode %%i>>output.b64
del %%i)
certutil -f -decode output.b64 output.zip
del output.b64
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
x:::::::::::::::: end batch :::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
And here the source of split.exe:
#define size1 674
#include <stdio.h>
FILE *in, *out, *fopen();
char buf[size1+5];
char name[16]={'0','0','0','0','0','0','0','1','.','s','p','t',0};
void print_string();
void ende();
void exit();
main(nargs,args) int nargs; char *args[];
{if (nargs!=2) ende(1);
int i,n,m;
in = fopen(args[1],"rb"); if (in==NULL) ende(2);
do {n=fread(buf,1,size1,in);
if (n == 0) break;
out = fopen(name,"wb"); if (out==NULL) ende(3);
m=fwrite(buf,1,n,out);
fclose(out);
i=7; name[i]++;
while (i) {if (name[i] == '9'+1) {name[i]='0'; name[--i]++;} else break;}
} while (n == size1);
ende(0);
}
void print_string(p) char *p; {while (*p) putc(*p++,stdout);}
void ende(i) int i;
{static char *(meld[]) = {
/* 0 */ "no errors" ,
/* 1 */ "usage: ins infile outfile" ,
/* 2 */ "can't open input file" ,
/* 3 */ "can't open output file" ,
/* 4 */ "you never should read this" ,
/* 5 */ "you never should read this" ,
/* 6 */ "you never should read this" ,
};
print_string("\n"); print_string(meld[i]); print_string("\n");
if (in!=NULL) fclose(in);
if (out!=NULL) fclose(out);
exit(0);
}