SHARE
TWEET

Untitled

a guest Jul 17th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import string
  2.  
  3.     def bruteForce(charList,size,nwCombination=[]):
  4.         if not nwCombination:
  5.             nwCombination=charList
  6.         if size==1:
  7.             return nwCombination
  8.         finalCombination=[]
  9.         for x in charList:
  10.             for n in nwCombination:
  11.                 cntStr=str(x)+""+str(n)
  12.                 finalCombination.append(cntStr)
  13.                 if(cntStr=='aadd'):
  14.                     print("string found")
  15.                     print(cntStr)
  16.                     exit(0)
  17.         return bruteForce(charList,size-1,finalCombination)
  18.  
  19.     allCharlist=string.ascii_lowercase+string.ascii_uppercase
  20.     bruteForce(list(allCharlist)+list(range(0,9)),5)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top