RE: BMW CIC USB SCRIPT ACTIVATOR
(21-10-2017, 11:03 AM)deler Wrote: Hello,
I am little bit confused here to understand the code.
in the following part of the code
PHP Code: void _deploy_enabler(){ remove(_script); FILE *f2 = fopen(_script,"ab+"); fwrite(_enabler,sizeof(char),sizeof(_enabler),f2); fclose(f2); chmod(_script, S_IRUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH); };
there is
PHP Code: fwrite(_enabler,sizeof(char),sizeof(_enabler),f2);
it is using _enabler I am wondering what is it because I can't find any reference to it, I think it should be _target instead or am I wrong?
and also we have
how to find this header file is it in CIC unit?
sorry if my questions sound stupid, I am just trying to understand
_enabler is shell script which makes actual .SWT files, you can find similar script all around or run the patch to inspect it, i would post it but this tryout HU_CIC.h is long deleted, so running it or hexing the original binary as nothing is encrypted inside will give full contest
edit: found it, here is it:
Code: unsigned char _enabler[196] = {
0x23, 0x21, 0x2F, 0x62, 0x69, 0x6E, 0x2F, 0x6B, 0x73, 0x68, 0x0A, 0x73, 0x65, 0x74, 0x20, 0x2D,
0x41, 0x20, 0x65, 0x74, 0x63, 0x20, 0x31, 0x37, 0x20, 0x31, 0x38, 0x20, 0x31, 0x39, 0x20, 0x31,
0x41, 0x20, 0x31, 0x42, 0x0A, 0x77, 0x68, 0x69, 0x6C, 0x65, 0x20, 0x74, 0x72, 0x75, 0x65, 0x20,
0x3B, 0x20, 0x64, 0x6F, 0x0A, 0x09, 0x66, 0x6F, 0x72, 0x20, 0x63, 0x6F, 0x64, 0x65, 0x20, 0x69,
0x6E, 0x20, 0x24, 0x7B, 0x65, 0x74, 0x63, 0x5B, 0x40, 0x5D, 0x7D, 0x20, 0x0A, 0x09, 0x09, 0x64,
0x6F, 0x0A, 0x09, 0x09, 0x09, 0x73, 0x77, 0x74, 0x3D, 0x22, 0x2F, 0x6D, 0x6E, 0x74, 0x2F, 0x48,
0x42, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6E, 0x63, 0x65, 0x2F, 0x30, 0x30, 0x22,
0x24, 0x63, 0x6F, 0x64, 0x65, 0x22, 0x30, 0x30, 0x30, 0x31, 0x2E, 0x73, 0x77, 0x74, 0x22, 0x0A,
0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x5B, 0x20, 0x21, 0x20, 0x2D, 0x65, 0x20, 0x24, 0x73, 0x77,
0x74, 0x20, 0x5D, 0x3B, 0x20, 0x74, 0x68, 0x65, 0x6E, 0x0A, 0x09, 0x09, 0x09, 0x09, 0x74, 0x6F,
0x75, 0x63, 0x68, 0x20, 0x24, 0x73, 0x77, 0x74, 0x0A, 0x09, 0x09, 0x09, 0x66, 0x69, 0x0A, 0x09,
0x09, 0x64, 0x6F, 0x6E, 0x65, 0x0A, 0x09, 0x73, 0x6C, 0x65, 0x65, 0x70, 0x20, 0x35, 0x3B, 0x0A,
0x64, 0x6F, 0x6E, 0x65
};
comes to this in ASCII
Code: #!/bin/ksh
set -A etc 17 18 19 1A 1B
while true ; do
for code in ${etc[@]} do
swt="/mnt/HBpersistence/00"$code"0001.swt"
if [ ! -e $swt ]; then
touch $swt
fi
done
sleep 5;
done
|
BlackBOX Sistemi, Automotive
|
|