host

host头攻击

我的未来我决定 提交于 2019-12-14 16:02:21
一、问题源起   HTTP1.1规范中在增加了HOST头信息,用于存储服务端与客户端的路由信息。   例如:     Request的Header里就有一个标名请求,它是用来记录服务端网站域名的。     如果前端或者后台正好用到这个值,比如jsp的       String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort();     那么黑客就可以通过修改HOST里域名值以达到攻击的目的。       比如request.getServerName()改成:www.baidu1.com,这样页面内引用后请求就会被转接了。 二、解决思路   主要解决方案主要分为两个:   1、不用HOST头的东西   2、防止“敌方”篡改这部分信息   3、使用加密等手段,使得篡改成本高到无以复加 三、解决方案    1、nginx代理强制指定header内容,例如: // nginx修改ngnix.conf文件   server {     ...     server_name www.abc.com;     proxy_set_header Host $host;     proxy_set_header X-Real-IP $remote_addr;    

Docker网络管理(容器间通信)

荒凉一梦 提交于 2019-12-14 15:09:55
一、前言 由于docker技术的火爆,导致现在越来越多的企业都在使用docker这种虚拟化技术。企业中使用docker这种虚拟化技术,其目的就是为了让docker中的容器对外提供服务。因此,我们必须深入了解一下docker的网络知识,以满足更高的网络需求。 二、Docker的原生网络 当你安装Docker时,它会自动创建三个网络。如下: [root@localhost ~]# docker network ls //查看docker的默认网络 NETWORK ID NAME DRIVER SCOPE a38bd52b4cec bridge bridge local 624b3ba70637 host host local 62f80646f707 none null local Docker内置这三个网络,运行容器时,你可以使用该“--network”选项来指定容器应连接到哪些网络。如果没有指定则默认使用bridge模式。 比如: host模式:使用 --net=host 指定; none模式:使用 --net=none 指定; bridge模式:使用 --net=bridge 指定(默认设置); 下面详细介绍一下这几种网络模式: 虽然docker模式提供三种网络模式,但其实是有四种网络模式的! 1.host模式 如果启动容器的时候使用host模式

ASP.NET Core框架深度学习(一) Hello World

倖福魔咒の 提交于 2019-12-14 14:26:18
  对于学习Core的框架,对我帮助最大的一篇文章是Artech的《 200行代码,7个对象——让你了解ASP.NET Core框架的本质 》,最近我又重新阅读了一遍该文。本系列文章就是结合我的阅读心得,一起来搭建一个迷你的Core框架。 本文相关代码在码云上,链接如下 https://gitee.com/qixinbo/MyKestrelServer/tree/master/CoreMini/CoreMini 还有部分是core的源码,链接如下 https://github.com/aspnet/AspNetCore/tree/master/src/Http 1、从Hello World谈起   当我们最开始学习一门技术的时候都喜欢从Hello World来时,貌似和我们本篇的主题不太搭。但事实却非如此,在我们看来如下这个Hello World是对ASP.NET Core框架本质最好的体现。 public class Program { public static void Main() => new WebHostBuilder() .UseKestrel() .Configure(app => app.Run(context => context.Response.WriteAsync("Hello World!"))) .Build() .Run(); }  

Install JetPack

三世轮回 提交于 2019-12-14 11:26:33
https://docs.nvidia.com/jetson/archives/jetpack-archived/jetpack-33/index.html#jetpack/3.3/introduction.htm%3FTocPath%3D_____1 Download and Install JetPack This document is intended to help you get familiar with installing JetPack, using the tools, and running sample code. System Requirements Host Platform: Ubuntu Linux x64 v16.04 Note that a valid Internet connection and at least 10GB of disk space is needed for the complete installation of JetPack. Target Platform: One of the following developer kits: Jetson TX2 Jetson TX2i Jetson TX1 Additional target requirements: USB Micro-B cable

hadoop的HA集群搭建

我怕爱的太早我们不能终老 提交于 2019-12-14 07:53:59
hadoop的HA集群搭建 环境 centos7,jdk1.8,zookeeper-3.5.5,hadoop-2.7.2 1.配置hosts:vi /etc/hosts 192.168.221.100 hadoop100 192.168.221.101 hadoop101 192.168.221.102 hadoop102 192.168.221.103 hadoop103 192.168.221.104 hadoop104 zookeeper的集群安装 1.进入zookeeper的conf目录下进行操作 cp zoo_sample.cfg zoo.cfg 2.zoo.cfg的配置 来源: CSDN 作者: smile-ls 链接: https://blog.csdn.net/qq_40198004/article/details/103470493

