mirror of
https://github.com/autistic-symposium/sec-pentesting-toolkit.git
synced 2025-05-06 08:45:22 -04:00
some small fixes
This commit is contained in:
parent
a50737bc6b
commit
52067188ed
11 changed files with 65 additions and 0 deletions
25
Images/xor_imag.go
Normal file
25
Images/xor_imag.go
Normal file
|
@ -0,0 +1,25 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
)
|
||||
|
||||
func main() {
|
||||
file, err := os.Open("ataylor.png")
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return
|
||||
}
|
||||
info, _ := os.Stat("ataylor.png")
|
||||
input := make([]byte, info.Size())
|
||||
out := make([]byte, len(input))
|
||||
file.Read(input)
|
||||
|
||||
key := [...]byte{0x43, 0x53, 0x41, 0x57} // CSAW
|
||||
for i := 0; i < len(input); i++ {
|
||||
out[i] = input[i] ^ key[i%len(key)]
|
||||
}
|
||||
|
||||
fmt.Println(string(out))
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue