08 2023 档案

摘要:1. init 每一个源文件都可以包含一个init函数,该函数会在main函数执行前,被Go运行框架调用,也就是说init会在main函数前被调用,当有全局变量跟main函数 init 函数 同时出现的时候 执行的顺序是 全局函数==》init函数==》main函数 package main imp 阅读全文
posted @ 2023-08-24 15:33 妇愁者纞萌 阅读(36) 评论(0) 推荐(0) 编辑
摘要:1.文件读写 package main import ( "fmt" "os" ) func main(){ yaml_str,err:=os.ReadFile("poc/1.yml") if err!=nil{ panic(err) } poc_old:=string(yaml_str) os.W 阅读全文
posted @ 2023-08-24 14:58 妇愁者纞萌 阅读(25) 评论(0) 推荐(0) 编辑
摘要:github地址,感谢作者xzfxz开源 https://github.com/xzfxz/vue-manager-system 1. cnpm install 2. cnpm run dev 3. cnpm run build 阅读全文
posted @ 2023-08-24 14:53 妇愁者纞萌 阅读(10) 评论(0) 推荐(0) 编辑
摘要:唯一成功的一个 https://github.com/dem0ns/dnslogger_binary 阅读全文
posted @ 2023-08-24 14:53 妇愁者纞萌 阅读(30) 评论(0) 推荐(0) 编辑
摘要:1.NAT基础知识 NAT(Network Address Translation)译为网络地址转换,NAT技术可以修改数据包的源地址、目的地址以及源端口、目的端口等信息。NAT技术通常用于端口和流量的转发、重定向,实现如端口映射、跨网络访问、流量代理等功能。 2.iptables实现NAT转发 首 阅读全文
posted @ 2023-08-23 09:45 妇愁者纞萌 阅读(144) 评论(0) 推荐(0) 编辑
摘要:一.IDS和IPS IDS(Intrusion Detection Systems):入侵检测系统,是一种网络安全设备或应用软件,可以依照一定的安全策略,对网络、系统的运行状况进行监视,可以发现各种攻击行为并发出安全警报。 IPS(Intrusion Prevention System):入侵防御系 阅读全文
posted @ 2023-08-22 19:35 妇愁者纞萌 阅读(786) 评论(0) 推荐(0) 编辑
摘要:gpg文件加密 测试环境 linux ubuntu 1.创建秘钥 root@ubuntu:~# gpg --gen-key gpg (GnuPG) 1.4.20; Copyright (C) 2015 Free Software Foundation, Inc. This is free softw 阅读全文
posted @ 2023-08-22 19:25 妇愁者纞萌 阅读(58) 评论(0) 推荐(0) 编辑
摘要:启动单个goroutine package main import ( "fmt" "time") func hello(){ fmt.Println("hello")} func main() { go hello() fmt.Println("欢迎来到编程狮") time.Sleep(time. 阅读全文
posted @ 2023-08-14 21:05 妇愁者纞萌 阅读(8) 评论(0) 推荐(0) 编辑
摘要:Go语言提供了一种机制,在不知道具体类型的情况下,可以用反射来更新变量值,查看变量类型 Typeof package main import ( "fmt" "reflect") func main() { var booknum float32 = 6 var isbook bool = true 阅读全文
posted @ 2023-08-14 21:00 妇愁者纞萌 阅读(22) 评论(0) 推荐(0) 编辑
摘要:Go 语言通过内置的错误接口提供了非常简单的错误处理机制。 error类型是一个接口类型 type error interface { Error() string} package main import ( "fmt") // 定义一个 DivideError 结构type DivideErro 阅读全文
posted @ 2023-08-14 20:57 妇愁者纞萌 阅读(8) 评论(0) 推荐(0) 编辑
摘要:Go 语言提供了另外一种数据类型即接口,它把所有的具有共性的方法定义在一起,任何其他类型只要实现了这些方法就是实现了这个接口。 package main import ( "fmt") type Phone interface { call()} type NokiaPhone struct {} 阅读全文
posted @ 2023-08-14 20:14 妇愁者纞萌 阅读(6) 评论(0) 推荐(0) 编辑
摘要:package main import "fmt" func main() { var sum int = 17 var count int = 5 var mean float32 mean = float32(sum)/float32(count) fmt.Printf("mean 的值为: % 阅读全文
posted @ 2023-08-14 20:12 妇愁者纞萌 阅读(4) 评论(0) 推荐(0) 编辑
摘要:递归,就是在运行的过程中调用自己。 阶乘 package main import "fmt" func Factorial(x int) (result int) { if x == 0 { result = 1 } else { result = x * Factorial(x - 1) } re 阅读全文
posted @ 2023-08-14 20:10 妇愁者纞萌 阅读(6) 评论(0) 推荐(0) 编辑
摘要:定义 Map /* 声明变量,默认 map 是 nil */var map_variable map[key_data_type]value_data_type /* 使用 make 函数 */map_variable = make(map[key_data_type]value_data_type 阅读全文
posted @ 2023-08-14 20:08 妇愁者纞萌 阅读(5) 评论(0) 推荐(0) 编辑
摘要:range 关键字用于for循环中迭代数组(array)、切片(slice)、通道(channel)或集合(map)的元素。 package mainimport "fmt"func main() { //这是我们使用range去求一个slice的和。使用数组跟这个很类似 nums := []int 阅读全文
posted @ 2023-08-14 20:05 妇愁者纞萌 阅读(12) 评论(0) 推荐(0) 编辑
摘要:切片的长度是不固定的,可以追加元素,在追加时可能使切片的容量增大。 定义 var identifier []type var slice1 []type = make([]type, len) slice1 := make([]type, len) make([]T, length, capacit 阅读全文
posted @ 2023-08-14 20:01 妇愁者纞萌 阅读(20) 评论(0) 推荐(0) 编辑
摘要:结构体是由一系列具有相同类型或不同类型的数据构成的数据集合。 定义结构体 结构体定义需要使用 type 和 struct 语句。struct 语句定义一个新的数据类型,结构体中有一个或多个成员。type 语句设定了结构体的名称 type struct_variable_type struct { m 阅读全文
posted @ 2023-08-14 19:31 妇愁者纞萌 阅读(6) 评论(0) 推荐(0) 编辑
摘要:变量是一种使用方便的占位符,用于引用计算机内存地址。 Go 语言的取地址符是 &,放到一个变量前使用就会返回相应变量的内存地址。 package main import "fmt" func main() { var a int = 10 fmt.Printf("变量的地址: %x\n", &a ) 阅读全文
posted @ 2023-08-14 19:24 妇愁者纞萌 阅读(6) 评论(0) 推荐(0) 编辑
摘要:声明数组 var balance [10] float32 初始化数组 var balance = [5]float32{1000.0, 2.0, 3.4, 7.0, 50.0} var balance = []float32{1000.0, 2.0, 3.4, 7.0, 50.0} balance 阅读全文
posted @ 2023-08-14 14:57 妇愁者纞萌 阅读(6) 评论(0) 推荐(0) 编辑
摘要:局部变量 在函数体内声明的变量称之为局部变量,它们的作用域只在函数体内 package main import "fmt" func main() { /* 声明局部变量 */ var a, b, c int /* 初始化参数 */ a = 10 b = 20 c = a + b fmt.Print 阅读全文
posted @ 2023-08-14 11:48 妇愁者纞萌 阅读(5) 评论(0) 推荐(0) 编辑
摘要:RASP RASP(Runtime application self-protection)是一种内置或链接到应用程序环境中的安全技术,与应用程序融为一体,实时监测、阻断攻击,使程序自身拥有自我保护的能力。 工作原理 RASP技术是一种基于服务器的技术,一旦应用程序运行开始时就会激活。而且,所有RA 阅读全文
posted @ 2023-08-01 16:50 妇愁者纞萌 阅读(77) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示