File tree Expand file tree Collapse file tree 4 files changed +41
-1
lines changed
Expand file tree Collapse file tree 4 files changed +41
-1
lines changed Original file line number Diff line number Diff line change @@ -91,4 +91,6 @@ nano_1c46rz7xnk98ozhzdjq7thwty844sgnqxk9496yysit1bnio1rcdzshc5ymn
9191
9292b2ced6f5-2542-4f7d-b131-e3ada95d8b75
93935fc7c33a7ef88b139122a38a
94- 01ERJ58HMWDN3VTRRHZQV2T5R5
94+ 01ERJ58HMWDN3VTRRHZQV2T5R5
95+
96+ otpauth://totp/Example:alice@google.com?secret=JBSWY3DPEHPK3PXP&issuer=Example
Original file line number Diff line number Diff line change 971971 " Nano"
972972 ]
973973 },
974+ {
975+ "Name" : " Time-Based One-Time Password (TOTP) URI" ,
976+ "Regex" : " ^([^?\\ n]+:\/\/ totp\/ [^\\ n]+secret=[A-Z2-7=]+[^\\ n]+)$" ,
977+ "plural_name" : false ,
978+ "Description" : null ,
979+ "Rarity" : 1 ,
980+ "URL" : null ,
981+ "Tags" : [
982+ " Credentials" ,
983+ " TOTP" ,
984+ " Bug Bounty"
985+ ]
986+ },
974987 {
975988 "Name" : " Google Cloud Platform API Key" ,
976989 "Regex" : " (?i)^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$" ,
Original file line number Diff line number Diff line change @@ -618,3 +618,10 @@ def test_file_fixture_ulid():
618618 result = runner .invoke (main , ["fixtures/file" ])
619619 assert result .exit_code == 0
620620 assert re .findall ("ULID" , str (result .output ))
621+
622+
623+ def test_file_fixture_totp_URI ():
624+ runner = CliRunner ()
625+ result = runner .invoke (main , ["fixtures/file" ])
626+ assert result .exit_code == 0
627+ assert re .findall ("Time-Based One-Time Password [(]TOTP[)] URI" , str (result .output ))
Original file line number Diff line number Diff line change @@ -1013,3 +1013,21 @@ def test_objectid():
10131013def test_ulid ():
10141014 res = r .check (["01ERJ58HMWDN3VTRRHZQV2T5R5" ])
10151015 assert "ULID" in str (res )
1016+
1017+
1018+ def test_totp_URI ():
1019+ res = r .check (
1020+ [
1021+ "otpauth://totp/Example:alice@google.com?secret=JBSWY3DPEHPK3PXP&issuer=Example"
1022+ ]
1023+ )
1024+ _assert_match_first_item ("Time-Based One-Time Password (TOTP) URI" , res )
1025+
1026+
1027+ def test_complex_totp_URI ():
1028+ res = r .check (
1029+ [
1030+ "otpauth://totp/My_Ex0T1c-L00king.name?issuer=ArgsShouldBeCommutable&secret=JBSWY3DPEHPK3PXP&digits=6&period=30"
1031+ ]
1032+ )
1033+ _assert_match_first_item ("Time-Based One-Time Password (TOTP) URI" , res )
You can’t perform that action at this time.
0 commit comments