Skip to content

Instantly share code, notes, and snippets.

@igagankalra
Created May 28, 2018 04:48
Show Gist options
  • Select an option

  • Save igagankalra/7fd7e1e31db3f24325e67da32fae0b17 to your computer and use it in GitHub Desktop.

Select an option

Save igagankalra/7fd7e1e31db3f24325e67da32fae0b17 to your computer and use it in GitHub Desktop.
Python BruteForce Hello World
import random
import sys
import time
targetArray = ["H",'e','l',"l","o"," ", "W", "o", "r","l","d" ]
stringArray = ["","","","","","","","","","",""]
i=0
count = 0
while i < len(targetArray):
if stringArray[i] != targetArray[i]:
stringArray[i] = chr(random.randint(0,256))
if stringArray[i] == targetArray[i]:
i += 1
x = 0
print("\n")
while x< len(stringArray):
print(stringArray[x] , end = "" , flush = True)
x += 1
count += 1
time.sleep(.01)
print("\nTotal Gusses is :",count)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment