上一页 1 2 3 4 5 6 ··· 9 下一页
摘要: 1.NAT基础知识 NAT(Network Address Translation)译为网络地址转换,NAT技术可以修改数据包的源地址、目的地址以及源端口、目的端口等信息。NAT技术通常用于端口和流量的转发、重定向,实现如端口映射、跨网络访问、流量代理等功能。 2.iptables实现NAT转发 首 阅读全文
posted @ 2023-08-23 09:45 妇愁者纞萌 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 一.IDS和IPS IDS(Intrusion Detection Systems):入侵检测系统,是一种网络安全设备或应用软件,可以依照一定的安全策略,对网络、系统的运行状况进行监视,可以发现各种攻击行为并发出安全警报。 IPS(Intrusion Prevention System):入侵防御系 阅读全文
posted @ 2023-08-22 19:35 妇愁者纞萌 阅读(436) 评论(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 妇愁者纞萌 阅读(37) 评论(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 妇愁者纞萌 阅读(3) 评论(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 妇愁者纞萌 阅读(15) 评论(0) 推荐(0) 编辑
摘要: Go 语言通过内置的错误接口提供了非常简单的错误处理机制。 error类型是一个接口类型 type error interface { Error() string} package main import ( "fmt") // 定义一个 DivideError 结构type DivideErro 阅读全文
posted @ 2023-08-14 20:57 妇愁者纞萌 阅读(5) 评论(0) 推荐(0) 编辑
摘要: Go 语言提供了另外一种数据类型即接口,它把所有的具有共性的方法定义在一起,任何其他类型只要实现了这些方法就是实现了这个接口。 package main import ( "fmt") type Phone interface { call()} type NokiaPhone struct {} 阅读全文
posted @ 2023-08-14 20:14 妇愁者纞萌 阅读(4) 评论(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 妇愁者纞萌 阅读(3) 评论(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 妇愁者纞萌 阅读(3) 评论(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 妇愁者纞萌 阅读(4) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 9 下一页