mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-05-19 18:58:03 +02:00
add error warp
This commit is contained in:
+19
-1
@@ -1,6 +1,7 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"hack-browser-data/log"
|
||||
"io/ioutil"
|
||||
@@ -11,6 +12,23 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
var (
|
||||
passwordIsEmpty = errors.New("decrypt fail, password is empty")
|
||||
)
|
||||
|
||||
type DecryptError struct {
|
||||
err error
|
||||
msg string
|
||||
}
|
||||
|
||||
func (e *DecryptError) Error() string {
|
||||
return fmt.Sprintf("%s: %s", e.msg, e.err)
|
||||
}
|
||||
|
||||
func (e *DecryptError) Unwrap() error {
|
||||
return e.err
|
||||
}
|
||||
|
||||
const (
|
||||
LoginData = "Login Data"
|
||||
History = "History"
|
||||
@@ -49,7 +67,7 @@ func IntToBool(a int) bool {
|
||||
|
||||
func TimeEpochFormat(epoch int64) time.Time {
|
||||
maxTime := int64(99633311740000000)
|
||||
if epoch > maxTime{
|
||||
if epoch > maxTime {
|
||||
epoch = maxTime
|
||||
}
|
||||
t := time.Date(1601, 1, 1, 0, 0, 0, 0, time.UTC)
|
||||
|
||||
Reference in New Issue
Block a user