Przeglądaj źródła

Add Malifious filter

The filter reads a file in the home and send the content outside
Gildas Chabot 8 lat temu
rodzic
commit
be8a531fde
4 zmienionych plików z 74 dodań i 0 usunięć
  1. 4 0
      README.md
  2. 20 0
      base64Encode/base64Encode.go
  3. BIN
      base64Encode/unicorn.png
  4. 50 0
      pluginSrc/unicorn/plugin.go

+ 4 - 0
README.md

@@ -13,6 +13,10 @@ To activate the plugins, move the `.so` files from the
13 13
 
14 14
 - Malicious plugin -> read a folder and write to image
15 15
   - Check source code?
16
+- Panic in plugin?
17
+- In presentation
18
+  - Add background about the solutions before the plugins: see the
19
+    presentation from the dotGo.
16 20
 
17 21
 ## Presentation
18 22
 

+ 20 - 0
base64Encode/base64Encode.go

@@ -0,0 +1,20 @@
1
+package main
2
+
3
+import (
4
+	"encoding/base64"
5
+	"fmt"
6
+	"io/ioutil"
7
+	"os"
8
+)
9
+
10
+func main() {
11
+	f, err := os.Open("unicorn.png")
12
+	if err != nil {
13
+		panic(err)
14
+	}
15
+	bytes, err := ioutil.ReadAll(f)
16
+	if err != nil {
17
+		panic(err)
18
+	}
19
+	fmt.Println(base64.StdEncoding.EncodeToString(bytes))
20
+}

BIN
base64Encode/unicorn.png


Plik diff jest za duży
+ 50 - 0
pluginSrc/unicorn/plugin.go