Created
February 13, 2019 23:37
-
-
Save t94j0/7ae0b1d5699ec20b363704a498da32b7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import System.IO | |
import Data.Dates | |
import Data.List.Split | |
data ShadowEntry = ShadowEntry { | |
username :: String, | |
hash :: String | |
} deriving (Show) | |
parseShadowEntryString :: String -> ShadowEntry | |
parseShadowEntryString x = ShadowEntry (splitOn ":" x !! 0) (splitOn ":" x !! 1) | |
main = do | |
shadow <- readFile "./shadow" | |
putStr $ parseShadowEntryString "root:ABC" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment