1. 前言
通过一张照片能够获得多少信息?可以通过本篇文章的一个例子来学习,同时也能提高保护的个人隐私的意识。
2. 原始信息
通过这张图片我们可以得到这些信息:
- 此人是2018级上海美术学院设计学专业的研究生
- 照片发布者为了保护隐私用马赛克挡住了名字、学号和照片
- 注意,图片上有一个非常关键的地方——条形码,而且这个条形码是在学号的上方,它大概率表示的也是学号。虽然它也被马赛克遮挡住了,但是大部分的条形码都具备有纠错功能,我们此时就可以从这里入手
3. 条形码分析
通过对格式分析得出此条形码采用Code128格式。
3.1. code128详解
code128码符号包括一个静止区、一个开始字符、编码数据、一个检测字符、停止字符和一个尾部的静止区。而这里的检测字符就是关键,它可以帮助还原出条形码的数据。
开始字符
code128通过三个不同的开始字符来进行标识,START CodeA允许所有的键盘字符+控制字符和特殊字符进行编码,START CodeB包括所有标准字母数字键盘字符+小写字母和特殊字符,START CodeC包括一个100位数字(00-99),用于编码数字数据的密度压缩。
编码数据
Code 128条码指定相互间隔的3个条形和3个空白(共六个单元)代表一个字符,每个字符由一个条开始,以一个空结束。 在条形码字体中,最后一个条形通常与终止符一起组合成一个更宽的终止符。
附录部分详细说明了每个字符条码的宽度与间隙的关系,每个条的宽度可以为1,2,3,4个单位。 例如字母“A”可以被表示为图案10100011000,或者表示为宽度111323。
检测字符
code128的每个字符都有一个值,范围从0到105,这个值被用来计算条形码的校验字符。校验字符通过MOD103算法,下面举例说明:
例子:BarCode 1
信息:StartB B a r C o d e 1
值:104 34 65 82 35 79 68 69 0 17
位置:- 1 2 3 4 5 6 7 8 9
计算:104 + (34×1) + (65×2) + (82×3) + (35×4) + (79×5) + (68×6) + (69×7) + (0×8) + (17×9) = 2093
2093 / 103 = 20......33
33 = A
3.2. 案例条形码分析
看过上述内容想必你对Code128条形码有了一定的了解,现在进入实战部分,一边对照Code128条形码字符表一边按照条形码的分区解码。
开始字符
开头的6个条纹宽度为211232,可以得出条形码开始字符为start code C。
编码数据区
分别由条纹宽度223211,122411,算出18和72,这两个数字和下面的学号相吻合,也就证明之前得出的结论是正确的。但是后面的数字模糊不清,只能看出部分,其中被挡住部分的条纹宽度的可能是2、3或者4,其余的部分完全看不清,这里把所有可能性罗列一遍。
左边的「 ?」可能是
213212(21),212123(30),212321(31),213113(51),213311(52),213131(53),212141(89),214121(90)
右边的「 ?」可能是
232121(32),133121(47),313121(48),214121(90),412121(91)
纠错码
除去最后7位停止字符,往前6个条纹宽度为411131,可以得出纠错码为102。
根据纠错码写几行代码简单验证一下被遮住的条形码的数据。
#include <stdio.h>
int main()
{
int a[] = {21, 30, 31, 51, 52, 53, 89, 90}, b[] = {32, 47, 48, 90, 91};
int i, j;
for (i = 0; i < 8; i++)
{
for (j = 0; j < 5; j++)
{
if ((3 * a[i] + 4 * b[j] + 267) % 103 == 102)
printf("学号是:1872%d%d", a[i], b[j]);
}
}
return 0;
}
运行代码我们得到此人的学号是18723190
4. 利用Google进行社工
4.1. 常见Google搜索语法
搜索逻辑
- 逻辑与:and
- 逻辑或:or
- 逻辑非:-
- 完整匹配:"关键词"
- 通配符:* ?
文件类型
filetype:文件类型
例如我想找一篇论文的格式模板论文格式 filetype:doc
指定站点
site:指定站点
例如我想在微博内寻找匹配美国这个关键词的页面"美国" site:weibo.com
4.2. 实战
根据我们所得到的学号信息,把18723190作为关键字,文件类型指定为pdf查找人员的名单,我们最终得出这张证书所对应人的姓名。
"18723190" filetype:pdf
值 | Code A | Code B | Code C | 图案 | 想要打印的ASCII字符 | |||||
---|---|---|---|---|---|---|---|---|---|---|
条 | 空 | 条 | 空 | 条 | 空 | |||||
0 | SP | SP | 00 | 2 | 1 | 2 | 2 | 2 | 2 | SP(ASCII 32) |
1 | ! | ! | 01 | 2 | 2 | 2 | 1 | 2 | 2 | !(ASCII 33) |
2 | " | " | 02 | 2 | 2 | 2 | 2 | 2 | 1 | "(ASCII 34) |
3 | # | # | 03 | 1 | 2 | 1 | 2 | 2 | 3 | #(ASCII 35) |
4 | $ | $ | 04 | 1 | 2 | 1 | 3 | 2 | 2 | $ (ASCII 36) |
5 | % | % | 05 | 1 | 3 | 1 | 2 | 2 | 2 | % (ASCII 37) |
6 | & | & | 06 | 1 | 2 | 2 | 2 | 1 | 3 | & (ASCII 38) |
7 | ' | ' | 07 | 1 | 2 | 2 | 3 | 1 | 2 | ' (ASCII 39) |
8 | ( | ( | 08 | 1 | 3 | 2 | 2 | 1 | 2 | ( (ASCII 40) |
9 | ) | ) | 09 | 2 | 2 | 1 | 2 | 1 | 3 | ) (ASCII 41) |
10 | * | * | 10 | 2 | 2 | 1 | 3 | 1 | 2 | * (ASCII 42) |
11 | + | + | 11 | 2 | 3 | 1 | 2 | 1 | 2 | + (ASCII 43) |
12 | , | , | 12 | 1 | 1 | 2 | 2 | 3 | 2 | , (ASCII 44) |
13 | - | - | 13 | 1 | 2 | 2 | 1 | 3 | 2 | - (ASCII 45) |
14 | . | . | 14 | 1 | 2 | 2 | 2 | 3 | 1 | . (ASCII 46) |
15 | / | / | 15 | 1 | 1 | 3 | 2 | 2 | 2 | / (ASCII 47) |
16 | 0 | 0 | 16 | 1 | 2 | 3 | 1 | 2 | 2 | 0 (ASCII 48) |
17 | 1 | 1 | 17 | 1 | 2 | 3 | 2 | 2 | 1 | 1(ASCII 49) |
18 | 2 | 2 | 18 | 2 | 2 | 3 | 2 | 1 | 1 | 2 (ASCII 50) |
19 | 3 | 3 | 19 | 2 | 2 | 1 | 1 | 3 | 2 | 3 (ASCII 51) |
20 | 4 | 4 | 20 | 2 | 2 | 1 | 2 | 3 | 1 | 4 (ASCII 52) |
21 | 5 | 5 | 21 | 2 | 1 | 3 | 2 | 1 | 2 | 5 (ASCII 53) |
22 | 6 | 6 | 22 | 2 | 2 | 3 | 1 | 1 | 2 | 6 (ASCII 54) |
23 | 7 | 7 | 23 | 3 | 1 | 2 | 1 | 3 | 1 | 7 (ASCII 55) |
24 | 8 | 8 | 24 | 3 | 1 | 1 | 2 | 2 | 2 | 8 (ASCII 56) |
25 | 9 | 9 | 25 | 3 | 2 | 1 | 1 | 2 | 2 | 9 (ASCII 57) |
26 | : | : | 26 | 3 | 2 | 1 | 2 | 2 | 1 | : (ASCII 57) |
27 | ; | ; | 27 | 3 | 1 | 2 | 2 | 1 | 2 | ; (ASCII 59) |
28 | < | < | 28 | 3 | 2 | 2 | 1 | 1 | 2 | < (ASCII 60) |
29 | = | = | 29 | 3 | 2 | 2 | 2 | 1 | 1 | = (ASCII 61) |
30 | > | > | 30 | 2 | 1 | 2 | 1 | 2 | 3 | > (ASCII 62) |
31 | ? | ? | 31 | 2 | 1 | 2 | 3 | 2 | 1 | ? (ASCII 63) |
32 | @ | @ | 32 | 2 | 3 | 2 | 1 | 2 | 1 | @ (ASCII 64) |
33 | A | A | 33 | 1 | 1 | 1 | 3 | 2 | 3 | A (ASCII 65) |
34 | B | B | 34 | 1 | 3 | 1 | 1 | 2 | 3 | B (ASCII 66) |
35 | C | C | 35 | 1 | 3 | 1 | 3 | 2 | 1 | C (ASCII 67) |
36 | D | D | 36 | 1 | 1 | 2 | 3 | 1 | 3 | D (ASCII 68) |
37 | E | E | 37 | 1 | 3 | 2 | 1 | 1 | 3 | E (ASCII 69) |
38 | F | F | 38 | 1 | 3 | 2 | 3 | 1 | 1 | F (ASCII 70) |
39 | G | G | 39 | 2 | 1 | 1 | 3 | 1 | 3 | G (ASCII 71) |
40 | H | H | 40 | 2 | 3 | 1 | 1 | 1 | 3 | H (ASCII 72) |
41 | I | I | 41 | 2 | 3 | 1 | 3 | 1 | 1 | I (ASCII 73) |
42 | J | J | 42 | 1 | 1 | 2 | 1 | 3 | 3 | J (ASCII 74) |
43 | K | K | 43 | 1 | 1 | 2 | 3 | 3 | 1 | K (ASCII 75) |
44 | L | L | 44 | 1 | 3 | 2 | 1 | 3 | 1 | L (ASCII 76) |
45 | M | M | 45 | 1 | 1 | 3 | 1 | 2 | 3 | M (ASCII 77) |
46 | N | N | 46 | 1 | 1 | 3 | 3 | 2 | 1 | N (ASCII 78) |
47 | O | O | 47 | 1 | 3 | 3 | 1 | 2 | 1 | O (ASCII 79) |
48 | P | P | 48 | 3 | 1 | 3 | 1 | 2 | 1 | P (ASCII 80) |
49 | Q | Q | 49 | 2 | 1 | 1 | 3 | 3 | 1 | Q (ASCII 81) |
50 | R | R | 50 | 2 | 3 | 1 | 1 | 3 | 1 | R (ASCII 82) |
51 | S | S | 51 | 2 | 1 | 3 | 1 | 1 | 3 | S (ASCII 83) |
52 | T | T | 52 | 2 | 1 | 3 | 3 | 1 | 1 | T (ASCII 84) |
53 | U | U | 53 | 2 | 1 | 3 | 1 | 3 | 1 | U (ASCII 85) |
54 | V | V | 54 | 3 | 1 | 1 | 1 | 2 | 3 | V (ASCII 86) |
55 | W | W | 55 | 3 | 1 | 1 | 3 | 2 | 1 | W (ASCII 87) |
56 | X | X | 56 | 3 | 3 | 1 | 1 | 2 | 1 | X (ASCII 88) |
57 | Y | Y | 57 | 3 | 1 | 2 | 1 | 1 | 3 | Y (ASCII 89) |
58 | Z | Z | 58 | 3 | 1 | 2 | 3 | 1 | 1 | Z (ASCII 90) |
59 | [ | [ | 59 | 3 | 3 | 2 | 1 | 1 | 1 | [ (ASCII 91) |
60 | \ | \ | 60 | 3 | 1 | 4 | 1 | 1 | 1 | \ (ASCII 92) |
61 | ] | ] | 61 | 2 | 2 | 1 | 4 | 1 | 1 | ] (ASCII 93) |
62 | ^ | ^ | 62 | 4 | 3 | 1 | 1 | 1 | 1 | ^ (ASCII 94) |
63 | _ | _ | 63 | 1 | 1 | 1 | 2 | 2 | 4 | _ (ASCII 95) |
64 | NUL | ` | 64 | 1 | 1 | 1 | 4 | 2 | 2 | ` (ASCII 96) |
65 | SOH | a | 65 | 1 | 2 | 1 | 1 | 2 | 4 | a (ASCII 97) |
66 | STX | b | 66 | 1 | 2 | 1 | 4 | 2 | 1 | b (ASCII 98) |
67 | ETX | c | 67 | 1 | 4 | 1 | 1 | 2 | 2 | c (ASCII 99) |
68 | EOT | d | 68 | 1 | 4 | 1 | 2 | 2 | 1 | d (ASCII 100) |
69 | ENQ | e | 69 | 1 | 1 | 2 | 2 | 1 | 4 | e (ASCII 101) |
70 | ACK | f | 70 | 1 | 1 | 2 | 4 | 1 | 2 | f (ASCII 102) |
71 | BEL | g | 71 | 1 | 2 | 2 | 1 | 1 | 4 | g (ASCII 103) |
72 | BS | h | 72 | 1 | 2 | 2 | 4 | 1 | 1 | h (ASCII 104) |
73 | HT | i | 73 | 1 | 4 | 2 | 1 | 1 | 2 | i (ASCII 105) |
74 | LF | j | 74 | 1 | 4 | 2 | 2 | 1 | 1 | j (ASCII 106) |
75 | VT | k | 75 | 2 | 4 | 1 | 2 | 1 | 1 | k (ASCII 107) |
76 | FF | l | 76 | 2 | 2 | 1 | 1 | 1 | 4 | l (ASCII 108) |
77 | CR | m | 77 | 4 | 1 | 3 | 1 | 1 | 1 | m (ASCII 109) |
78 | SO | n | 78 | 2 | 4 | 1 | 1 | 1 | 2 | n (ASCII 110) |
79 | SI | o | 79 | 1 | 3 | 4 | 1 | 1 | 1 | o (ASCII 111) |
80 | DLE | p | 80 | 1 | 1 | 1 | 2 | 4 | 2 | p (ASCII 112) |
81 | DC1 | q | 81 | 1 | 2 | 1 | 1 | 4 | 2 | q (ASCII 113) |
82 | DC2 | r | 82 | 1 | 2 | 1 | 2 | 4 | 1 | r (ASCII 114) |
83 | DC3 | s | 83 | 1 | 1 | 4 | 2 | 1 | 2 | s (ASCII 115) |
84 | DC4 | t | 84 | 1 | 2 | 4 | 1 | 1 | 2 | t (ASCII 116) |
85 | NAK | u | 85 | 1 | 2 | 4 | 2 | 1 | 1 | u (ASCII 117) |
86 | SYN | v | 86 | 4 | 1 | 1 | 2 | 1 | 2 | v (ASCII 118) |
87 | ETB | w | 87 | 4 | 2 | 1 | 1 | 1 | 2 | w (ASCII 119) |
88 | CAN | x | 88 | 4 | 2 | 1 | 2 | 1 | 1 | x (ASCII 120) |
89 | EM | y | 89 | 2 | 1 | 2 | 1 | 4 | 1 | y (ASCII 121) |
90 | SUB | z | 90 | 2 | 1 | 4 | 1 | 2 | 1 | z (ASCII 122) |
91 | ESC | { | 91 | 4 | 1 | 2 | 1 | 2 | 1 | { (ASCII 123) |
92 | FS | | | 92 | 1 | 1 | 1 | 1 | 4 | 3 | | (ASCII 124) |
93 | GS | } | 93 | 1 | 1 | 1 | 3 | 4 | 1 | } (ASCII 125) |
94 | RS | ~ | 94 | 1 | 3 | 1 | 1 | 4 | 1 | ~ (ASCII 126) |
95 (Hex 7F) | US | DEL | 95 | 1 | 1 | 4 | 1 | 1 | 3 | DEL (ASCII 127) |
96 (Hex 80) | FNC 3 | FNC 3 | 96 | 1 | 1 | 4 | 3 | 1 | 1 | ? (ASCII 128) |
97 (Hex 81) | FNC 2 | FNC 2 | 97 | 4 | 1 | 1 | 1 | 1 | 3 | ü (ASCII 129) |
98 (Hex 82) | SHIFT | SHIFT | 98 | 4 | 1 | 1 | 3 | 1 | 1 | é (ASCII 130) |
99 (Hex 83) | CODE C | CODE C | 99 | 1 | 1 | 3 | 1 | 4 | 1 | a (ASCII 131) |
100 (Hex 84) | CODE B | FNC 4 | CODE B | 1 | 1 | 4 | 1 | 3 | 1 | ? (ASCII 132) |
101 (Hex 85) | FNC 4 | CODE A | CODE A | 3 | 1 | 1 | 1 | 4 | 1 | à (ASCII 133) |
102 (Hex 86) | FNC 1 | FNC 1 | FNC 1 | 4 | 1 | 1 | 1 | 3 | 1 | ? (ASCII 134) |
值 | 开始符号 | 图案 | 想要打印的ASCII字符 | |||||
---|---|---|---|---|---|---|---|---|
条 | 空 | 条 | 空 | 条 | 空 | |||
103 (Hex 87) | START (Code A) | 2 | 1 | 1 | 4 | 1 | 2 | ? (ASCII 135) |
104 (Hex 88) | START (Code B) | 2 | 1 | 1 | 2 | 1 | 4 | ? (ASCII 136) |
105 (Hex 89) | START (Code C) | 2 | 1 | 1 | 2 | 3 | 2 | ‰ (ASCII 137) |
106 (Hex 6A) | STOP (All Codes) | 2 | 3 | 3 | 1 | 1,1 | 2 | ? (ASCII 138) |
8 条评论
你的文章让我感受到了不一样的风景,谢谢分享。 http://www.55baobei.com/vEHCyZQxm0.html
每次看到你的文章,我都觉得时间过得好快。 http://www.55baobei.com/8GpSeVfQoW.html
真棒!
真好呢
文章的确不错啊https://www.cscnn.com/
不错不错,我喜欢看 https://www.ea55.com/
想想你的文章写的特别好https://www.237fa.com/
6