Professional Documents
Culture Documents
7 Re
7 Re
$ ls /etc/*p?ss*
/etc/master.passwd /etc/passwd
2/22
Principe
*
[bl] . f r . g
Les chaînes contenant b ou l puis, plus loin, fr, une lettre, puis g.
3/22
Ss 1 0 0 0 0:02.25 02-12:03:27 0.0 0.0 552 600820 0 0 /sbin/launchd
Ss 10 1 0 0 0:01.45 02-12:03:26 0.0 0.1 1268 75968 0 0 /usr/libexec/kextd
Ss 11 1 0 0 0:05.31 02-12:03:26 0.0 0.0 472 600236 0 0 /usr/sbin/notifyd
Ss 12 1 0 0 0:01.93 02-12:03:25 0.0 0.0 468 601332 0 0 /usr/sbin/syslogd
Ss 14 1 0 0 2:21.66 02-12:03:21 0.0 0.0 280 599620 0 0 /usr/sbin/update
Ss 17 1 0 0 0:02.11 02-12:03:21 0.0 0.1 2504 77236 0 0 /usr/sbin/securityd -i
Ss 19 1 0 0 3:08.08 02-12:03:21 0.0 4.6 96432 242840 0 0 /System/Library/Frameworks/Cor
Ss 20 1 65 65 0:01.42 02-12:03:21 0.0 0.1 1208 77304 0 0 /usr/sbin/mDNSResponder -launc
Ss 21 1 501 20 1:04.47 02-12:03:21 0.0 0.4 8860 458452 0 0 /System/Library/CoreServices/l
Ss 22 1 0 0 0:00.02 02-12:03:21 0.0 0.0 692 75448 0 0 /usr/sbin/KernelEventAgent
Ss 24 1 0 0 14:10.13 02-12:03:21 0.0 0.1 1564 77040 0 0 /usr/libexec/hidd
Ss 25 1 0 0 0:29.84 02-12:03:21 0.0 0.1 1616 82464 0 0 /System/Library/Frameworks/Cor
Ss 27 1 0 0 0:00.01 02-12:03:21 0.0 0.0 700 75376 0 0 /sbin/dynamic_pager -F /privat
Ss 30 1 0 0 0:02.78 02-12:03:21 0.0 0.0 1016 75460 0 0 /usr/sbin/diskarbitrationd
Ss 31 1 0 0 0:25.24 02-12:03:21 0.0 0.2 4028 78660 0 0 /usr/sbin/DirectoryService
Ss 33 1 0 0 0:25.19 02-12:03:21 0.0 0.1 2148 77076 0 0 /usr/sbin/configd
Ss 36 1 0 0 0:00.08 02-12:03:21 0.0 0.0 672 75388 0 0 autofsd
Ss 38 1 0 0 0:53.43 02-12:03:21 0.0 0.1 2400 75712 0 0 /usr/libexec/ApplicationFirewa
Ss
Ss 1. Syntaxe(s)
40
43
1
1
1
0
1
0
0:13.06
0:21.15
02-12:03:21
02-12:03:21
0.0
0.0
0.0
1.3
792
26988
75356
115932
0 0
0 0
/usr/sbin/distnoted
/System/Library/CoreServices/c
Ss 44 1 0 0 0:00.12 02-12:03:21 0.0 0.1 1928 86716 0 0 /usr/sbin/blued
Ss 49 1 88 88 83:45.31 02-12:03:21 2.2 3.7 77604 469720 0 0 /System/Library/Frameworks/App
Ss 63 1 501 20 0:03.57 02-12:03:19 0.0 0.0 540 599796 0 0 /sbin/launchd
Ss 78 1 0 0 8:59.69 02-12:03:09 0.1 0.2 3292 96128 0 0 /System/Library/PrivateFramewo
Ss 82 1 0 0 0:07.69 02-12:03:08 0.0 0.1 1068 75400 0 0 /System/Library/PrivateFramewo
S 89 63 501 20 0:01.13 02-12:03:06 0.0 0.2 3460 388180 0 0 /System/Library/CoreServices/A
S 93 63 501 20 0:10.99 02-12:03:06 0.0 1.1 22508 545084 0 0 /System/Library/CoreServices/S
S 94 63 501 20 0:00.60 02-12:03:06 0.0 0.1 2248 341124 0 0 /usr/sbin/UserEventAgent -l Aq
S 95 63 501 20 2:43.91 02-12:03:06 0.0 0.8 17644 140084 0 0 /System/Library/Frameworks/App
S 96 63 501 20 1:21.05 02-12:03:06 0.0 0.7 14268 454280 0 0 /System/Library/CoreServices/D
S 97 63 501 20 0:00.00 02-12:03:05 0.0 0.0 584 76432 0 0 /usr/sbin/pboard
S 98 63 501 20 1:28.90 02-12:03:05 0.0 0.5 10916 427788 0 0 /System/Library/CoreServices/S
Ss 99 1 0 0 72:57.85 02-12:03:05 5.5 0.6 11788 91476 0 0 /usr/sbin/coreaudiod
S 100 63 501 20 0:56.37 02-12:03:05 0.0 1.7 35724 507888 0 0 /System/Library/CoreServices/F
S 105 63 501 20 0:00.89 02-12:03:03 0.0 0.1 2492 355388 0 0 /Applications/iTunes.app/Conte
Ss 106 1 -2 -2 0:00.01 02-12:03:02 0.0 0.0 696 76776 0 0 /System/Library/PrivateFramewo
S 127 63 501 20 0:00.01 02-12:02:47 0.0 0.0 880 76392 0 0 /usr/libexec/ApplicationFirewa
S 143 63 501 20 1:28.16 02-12:01:39 0.0 0.3 6508 92080 0 0 /System/Library/Services/Apple
S 176 63 501 20 0:04.15 02-11:55:54 0.0 0.1 1360 76704 0 0 /usr/bin/ssh-agent -l
S 473 96 501 20 0:14.56 02-09:17:41 0.0 1.2 24456 509004 0 0 /System/Library/CoreServices/D
S 1398 63 501 20 0:14.50 02-03:03:52 0.0 1.1 23032 437672 0 0 /Applications/iCal.app/Content
S 1577 63 501 20 0:04.46 02-01:54:48 0.0 0.4 7720 421456 0 0 /Applications/Stickies.app/Con
S 7480 63 501 20 2:14.18 01-10:22:55 2.7 0.8 17788 434608 0 0 /Applications/Utilities/Termin
SNs 10477 1 501 20 1:23.57 01-02:01:59 0.0 1.0 20668 157152 0 17 /System/Library/Frameworks/Cor
Parfums
1. Syntaxe(s) 5/22
Caractère isolé
1. Syntaxe(s) 6/22
Crochets
1. Syntaxe(s) 7/22
Classes Posix
• [:digit:] 0 -> 9
• [:upper:] A -> Z.
• [:lower:] a -> z.
1. Syntaxe(s) 8/22
Ancrage
1. Syntaxe(s) 9/22
Répétitions
1. Syntaxe(s) 10/22
Répétitions (ERE)
1. Syntaxe(s) 11/22
Combinaisons
1. Syntaxe(s) 12/22
Combinaisons (suite)
1. Syntaxe(s) 13/22
POSIX BRE et ERE
1. Syntaxe(s) 14/22
Ss 1 0 0 0 0:02.25 02-12:03:27 0.0 0.0 552 600820 0 0 /sbin/launchd
Ss 10 1 0 0 0:01.45 02-12:03:26 0.0 0.1 1268 75968 0 0 /usr/libexec/kextd
Ss 11 1 0 0 0:05.31 02-12:03:26 0.0 0.0 472 600236 0 0 /usr/sbin/notifyd
Ss 12 1 0 0 0:01.93 02-12:03:25 0.0 0.0 468 601332 0 0 /usr/sbin/syslogd
Ss 14 1 0 0 2:21.66 02-12:03:21 0.0 0.0 280 599620 0 0 /usr/sbin/update
Ss 17 1 0 0 0:02.11 02-12:03:21 0.0 0.1 2504 77236 0 0 /usr/sbin/securityd -i
Ss 19 1 0 0 3:08.08 02-12:03:21 0.0 4.6 96432 242840 0 0 /System/Library/Frameworks/Cor
Ss 20 1 65 65 0:01.42 02-12:03:21 0.0 0.1 1208 77304 0 0 /usr/sbin/mDNSResponder -launc
Ss 21 1 501 20 1:04.47 02-12:03:21 0.0 0.4 8860 458452 0 0 /System/Library/CoreServices/l
Ss 22 1 0 0 0:00.02 02-12:03:21 0.0 0.0 692 75448 0 0 /usr/sbin/KernelEventAgent
Ss 24 1 0 0 14:10.13 02-12:03:21 0.0 0.1 1564 77040 0 0 /usr/libexec/hidd
Ss 25 1 0 0 0:29.84 02-12:03:21 0.0 0.1 1616 82464 0 0 /System/Library/Frameworks/Cor
Ss 27 1 0 0 0:00.01 02-12:03:21 0.0 0.0 700 75376 0 0 /sbin/dynamic_pager -F /privat
Ss 30 1 0 0 0:02.78 02-12:03:21 0.0 0.0 1016 75460 0 0 /usr/sbin/diskarbitrationd
Ss 31 1 0 0 0:25.24 02-12:03:21 0.0 0.2 4028 78660 0 0 /usr/sbin/DirectoryService
Ss 33 1 0 0 0:25.19 02-12:03:21 0.0 0.1 2148 77076 0 0 /usr/sbin/configd
Ss 36 1 0 0 0:00.08 02-12:03:21 0.0 0.0 672 75388 0 0 autofsd
Ss 38 1 0 0 0:53.43 02-12:03:21 0.0 0.1 2400 75712 0 0 /usr/libexec/ApplicationFirewa
2. Reconnaissance
Ss 40 1 1 1 0:13.06 02-12:03:21 0.0 0.0 792 75356 0 0 /usr/sbin/distnoted
Ss 43 1 0 0 0:21.15 02-12:03:21 0.0 1.3 26988 115932 0 0 /System/Library/CoreServices/c
Ss 44 1 0 0 0:00.12 02-12:03:21 0.0 0.1 1928 86716 0 0 /usr/sbin/blued
Ss 49 1 88 88 83:45.31 02-12:03:21 2.2 3.7 77604 469720 0 0 /System/Library/Frameworks/App
Ss 63 1 501 20 0:03.57 02-12:03:19 0.0 0.0 540 599796 0 0 /sbin/launchd
Ss 78 1 0 0 8:59.69 02-12:03:09 0.1 0.2 3292 96128 0 0 /System/Library/PrivateFramewo
Ss 82 1 0 0 0:07.69 02-12:03:08 0.0 0.1 1068 75400 0 0 /System/Library/PrivateFramewo
S 89 63 501 20 0:01.13 02-12:03:06 0.0 0.2 3460 388180 0 0 /System/Library/CoreServices/A
S 93 63 501 20 0:10.99 02-12:03:06 0.0 1.1 22508 545084 0 0 /System/Library/CoreServices/S
S 94 63 501 20 0:00.60 02-12:03:06 0.0 0.1 2248 341124 0 0 /usr/sbin/UserEventAgent -l Aq
S 95 63 501 20 2:43.91 02-12:03:06 0.0 0.8 17644 140084 0 0 /System/Library/Frameworks/App
S 96 63 501 20 1:21.05 02-12:03:06 0.0 0.7 14268 454280 0 0 /System/Library/CoreServices/D
S 97 63 501 20 0:00.00 02-12:03:05 0.0 0.0 584 76432 0 0 /usr/sbin/pboard
S 98 63 501 20 1:28.90 02-12:03:05 0.0 0.5 10916 427788 0 0 /System/Library/CoreServices/S
Ss 99 1 0 0 72:57.85 02-12:03:05 5.5 0.6 11788 91476 0 0 /usr/sbin/coreaudiod
S 100 63 501 20 0:56.37 02-12:03:05 0.0 1.7 35724 507888 0 0 /System/Library/CoreServices/F
S 105 63 501 20 0:00.89 02-12:03:03 0.0 0.1 2492 355388 0 0 /Applications/iTunes.app/Conte
Ss 106 1 -2 -2 0:00.01 02-12:03:02 0.0 0.0 696 76776 0 0 /System/Library/PrivateFramewo
S 127 63 501 20 0:00.01 02-12:02:47 0.0 0.0 880 76392 0 0 /usr/libexec/ApplicationFirewa
S 143 63 501 20 1:28.16 02-12:01:39 0.0 0.3 6508 92080 0 0 /System/Library/Services/Apple
S 176 63 501 20 0:04.15 02-11:55:54 0.0 0.1 1360 76704 0 0 /usr/bin/ssh-agent -l
S 473 96 501 20 0:14.56 02-09:17:41 0.0 1.2 24456 509004 0 0 /System/Library/CoreServices/D
S 1398 63 501 20 0:14.50 02-03:03:52 0.0 1.1 23032 437672 0 0 /Applications/iCal.app/Content
S 1577 63 501 20 0:04.46 02-01:54:48 0.0 0.4 7720 421456 0 0 /Applications/Stickies.app/Con
S 7480 63 501 20 2:14.18 01-10:22:55 2.7 0.8 17788 434608 0 0 /Applications/Utilities/Termin
SNs 10477 1 501 20 1:23.57 01-02:01:59 0.0 1.0 20668 157152 0 17 /System/Library/Frameworks/Cor
Reconnaissance
2. Reconnaissance 16/22
grep/egrep
2. Reconnaissance 17/22
Ss 1 0 0 0 0:02.25 02-12:03:27 0.0 0.0 552 600820 0 0 /sbin/launchd
Ss 10 1 0 0 0:01.45 02-12:03:26 0.0 0.1 1268 75968 0 0 /usr/libexec/kextd
Ss 11 1 0 0 0:05.31 02-12:03:26 0.0 0.0 472 600236 0 0 /usr/sbin/notifyd
Ss 12 1 0 0 0:01.93 02-12:03:25 0.0 0.0 468 601332 0 0 /usr/sbin/syslogd
Ss 14 1 0 0 2:21.66 02-12:03:21 0.0 0.0 280 599620 0 0 /usr/sbin/update
Ss 17 1 0 0 0:02.11 02-12:03:21 0.0 0.1 2504 77236 0 0 /usr/sbin/securityd -i
Ss 19 1 0 0 3:08.08 02-12:03:21 0.0 4.6 96432 242840 0 0 /System/Library/Frameworks/Cor
Ss 20 1 65 65 0:01.42 02-12:03:21 0.0 0.1 1208 77304 0 0 /usr/sbin/mDNSResponder -launc
Ss 21 1 501 20 1:04.47 02-12:03:21 0.0 0.4 8860 458452 0 0 /System/Library/CoreServices/l
Ss 22 1 0 0 0:00.02 02-12:03:21 0.0 0.0 692 75448 0 0 /usr/sbin/KernelEventAgent
Ss 24 1 0 0 14:10.13 02-12:03:21 0.0 0.1 1564 77040 0 0 /usr/libexec/hidd
Ss 25 1 0 0 0:29.84 02-12:03:21 0.0 0.1 1616 82464 0 0 /System/Library/Frameworks/Cor
Ss 27 1 0 0 0:00.01 02-12:03:21 0.0 0.0 700 75376 0 0 /sbin/dynamic_pager -F /privat
Ss 30 1 0 0 0:02.78 02-12:03:21 0.0 0.0 1016 75460 0 0 /usr/sbin/diskarbitrationd
Ss 31 1 0 0 0:25.24 02-12:03:21 0.0 0.2 4028 78660 0 0 /usr/sbin/DirectoryService
Ss 33 1 0 0 0:25.19 02-12:03:21 0.0 0.1 2148 77076 0 0 /usr/sbin/configd
Ss 36 1 0 0 0:00.08 02-12:03:21 0.0 0.0 672 75388 0 0 autofsd
Ss 38 1 0 0 0:53.43 02-12:03:21 0.0 0.1 2400 75712 0 0 /usr/libexec/ApplicationFirewa
Ss
Ss
Ss
3. Remplacement
40
43
44
1
1
1
1
0
0
1
0
0
0:13.06
0:21.15
0:00.12
02-12:03:21
02-12:03:21
02-12:03:21
0.0
0.0
0.0
0.0
1.3
0.1
792
26988
1928
75356
115932
86716
0 0
0 0
0 0
/usr/sbin/distnoted
/System/Library/CoreServices/c
/usr/sbin/blued
Ss 49 1 88 88 83:45.31 02-12:03:21 2.2 3.7 77604 469720 0 0 /System/Library/Frameworks/App
Ss 63 1 501 20 0:03.57 02-12:03:19 0.0 0.0 540 599796 0 0 /sbin/launchd
Ss 78 1 0 0 8:59.69 02-12:03:09 0.1 0.2 3292 96128 0 0 /System/Library/PrivateFramewo
Ss 82 1 0 0 0:07.69 02-12:03:08 0.0 0.1 1068 75400 0 0 /System/Library/PrivateFramewo
S 89 63 501 20 0:01.13 02-12:03:06 0.0 0.2 3460 388180 0 0 /System/Library/CoreServices/A
S 93 63 501 20 0:10.99 02-12:03:06 0.0 1.1 22508 545084 0 0 /System/Library/CoreServices/S
S 94 63 501 20 0:00.60 02-12:03:06 0.0 0.1 2248 341124 0 0 /usr/sbin/UserEventAgent -l Aq
S 95 63 501 20 2:43.91 02-12:03:06 0.0 0.8 17644 140084 0 0 /System/Library/Frameworks/App
S 96 63 501 20 1:21.05 02-12:03:06 0.0 0.7 14268 454280 0 0 /System/Library/CoreServices/D
S 97 63 501 20 0:00.00 02-12:03:05 0.0 0.0 584 76432 0 0 /usr/sbin/pboard
S 98 63 501 20 1:28.90 02-12:03:05 0.0 0.5 10916 427788 0 0 /System/Library/CoreServices/S
Ss 99 1 0 0 72:57.85 02-12:03:05 5.5 0.6 11788 91476 0 0 /usr/sbin/coreaudiod
S 100 63 501 20 0:56.37 02-12:03:05 0.0 1.7 35724 507888 0 0 /System/Library/CoreServices/F
S 105 63 501 20 0:00.89 02-12:03:03 0.0 0.1 2492 355388 0 0 /Applications/iTunes.app/Conte
Ss 106 1 -2 -2 0:00.01 02-12:03:02 0.0 0.0 696 76776 0 0 /System/Library/PrivateFramewo
S 127 63 501 20 0:00.01 02-12:02:47 0.0 0.0 880 76392 0 0 /usr/libexec/ApplicationFirewa
S 143 63 501 20 1:28.16 02-12:01:39 0.0 0.3 6508 92080 0 0 /System/Library/Services/Apple
S 176 63 501 20 0:04.15 02-11:55:54 0.0 0.1 1360 76704 0 0 /usr/bin/ssh-agent -l
S 473 96 501 20 0:14.56 02-09:17:41 0.0 1.2 24456 509004 0 0 /System/Library/CoreServices/D
S 1398 63 501 20 0:14.50 02-03:03:52 0.0 1.1 23032 437672 0 0 /Applications/iCal.app/Content
S 1577 63 501 20 0:04.46 02-01:54:48 0.0 0.4 7720 421456 0 0 /Applications/Stickies.app/Con
S 7480 63 501 20 2:14.18 01-10:22:55 2.7 0.8 17788 434608 0 0 /Applications/Utilities/Termin
SNs 10477 1 501 20 1:23.57 01-02:01:59 0.0 1.0 20668 157152 0 17 /System/Library/Frameworks/Cor
Remplacement
Chercher et remplacer...
3. Remplacement 19/22
sed
3. Remplacement 20/22