go

谈一谈|一台云服务器能做什么

大憨熊 提交于 2021-01-21 22:23:14
欢迎点击「算法与编程之美」↑关注我们! 本文首发于微信公众号:"算法与编程之美",欢迎关注,及时了解更多此系列文章。 欢迎加入团队圈子!与作者面对面!直接点击! 云服务器介绍 我们经常听到服务器这个东西,大致对 服务器 的了解就是一个能装很多东西的容器,能够实现文件的传输,最常见的就是将多个人连接进一局游戏。 其实服务器也是计算机的一种,相比于我们使用的计算机,它有着高速的 CPU 运算能力、长时间的可靠运行等特点。 因此一些互联网厂商如腾讯,阿里都推出了云服务器供大家购买使用。相比购买服务器,云服务器更加便捷、便宜,而且不同人群有不同的选择。接下来我们看看拥有一台云服务器可以简单的做哪些事 准备 执行以下操作都需要具有自己的一台云服务器,甚至涉及到海外服务器,以及售出方提供的该服务器的管理账户与密码,请根据自身需求来选择。 配置方面,根据购买的服务器系统,我们可以利用虚拟机或是 Xshell 软件来对服务器进行配置。 搭建 ssr 实现科学上网 ss 即 shadowsocks 缩写,主要功能是开放服务器端口来使我们的移动端设备能够接入服务器网络,实现“加速器”功能。 实现该功能一般使用香港或是国外的服务器,根据服务器提供的公用 ip ,以及 root 账户与密码进行连接。这里笔者是通过 Linux 虚拟机 ssh 连接进入服务器进行配置的。 具体方法为: Linux 控制台输入

远控免杀专题(5)-Veil免杀(VT免杀率23/71)

你说的曾经没有我的故事 提交于 2021-01-21 09:42:15
本专题文章导航 1、远控免杀专题(1)-基础篇: https://mp.weixin.qq.com/s/3LZ_cj2gDC1bQATxqBfweg 2、远控免杀专题(2)-msfvenom隐藏的参数: https://mp.weixin.qq.com/s/1r0iakLpnLrjCrOp2gT10w 3、远控免杀专题(3)-msf自带免杀(VT免杀率35/69): https://mp.weixin.qq.com/s/A0CZslLhCLOK_HgkHGcpEA 4、远控免杀专题(4)-Evasion模块(VT免杀率12/71): https://mp.weixin.qq.com/s/YnnCM7W20xScv52k_ubxYQ 5、远控免杀专题(5)-Veil免杀(VT免杀率23/71):本文 文章打包下载及相关软件下载: https://github.com/TideSec/BypassAntiVirus 免杀能力一览表 几点说明: 1、下表中标识 √ 说明相应杀毒软件未检测出病毒,也就是代表了Bypass。 2、为了更好的对比效果,大部分测试payload均使用msf的 windows/meterperter/reverse_tcp 模块生成。 3、由于本机测试时只是安装了360全家桶和火绒,所以默认情况下360和火绒杀毒情况指的是静态+动态查杀。360杀毒版本 5.0.0

Docker for golang application

非 Y 不嫁゛ 提交于 2021-01-21 08:12:08
问题 i've golang application which I want to build docker image for it the application folder called cloud-native-go and the dockerfile is under the root project Any idea what is wrong here ? FROM golang:alpine3.7 WORKDIR /go/src/app COPY . . RUN apk add --no-cache git RUN go-wrapper download # "go get -d -v ./..." RUN go-wrapper install # "go install -v ./..." #final stage FROM alpine:latest RUN apk --no-cache add ca-certificates COPY --from=builder /go/bin/app /app ENTRYPOINT ./app LABEL Name

How to split a string by multiple delimiters

白昼怎懂夜的黑 提交于 2021-01-21 06:57:05
问题 I want to parse a string xxxxx:yyyyy:zzz.aaa.bbb.cc:dd:ee:ff to a struct in Go, how can I do it with multiple delimiter ':' and '.'. Edit: I want to split the string "xxxxx:yyyyy:zzz.aaa.bbb.cc:dd" into below struct type type Target struct { Service string Type string Domain string Plan string Host string Region string Other string } So that Service = xxxxx Type = yyyyy Domain = zzzz Plan = aaa Host = bbb Region = cc Other = dd 回答1: You may use strings.FieldsFunc(input, Split) Try it on The

