Rev 270 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 270 | Rev 271 | ||
---|---|---|---|
Line 8... | Line 8... | ||
8 | 8 | ||
9 | Normal standalone filters: |
9 | Normal standalone filters: |
10 | - Windows resource: PARM\16000\0 |
10 | - Windows resource: PARM\16000\0 |
11 | - MacOS resource: 'PARM' 16000 |
11 | - MacOS resource: 'PARM' 16000 |
12 | 12 | ||
13 | The obfuscation methods are stored in **make.c** |
13 | ## Implementation |
14 | 14 | ||
- | 15 | Defined in **ff.h**, implemented in **make.c**: |
|
- | 16 | ||
- | 17 | void obfusc(PARM_T* pparm); |
|
- | 18 | void deobfusc(PARM_T* pparm); |
|
- | 19 | ||
15 | ## Obfuscation "Version 3" |
20 | ### Obfuscation "Version 3" |
16 | 21 | ||
17 | Introduced in **Filter Foundry 1.7.0.5** [30-Jul-2021] |
22 | Introduced in **Filter Foundry 1.7.0.5** [30-Jul-2021] |
18 | 23 | ||
19 | It is compiler-dependant, therefore the resource cannot be exchanged between plugins! |
24 | It is compiler-dependant, therefore the resource cannot be exchanged between plugins! |
20 | 25 | ||
Line 34... | Line 39... | ||
34 | int rand_openwatcom(unsigned int* seed) { |
39 | int rand_openwatcom(unsigned int* seed) { |
35 | *seed = *seed * 1103515245L + 12345L; |
40 | *seed = *seed * 1103515245L + 12345L; |
36 | return (*seed >> 16) & 0x7fff; /* Scale between 0 and RAND_MAX */ |
41 | return (*seed >> 16) & 0x7fff; /* Scale between 0 and RAND_MAX */ |
37 | } |
42 | } |
38 | 43 | ||
39 | 64 bit plugin is built with Visual VC++ which has following formula: |
44 | 64 bit plugin is built with Visual C++ which has following formula: |
40 | 45 | ||
41 | int rand_msvcc(unsigned int* seed) { |
46 | int rand_msvcc(unsigned int* seed) { |
42 | *seed = *seed * 214013L + 2531011L; |
47 | *seed = *seed * 214013L + 2531011L; |
43 | return (*seed >> 16) & 0x7fff; /* Scale between 0 and RAND_MAX */ |
48 | return (*seed >> 16) & 0x7fff; /* Scale between 0 and RAND_MAX */ |
44 | } |
49 | } |
45 | 50 | ||
46 | ## Obfuscation "Version 2" |
51 | ### Obfuscation "Version 2" |
47 | 52 | ||
48 | Introduced in **Filter Foundry 1.7b1** [20-Sep-2019] |
53 | Introduced in **Filter Foundry 1.7b1** [20-Sep-2019] |
49 | 54 | ||
50 | It is compiler-independant! |
55 | It is compiler-independant! |
51 | 56 | ||
Line 57... | Line 62... | ||
57 | x32 ^= x32 >> 17; |
62 | x32 ^= x32 >> 17; |
58 | x32 ^= x32 << 5; |
63 | x32 ^= x32 << 5; |
59 | *p++ ^= x32; |
64 | *p++ ^= x32; |
60 | } |
65 | } |
61 | 66 | ||
62 | ## Obfuscation "Version 1" |
67 | ### Obfuscation "Version 1" |
63 | 68 | ||
64 | Introduced in **Filter Foundry 1.4b8,9,10** |
69 | Introduced in **Filter Foundry 1.4b8,9,10** |
65 | 70 | ||
66 | It is compiler-dependant, therefore the resource cannot be exchanged between plugins! |
71 | It is compiler-dependant, therefore the resource cannot be exchanged between plugins! |
67 | 72 | ||
Line 69... | Line 74... | ||
69 | 74 | ||
70 | srand(0xdc43df3c); |
75 | srand(0xdc43df3c); |
71 | for(i = size, p = pparm; i--;) { |
76 | for(i = size, p = pparm; i--;) { |
72 | *p++ ^= rand(); |
77 | *p++ ^= rand(); |
73 | } |
78 | } |
74 | 79 | ||
- | 80 | The plugin is built with Visual C++ which has following formula: |
|
- | 81 | ||
- | 82 | int rand_msvcc(unsigned int* seed) { |
|
- | 83 | *seed = *seed * 214013L + 2531011L; |
|
- | 84 | return (*seed >> 16) & 0x7fff; /* Scale between 0 and RAND_MAX */ |
|
- | 85 | } |
|
- | 86 | ||
- | 87 |