-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Shell-session: Fixed command false positives (#3048)
* Shell-session: Fixed command false positives * Fixed comments and `<` characters
- Loading branch information
1 parent
4f97b82
commit 35b88fc
Showing
5 changed files
with
181 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
$ diskutil list | ||
/dev/disk0 (internal, physical): | ||
#: TYPE NAME SIZE IDENTIFIER | ||
0: GUID_partition_scheme *500.3 GB disk0 | ||
1: EFI EFI 209.7 MB disk0s1 | ||
2: Apple_APFS Container disk1 500.1 GB disk0s2 | ||
|
||
/dev/disk1 (synthesized): | ||
#: TYPE NAME SIZE IDENTIFIER | ||
0: APFS Container Scheme - +500.1 GB disk1 | ||
Physical Store disk0s2 | ||
1: APFS Volume Macintosh HD - Data 340.9 GB disk1s1 | ||
2: APFS Volume Preboot 85.9 MB disk1s2 | ||
3: APFS Volume Recovery 529.0 MB disk1s3 | ||
4: APFS Volume VM 3.2 GB disk1s4 | ||
5: APFS Volume Macintosh HD 11.3 GB disk1s5 | ||
|
||
/dev/disk2 (internal, physical): | ||
#: TYPE NAME SIZE IDENTIFIER | ||
0: FDisk_partition_scheme *15.9 GB disk2 | ||
1: Windows_FAT_32 boot 268.4 MB disk2s1 | ||
2: Linux 15.7 GB disk2s2 | ||
|
||
$ sudo diskutil unmount /dev/diskn | ||
disk2 was already unmounted or it has a partitioning scheme so use "diskutil unmountDisk" instead | ||
|
||
$ sudo diskutil unmountDisk /dev/diskn (if previous step fails) | ||
Unmount of all volumes on disk2 was successful | ||
|
||
$ sudo dd bs=1m if=$HOME/Downloads/tails-amd64-4.18.img of=/dev/rdiskn | ||
1131+0 records in | ||
1131+0 records out | ||
1185939456 bytes transferred in 44.708618 secs (26525970 bytes/sec) | ||
|
||
$ sudo diskutil unmountDisk /dev/diskn | ||
Unmount of all volumes on disk2 was successful | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["command", [ | ||
["shell-symbol", "$"], | ||
["bash", ["diskutil list"]] | ||
]], | ||
|
||
["output", "/dev/disk0 (internal, physical):\r\n #: TYPE NAME SIZE IDENTIFIER\r\n 0: GUID_partition_scheme *500.3 GB disk0\r\n 1: EFI EFI 209.7 MB disk0s1\r\n 2: Apple_APFS Container disk1 500.1 GB disk0s2\r\n\r\n/dev/disk1 (synthesized):\r\n #: TYPE NAME SIZE IDENTIFIER\r\n 0: APFS Container Scheme - +500.1 GB disk1\r\n Physical Store disk0s2\r\n 1: APFS Volume Macintosh HD - Data 340.9 GB disk1s1\r\n 2: APFS Volume Preboot 85.9 MB disk1s2\r\n 3: APFS Volume Recovery 529.0 MB disk1s3\r\n 4: APFS Volume VM 3.2 GB disk1s4\r\n 5: APFS Volume Macintosh HD 11.3 GB disk1s5\r\n\r\n/dev/disk2 (internal, physical):\r\n #: TYPE NAME SIZE IDENTIFIER\r\n 0: FDisk_partition_scheme *15.9 GB disk2\r\n 1: Windows_FAT_32 boot 268.4 MB disk2s1\r\n 2: Linux 15.7 GB disk2s2\r\n\r\n"], | ||
["command", [ | ||
["shell-symbol", "$"], | ||
["bash", [ | ||
["function", "sudo"], | ||
" diskutil unmount /dev/diskn" | ||
]] | ||
]], | ||
|
||
["output", "disk2 was already unmounted or it has a partitioning scheme so use \"diskutil unmountDisk\" instead\r\n\r\n"], | ||
["command", [ | ||
["shell-symbol", "$"], | ||
["bash", [ | ||
["function", "sudo"], | ||
" diskutil unmountDisk /dev/diskn ", | ||
["punctuation", "("], | ||
"if previous step fails", | ||
["punctuation", ")"] | ||
]] | ||
]], | ||
|
||
["output", "Unmount of all volumes on disk2 was successful\r\n\r\n"], | ||
["command", [ | ||
["shell-symbol", "$"], | ||
["bash", [ | ||
["function", "sudo"], | ||
["function", "dd"], | ||
["assign-left", ["bs"]], | ||
["operator", ["="]], | ||
"1m ", | ||
["assign-left", ["if"]], | ||
["operator", ["="]], | ||
["environment", "$HOME"], | ||
"/Downloads/tails-amd64-4.18.img ", | ||
["assign-left", ["of"]], | ||
["operator", ["="]], | ||
"/dev/rdiskn" | ||
]] | ||
]], | ||
|
||
["output", "1131+0 records in\r\n1131+0 records out\r\n1185939456 bytes transferred in 44.708618 secs (26525970 bytes/sec)\r\n\r\n"], | ||
["command", [ | ||
["shell-symbol", "$"], | ||
["bash", [ | ||
["function", "sudo"], | ||
" diskutil unmountDisk /dev/diskn" | ||
]] | ||
]], | ||
|
||
["output", "Unmount of all volumes on disk2 was successful"] | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
$ gpg --card-status | ||
Reader ...........: Yubico YubiKey CCID | ||
Application ID ...: D******************************* | ||
Application type .: OpenPGP | ||
Version ..........: 0.0 | ||
Manufacturer .....: Yubico | ||
Serial number ....: 1******* | ||
Name of cardholder: John Doe | ||
Language prefs ...: en | ||
Salutation .......: | ||
URL of public key : [not set] | ||
Login data .......: john@example.net | ||
Signature PIN ....: not forced | ||
Key attributes ...: ed25519 cv25519 ed25519 | ||
Max. PIN lengths .: 127 127 127 | ||
PIN retry counter : 3 0 3 | ||
Signature counter : 0 | ||
KDF setting ......: off | ||
UIF setting ......: Sign=on Decrypt=on Auth=on | ||
Signature key ....: ACE1 3F15 90C1 A8C9 D942 51E3 02ED C61B 6543 509B | ||
created ....: 2021-07-21 18:44:34 | ||
Encryption key....: 0524 00F4 8E1D 085A F3E1 61EC D463 4E0D 6E2D D8BF | ||
created ....: 2021-07-21 18:44:52 | ||
Authentication key: A27B 582F 1F62 03BA 549B 3D44 1E7B 69B2 38FF A21B | ||
created ....: 2021-07-21 18:45:13 | ||
General key info..: sub ed25519/0x02EDC61B6543509B 2021-07-21 John Doe <john@example.net> | ||
sec# ed25519/0xC2709D13BAB4763C created: 2021-07-21 expires: never | ||
ssb> ed25519/0x02EDC61B6543509B created: 2021-07-21 expires: 2022-07-21 | ||
card-no: 0006 1******* | ||
ssb> cv25519/0xD4634E0D6E2DD8BF created: 2021-07-21 expires: 2022-07-21 | ||
card-no: 0006 1******* | ||
ssb> ed25519/0x1E7B69B238FFA21B created: 2021-07-21 expires: 2022-07-21 | ||
card-no: 0006 1******* | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["command", [ | ||
["shell-symbol", "$"], | ||
["bash", ["gpg --card-status"]] | ||
]], | ||
["output", "Reader ...........: Yubico YubiKey CCID\r\nApplication ID ...: D*******************************\r\nApplication type .: OpenPGP\r\nVersion ..........: 0.0\r\nManufacturer .....: Yubico\r\nSerial number ....: 1*******\r\nName of cardholder: John Doe\r\nLanguage prefs ...: en\r\nSalutation .......:\r\nURL of public key : [not set]\r\nLogin data .......: john@example.net\r\nSignature PIN ....: not forced\r\nKey attributes ...: ed25519 cv25519 ed25519\r\nMax. PIN lengths .: 127 127 127\r\nPIN retry counter : 3 0 3\r\nSignature counter : 0\r\nKDF setting ......: off\r\nUIF setting ......: Sign=on Decrypt=on Auth=on\r\nSignature key ....: ACE1 3F15 90C1 A8C9 D942 51E3 02ED C61B 6543 509B\r\n created ....: 2021-07-21 18:44:34\r\nEncryption key....: 0524 00F4 8E1D 085A F3E1 61EC D463 4E0D 6E2D D8BF\r\n created ....: 2021-07-21 18:44:52\r\nAuthentication key: A27B 582F 1F62 03BA 549B 3D44 1E7B 69B2 38FF A21B\r\n created ....: 2021-07-21 18:45:13\r\nGeneral key info..: sub ed25519/0x02EDC61B6543509B 2021-07-21 John Doe <john@example.net>\r\nsec# ed25519/0xC2709D13BAB4763C created: 2021-07-21 expires: never\r\nssb> ed25519/0x02EDC61B6543509B created: 2021-07-21 expires: 2022-07-21\r\n card-no: 0006 1*******\r\nssb> cv25519/0xD4634E0D6E2DD8BF created: 2021-07-21 expires: 2022-07-21\r\n card-no: 0006 1*******\r\nssb> ed25519/0x1E7B69B238FFA21B created: 2021-07-21 expires: 2022-07-21\r\n card-no: 0006 1*******"] | ||
] |