Skip to content

Commit 72a7c41

Browse files
author
Gwen
committed
new github tokens format
1 parent 71c8667 commit 72a7c41

12 files changed

+12
-11
lines changed

class.GitHubSearch.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function __construct()
4949
$f_tokens = dirname(__FILE__).'/.tokens';
5050
if( file_exists($f_tokens) ) {
5151
$content = file_get_contents( $f_tokens );
52-
$m = preg_match_all( '([a-f0-9]{40}|ghp_[a-zA-Z0-9]{36})', $content, $matches );
52+
$m = preg_match_all( '([a-f0-9]{40}|ghp_[a-zA-Z0-9]{36}|github_pat_[_a-zA-Z0-9]{82})', $content, $matches );
5353
// var_dump($m);
5454
if( $m ) {
5555
$this->auth_token = $matches[0];

github-contributors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
if os.path.isfile(TOKENS_FILE):
3636
fp = open(TOKENS_FILE,'r')
3737
for line in fp:
38-
r = re.search( '^([a-f0-9]{40}|ghp_[a-zA-Z0-9]{36})$', line )
38+
r = re.search( '^([a-f0-9]{40}|ghp_[a-zA-Z0-9]{36}|github_pat_[_a-zA-Z0-9]{82})$', line )
3939
if r:
4040
t_tokens.append( r.group(1) )
4141

github-dorks.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ function usage( $err=null ) {
213213
$f_tokens = dirname(__FILE__).'/.tokens';
214214
if( file_exists($f_tokens) ) {
215215
$content = file_get_contents( $f_tokens );
216-
$m = preg_match_all( '([a-f0-9]{40}|ghp_[a-zA-Z0-9]{36})', $content, $matches );
216+
$m = preg_match_all( '([a-f0-9]{40}|ghp_[a-zA-Z0-9]{36}|github_pat_[_a-zA-Z0-9]{82})', $content, $matches );
217217
if( $m ) {
218218
$t_tokens = $matches[0];
219219
}

github-dorks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
if os.path.isfile(TOKENS_FILE):
3939
fp = open(TOKENS_FILE,'r')
4040
for line in fp:
41-
r = re.search( '^([a-f0-9]{40}|ghp_[a-zA-Z0-9]{36})$', line )
41+
r = re.search( '^([a-f0-9]{40}|ghp_[a-zA-Z0-9]{36}|github_pat_[_a-zA-Z0-9]{82})$', line )
4242
if r:
4343
t_tokens.append( r.group(1) )
4444

github-employees.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
if os.path.isfile(TOKENS_FILE):
8181
fp = open(TOKENS_FILE,'r')
8282
for line in fp:
83-
r = re.search( '^([a-f0-9]{40}|ghp_[a-zA-Z0-9]{36})$', line )
83+
r = re.search( '^([a-f0-9]{40}|ghp_[a-zA-Z0-9]{36}|github_pat_[_a-zA-Z0-9]{82})$', line )
8484
if r:
8585
t_tokens.append( r.group(1) )
8686

github-endpoints.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def doGetCode( url ):
212212
if os.path.isfile(TOKENS_FILE):
213213
fp = open(TOKENS_FILE,'r')
214214
for line in fp:
215-
r = re.search( '^([a-f0-9]{40}|ghp_[a-zA-Z0-9]{36})$', line )
215+
r = re.search( '^([a-f0-9]{40}|ghp_[a-zA-Z0-9]{36}|github_pat_[_a-zA-Z0-9]{82})$', line )
216216
if r:
217217
t_tokens.append( r.group(1) )
218218

github-secrets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def doGetCode( url ):
116116
if os.path.isfile(TOKENS_FILE):
117117
fp = open(TOKENS_FILE,'r')
118118
for line in fp:
119-
r = re.search( '^([a-f0-9]{40}|ghp_[a-zA-Z0-9]{36})$', line )
119+
r = re.search( '^([a-f0-9]{40}|ghp_[a-zA-Z0-9]{36}|github_pat_[_a-zA-Z0-9]{82})$', line )
120120
if r:
121121
t_tokens.append( r.group(1) )
122122

github-subdomains.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def doGetCode( url ):
104104
if os.path.isfile(TOKENS_FILE):
105105
fp = open(TOKENS_FILE,'r')
106106
for line in fp:
107-
r = re.search( '^([a-f0-9]{40}|ghp_[a-zA-Z0-9]{36})$', line )
107+
r = re.search( '^([a-f0-9]{40}|ghp_[a-zA-Z0-9]{36}|github_pat_[_a-zA-Z0-9]{82})$', line )
108108
if r:
109109
t_tokens.append( r.group(1) )
110110

github-survey/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
exit( 'Tokens file not found!' );
1515
}
1616
$content = file_get_contents( $f_tokens );
17-
$m = preg_match_all( '([a-f0-9]{40}|ghp_[a-zA-Z0-9]{36})', $content, $matches );
17+
$m = preg_match_all( '([a-f0-9]{40}|ghp_[a-zA-Z0-9]{36}|github_pat_[_a-zA-Z0-9]{82})', $content, $matches );
1818
if( $m ) {
1919
$t_tokens = $matches[0];
2020
}

github-survey2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
if os.path.isfile(TOKENS_FILE):
5252
fp = open(TOKENS_FILE,'r')
5353
for line in fp:
54-
r = re.search( '^([a-f0-9]{40}|ghp_[a-zA-Z0-9]{36})$', line )
54+
r = re.search( '^([a-f0-9]{40}|ghp_[a-zA-Z0-9]{36}|github_pat_[_a-zA-Z0-9]{82})$', line )
5555
if r:
5656
t_tokens.append( r.group(1) )
5757

0 commit comments

Comments
 (0)