What does *(*int)(nil) = 0 mean in golang?

萝らか妹 提交于 2021-01-21 06:42:08
问题 I notice there is one line *(*int)(nil) = 0 in function throw //go:nosplit func throw(s string) { // Everything throw does should be recursively nosplit so it // can be called even when it's unsafe to grow the stack. systemstack(func() { print("fatal error: ", s, "\n") }) gp := getg() if gp.m.throwing == 0 { gp.m.throwing = 1 } fatalthrow() *(*int)(nil) = 0 // not reached } What does *(*int)(nil) = 0 means? and since this line *(*int)(nil) = 0 could NOT be reached, why it is here? any special

go-ethereum

核能气质少年 提交于 2021-01-21 05:04:32
如果要深入了解go-ethereum项目的实现与机制,看源代码是必不可少的。今天这篇博客就简单介绍一下如何在本地搭建项目的开发环境。 GO语言环境搭建 以win8为例,访问地址 https://golang.org/dl/ ,下载windows版本。直接执行安装,默认会安装到C:\Go目录下,将 c:\Go\bin 目录添加到 PATH 环境变量中。 执行命令,验证安装配置成功: C: \Users \Administrator>go version go version go1.7.4 windows/amd64 1 2 开发ide 本篇博客以intellij idea 15为例。 首先安装go语言插件(地址 https://github.com/go-lang-plugin-org )。进入idea的settings,选择plugins, Browse repositories,搜索go lang。具体操作如下图: 点击install,安装Go Lang Plugin。上图仅为参考,因为截图中的idea已经安装过插件了。如果无法直接下载,可在Manager repositories中配置一下地址: https://plugins.jetbrains.com/plugins/alpha/5047 然后再尝试下载。如果因网路原因无法下载,可考虑在 https://plugins

聊聊promtail的Client

点点圈 提交于 2021-01-21 00:23:18
序 本文主要研究一下promtail的Client Client loki/pkg/promtail/client/client.go // Client pushes entries to Loki and can be stopped type Client interface { api.EntryHandler // Stop goroutine sending batch of entries. Stop() } Client接口内嵌了api.EntryHandler接口,定义了Stop方法 EntryHandler loki/pkg/promtail/api/types.go // EntryHandler is something that can "handle" entries. type EntryHandler interface { Handle(labels model.LabelSet, time time.Time, entry string) error } EntryHandler接口定义了Handle方法 client loki/pkg/promtail/client/client.go // Client for pushing logs in snappy-compressed protos over HTTP. type client

Fastest way of reading huge file in go lang with small RAM [closed]

[亡魂溺海] 提交于 2021-01-20 20:43:22
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . Improve this question I want to read the data from the different text or json or csv files. Which is the approach should I follow? I have read these blogs File read, read 2GB text file with small RAM for the different approach for file reading. Different approach: * Reading a file

Does Go guarantee constant addresses?

霸气de小男生 提交于 2021-01-20 19:13:38
问题 Given an object obj is there a guarantee that uintptr(unsafe.Pointer(&obj)) will always evaluate to the same value regardless of when it is called? Of course, Go guarantees that if you take two pointers to the same object, they will always compare equal. It might be possible though that an implementation moves an object in memory and transparently updates all pointers to it. This is interesting if you consider garbage collection strategies like Mark-and-Compact. Would an implementor be

Does Go guarantee constant addresses?

三世轮回 提交于 2021-01-20 19:13:36
问题 Given an object obj is there a guarantee that uintptr(unsafe.Pointer(&obj)) will always evaluate to the same value regardless of when it is called? Of course, Go guarantees that if you take two pointers to the same object, they will always compare equal. It might be possible though that an implementation moves an object in memory and transparently updates all pointers to it. This is interesting if you consider garbage collection strategies like Mark-and-Compact. Would an implementor be