Documentation ¶
Overview ¶
Ransomware example in Golang Copyright (C) 2017 Gustavo Henrique
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>
Ransomware example in Golang Copyright (C) 2017 Gustavo Henrique
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>
Ransomware example in Golang Copyright (C) 2017 Gustavo Henrique
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>
Ransomware example in Golang Copyright (C) 2017 Gustavo Henrique
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>
Ransomware example in Golang Copyright (C) 2017 Gustavo Henrique
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>
Index ¶
- Constants
- func CopyFileMetadata(srcFileInfo os.FileInfo, destFile string) error
- func DecryptDir(dirPath string, config ServerConfig) error
- func EncryptDir(dirPath string, config ServerConfig) error
- func Exists(name string) bool
- func GenSharedKey(privKey *ecdsa.PrivateKey, pubKey *ecdsa.PublicKey) ([]byte, error)
- func GenerateECDSAPrivateKey() (*ecdsa.PrivateKey, error)
- func GetCipherBlockMode(key []byte, mode CipherMode) (cipher.BlockMode, error)
- func ToHex(num *big.Int) string
- func WalkFuncDecorator(walkFn filepath.WalkFunc) filepath.WalkFunc
- type CipherMode
- type CipheredFileInfo
- type PrivKey
- type PubKey
- type ServerConfig
Constants ¶
const ( RSW_PREFIX string = "_fck_" RSW_HTML string = "rsw_welcome.html" ENCRYPT_MODE CipherMode = iota DECRYPT_MODE )
Variables ¶
This section is empty.
Functions ¶
func DecryptDir ¶
func DecryptDir(dirPath string, config ServerConfig) error
func EncryptDir ¶
func EncryptDir(dirPath string, config ServerConfig) error
func GenSharedKey ¶
func GenerateECDSAPrivateKey ¶
func GenerateECDSAPrivateKey() (*ecdsa.PrivateKey, error)
func GetCipherBlockMode ¶
func GetCipherBlockMode(key []byte, mode CipherMode) (cipher.BlockMode, error)
Types ¶
type CipherMode ¶
type CipherMode int
type CipheredFileInfo ¶
type PrivKey ¶
type PrivKey struct {
D string `json:"D"`
}
func GetOrCreatePrivKey ¶
func GetOrCreatePrivKey(ecdsaPrivKey *ecdsa.PrivateKey, file string) PrivKey
type PubKey ¶
func GetOrCreatePubKey ¶
func GetOrCreatePubKey(ecdsaPrivKey *ecdsa.PrivateKey, file string) PubKey