31 lines
461 B
Go
31 lines
461 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"inou/lib"
|
|
)
|
|
|
|
func main() {
|
|
if len(os.Args) < 2 {
|
|
fmt.Fprintln(os.Stderr, "Usage: decrypt-object <file>")
|
|
os.Exit(1)
|
|
}
|
|
lib.Init()
|
|
|
|
data, err := os.ReadFile(os.Args[1])
|
|
if err != nil {
|
|
fmt.Fprintln(os.Stderr, "Error reading:", err)
|
|
os.Exit(1)
|
|
}
|
|
|
|
decrypted, err := lib.CryptoDecryptBytes(data)
|
|
if err != nil {
|
|
fmt.Fprintln(os.Stderr, "Error decrypting:", err)
|
|
os.Exit(1)
|
|
}
|
|
|
|
os.Stdout.Write(decrypted)
|
|
}
|