SHARE
TWEET

Untitled

a guest Apr 13th, 2019 110 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/local/bin/miniscript
  2.  
  3. // String Split
  4. // Splitting a string into a list of strings is an insanely useful thing to do.
  5. // Alas, MiniScript doesn't have a standard intrinsic for that.  Perhaps it
  6. // will one day.  Until then, here’s code that does the job.
  7. split = function(s, delim=" ")
  8.  result = []
  9.  wordStart = 0
  10.  sLen = s.len
  11.  delimLen = delim.len
  12.  i = 0
  13.  while i < sLen
  14.    if s[i:i+delimLen] == delim then
  15.      result = result + [ s[wordStart:i] ]
  16.      wordStart = i + delimLen
  17.      i = wordStart
  18.    else
  19.      i = i + 1
  20.    end if
  21.  end while
  22. return result + [ s[wordStart:i] ]
  23. end function
  24.  
  25. hashes = split(File.open("/home/panda/Desktop/Miniscript/hashes").read, ",")
  26. passwords = split(File.open("/home/panda/Desktop/Miniscript/passwords").read, " ")
  27. uncracked = []
  28. for hash in hashes
  29.  i=0
  30.  for password in passwords
  31.    if password[password.indexOf(":")+1:] == hash[hash.indexOf(":")+1:] then
  32.      print(hash[:hash.indexOf(":")]+":"+password[:password.indexOf(":")])
  33.      i=1
  34.      break
  35.    end if
  36.  end for
  37.  if i == 0 then
  38.    uncracked.push(hash)
  39.  end if
  40. end for
  41. print(" ")
  42. print("Uncracked hashes")
  43. for uncrack in uncracked
  44.  print(uncrack)
  45. end for
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top