pip快速安装python库的方法(镜像网站)

十年热恋 提交于 2019-12-14 04:22:18
1、可以使用的镜像 阿里云:http://mirrors.aliyun.com/pypi/simple/ 清华:https://pypi.tuna.tsinghua.edu.cn/simple/ 中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/ 华中理工大学:http://pypi.hustunique.com/ 山东理工大学:http://pypi.sdutlinux.org/ 豆瓣:http://pypi.douban.com/simple/ 2、使用方法 pip3 install xx(库名,一次性安装多个加空格) -i 镜像源网址 --trusted-host 镜像源host pip3 install lxml tqdm pandas - i http: / / mirrors . aliyun . com / pypi / simple / -- trusted - host mirrors . aliyun . com 来源: CSDN 作者: 哲子兄 链接: https://blog.csdn.net/weixin_42445362/article/details/103461675

Java Android , HttpGet error - Host name may not be null

天涯浪子 提交于 2019-12-14 03:17:42
问题 I am using HttpGet to get the contents of some images. It has worked well but now it gives me errors with a new server I am using which returns images on the form of: https://amx-sfs.qpass.com/d/da/207b3f6f-4fda-4faf-b7ae-a186530e1245 The error is Host name may not be null I have researched and it seems that the error is common when underscores appear on the URL, however my URL only contains hyphen which i think is accepted by URI. Anyway i also tried using the following to escape the url

How to change the font size for multiple axes labels (created with host_subplot API)

偶尔善良 提交于 2019-12-14 02:33:04
问题 I looked on the internet and absolutely all the examples with multiple axes have the xlabel and ylabel at a default value and quite small I used the following code to create the axes: from mpl_toolkits.axes_grid1 import host_subplot import mpl_toolkits.axisartist as AA ... ax=[] if twoaxes or threeaxes: ax.append(host_subplot(111, axes_class=AA.Axes)) plt.subplots_adjust(right=0.75) else: ax.append(fig.add_subplot(111)) if twoaxes or threeaxes: ax.append(ax[0].twinx()) if threeaxes: ax.append

玩坏docker(七):修改镜像名称

倖福魔咒の 提交于 2019-12-13 11:59:17
如何在多个 Docker Host 上使用镜像。 这里有几种可用的方法: 用相同的 Dockerfile 在其他 host 构建镜像。 将镜像上传到公共 Registry(比如 Docker Hub),Host 直接下载使用。 搭建私有的 Registry 供本地 Host 使用。 为镜像命名 实际上一个特定镜像的名字由两部分组成:repository 和 tag。 [image name] = [repository]:[tag] 如果执行 docker build 时没有指定 tag,会使用默认值 latest。其效果相当于: docker build -t ubuntu-with-vi:latest 为镜像打标签 docker tag ubuntu-with-dockerfile01 ubuntu-with-dockerfile01:1.0 来源: CSDN 作者: 那记忆微凉 链接: https://blog.csdn.net/BigData_Mining/article/details/103519647

Python连载54-FTP编程

被刻印的时光 ゝ 提交于 2019-12-13 05:10:27
一、FTP工作流程 1.客户端链接远程主机上的FTP服务器 2.客户端输入用户名和密码(或者“anonymous”和电子邮件地址) 3.客户端和服务器进行各种文件传输和信息查询操作 4.客户端从远程FTP服务器退出,结束传 二、FTP文件表示 1.分三段表示FTP服务器上的文件 2.HOST:主机地址,类似于ftp.mozilla.org,以ftp开头 3.DIR:目录,表示文件所在本地的地址,例如:pub/andorid/focus/1.1 4.File:文件名称,例如:Klar-1.1-RC1.apk 如果想要完整精确的表示ftp上某一个文件,需要上述三个部分组合在一起 三、网址: http://ftp.mozilla.org/ 这是一个ftp的国际服务器 四、举例 [url=] [/url] import ftplib import os import socket​ # 三部分精确表示ftp服务器上的某一个文件 # 好多公开ftp服务器访问会出错或者没有反应 HOST = " ftp.acc.umu.se " DIR = " Public/EFLIB " FILE = " README " ​ # 1.客户端连接远程主机上的ftp服务器 try : f = ftplib.FTP() # 建立一个FTP对象 # 通过设置调试级别可以方便调试 f.set_debuglevel