Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local customKey = "key" --can be changed to anything, in string format
- local hashFile = "hashfile" --path where hash file is stored. hash should be on line 1 of file
- local wordsList = "english-words-canada" --path to file containing words
- local file = fs.open( hashFile, "r" )
- assert( file, hashFile .. " not found" )
- local key = file.readLine()
- file.close()
- write( "hash is " )
- if term.isColor() then
- term.setTextColor( colours.red )
- end
- print( key )
- if term.isColor() then
- term.setTextColor( colours.white )
- end
- sleep( 0.5 )
- write( "." )
- sleep( 0.5 )
- write( "." )
- sleep( 0.5 )
- write( "." )
- sleep( 0.5 )
- print( "" )
- print( "Cracking..." )
- local file = fs.open( wordsList, "r" )
- assert( file, wordsList .. " not found" )
- local i = 1
- while true do
- local word = file.readLine()
- if term.isColor() then
- term.setTextColor( colours.white )
- end
- write( i .. ". Testing " )
- if term.isColor() then
- term.setTextColor( colours.yellow )
- end
- print( word )
- i = i + 1
- if hmac_sha1( customKey, word ) == key then
- if term.isColor() then
- term.setTextColor( colours.white )
- end
- write( "Success! '" )
- if term.isColor() then
- term.setTextColor( colours.yellow )
- end
- write( word )
- if term.isColor() then
- term.setTextColor( colours.white )
- end
- print( "' is correct!" )
- write( "Found on trial " )
- if term.isColor() then
- term.setTextColor( colours.yellow )
- end
- write( i - 1 )
- if term.isColor() then
- term.setTextColor( colours.white )
- end
- print( "!" )
- break
- end
- sleep( 0.01 )
- end --while true
- file.close()
Add Comment
Please, Sign In to add comment