File tree Expand file tree Collapse file tree 1 file changed +23
-23
lines changed
Expand file tree Collapse file tree 1 file changed +23
-23
lines changed Original file line number Diff line number Diff line change 1- # Commented out sample to pass scanning
2- #
3- #import hashlib
4- # print("I am very insecure. Bandit thinks so too.")
5- # #B110
6- # xs=[1,2,3,4,5,6,7,8]
7- # try:
8- # print(xs[7])
9- # print(xs[8])
10- # except: pass
1+ Commented out sample to pass scanning
112
12- # ys=[1, 2, None, None]
13- # for y in ys:
14- # try:
15- # print(str(y+3)) #TypeErrors ahead
16- # except: continue #not how to handle them
3+ import hashlib
4+ print ("I am very insecure. Bandit thinks so too." )
5+ #B110
6+ xs = [1 ,2 ,3 ,4 ,5 ,6 ,7 ,8 ]
7+ try :
8+ print (xs [7 ])
9+ print (xs [8 ])
10+ except : pass
1711
18- # #some imports
19- # import telnetlib
20- # import ftplib
12+ ys = [1 , 2 , None , None ]
13+ for y in ys :
14+ try :
15+ print (str (y + 3 )) #TypeErrors ahead
16+ except : continue #not how to handle them
2117
22- # #B303 and B324
23- # s = b"I am a string"
24- # print("MD5: " +hashlib.md5(s).hexdigest())
25- # print("SHA1: " +hashlib.sha1(s).hexdigest())
26- # print("SHA256: " +hashlib.sha256(s).hexdigest())
18+ #some imports
19+ import telnetlib
20+ import ftplib
21+
22+ #B303 and B324
23+ s = b"I am a string"
24+ print ("MD5: " + hashlib .md5 (s ).hexdigest ())
25+ print ("SHA1: " + hashlib .sha1 (s ).hexdigest ())
26+ print ("SHA256: " + hashlib .sha256 (s ).hexdigest ())
You can’t perform that action at this time.
0 commit comments