- 博客(65)
- 资源 (1)
- 收藏
- 关注
原创 待修改(获取真实ip后)使用Ddos deflate 解决服务器被ddos攻击
使用Ddos deflate 解决服务器被ddos攻击_anna.engineer的博客-CSDN博客_ddos deflate
2022-08-31 15:33:59
256
原创 wireshark解密https流量
2、谷歌浏览器启动参数带入"C:\Program Files\Google\Chrome\Application\chrome.exe"--ssl-key-log-file=c:\users\admin\documents\ssl-key.log,把预主密钥保存到本地用于解密。3、抓包后,tls数据报文变为http协议。登录网站的密码可以正常抓取到。1、wireshark首选项-协议配置-tls-导入证书私钥。...
2022-08-16 14:38:48
4119
1
原创 TCP保活机制&nginx长连接相关:ngx_http_upstream_keepalive_module
长连接超时设置增加nginx后端长连接的超时支持: upstream backend { server 127.0.0.1:8080; keepalive 32; keepalive_timeout 30s; # 设置后端连接的最大idle时间为30s }指令该指令设置后端长连接的最大空闲超时时间,参数的时间单位可以是s(秒),ms(毫秒),m(分钟)。默认时间单位是秒。..............................
2022-08-15 11:23:54
1857
原创 Linux 抓包&iptables
添加 iptables 限制后, tcpdump 是否能抓到包 ,这要看添加的 iptables 限制条件:网络包进入主机后的顺序如下:
2022-08-10 10:14:49
543
原创 Cookie中设置了 HttpOnly,Secure 属性,有效的防止XSS攻击,X-Frame-Options 响应头避免点击劫持
X-Frame-Options HTTP 响应头,表示 是否允许一个页面在 , 或者 中展现的标记。如果在Cookie中设置了"HttpOnly"属性,那么通过程序(JS脚本、Applet等)将无法读取到Cookie信息,这样能有效的防止XSS攻击。DENY :该页面不允许在 frame 中展示,即便是在相同域名的页面中嵌套也不允许。...
2022-08-08 13:08:11
3359
原创 批量下载视频小技巧
yuminstallpython3-pip-ypip3installyou-getseq95|xargs-i-P10you-gethttps//www.bilibili.com/video/BV1gr4y1U7CY?p={}
2022-07-22 23:16:00
236
原创 nginx+apache (400 Bad RequestThe plain HTTP request was sent to HTTPS port)
Nginx配置: apache配置:访问报错: 思路:nginx在不同的执行阶段,来完成Location http到https。1、proxy_pass执行前,先设置了request head host 为https外网访问的域名+端口。2、proxy_pass执行后,apache结果反馈response。3、proxy_redirect修改response中的location中的协议为http为https外网访问的协议。............
2022-07-14 14:21:06
2370
原创 Nginx日志相关
log_format main '"" "{$http_x_real_ip}" "[$http_x_forwarded_for]" "($remote_addr)"' '$http_user_agent - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ';
2022-07-13 18:40:21
454
原创 apache日志相关
LogFormat " {%{X-Real-IP}i} [%{X-Forwarded-For}i] [%{Host}i] %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
2022-07-13 18:31:38
145
转载 nginx中server_name与host匹配优先级
在开始处理一个http请求时,nginx会取出header头中的host,与nginx.conf中每个server的server_name进行匹配,以此决定到底由哪一个server块来处理这个请求。server_name与host匹配优先级如下:1、完全匹配,选择所有字符串完全匹配的server_name,如www.test.com2、通配符在前面的server_name,如*.test.com3、通配符在后面的server_name,如www.test.*4、最后选择使用正则表达式才匹配的server_n
2022-07-12 20:46:10
2648
原创 grep命令用法
n显示匹配行时,与文件行号一起显示。(显示结果所在的行号)R递归的读取每个目录下的所有文件,遵循所有符合链接。i忽略字符大小写的差别-E 可以传递多个内容,使用|来分割多个pattern ,以此实现OR操作[root@i-3pedyvud ~]# grep -Rn "LoadModule" /etc/httpd*/etc/httpd/conf/httpd.conf:48:# have to place corresponding `LoadModule' lines at this location so
2022-06-23 00:39:51
2081
原创 Centos7/8卸载软件
yum/dnf history #可以看到你的安装记录,然后有个IDyum/dnf history undo ID #会将当时安装的所有软件、依赖以及本地文件 全部卸载干净yum/dnf remove #只会卸载软件本身,软件所安装的依赖、本地文件都不会删除......
2022-06-22 23:56:26
1301
原创 sed举例&& ssh超时断开解决方法
[root@a ~]# date;netstat -antp|grep -w 'tcp' | grep '192.168.0.185' | awk '{print $4,$6}' | sed 's/:/ /g' | awk '{print $1,$3}' | sort | uniq -cTue May 31 15:05:29 CST 2022 5 192.168.0.185 ESTABLISHED 1 192.168.0.185 LAST_ACKsed 's/:/ /g'...
2022-05-31 15:08:00
307
原创 sql注入、xss语句测试
d:\Users\Administrator\Desktop\curl-7.80.0-win64-mingw\bin>curl.exe -Iv http://www.bj2342.cn/?id=1'or'1'='1 -H "X-Forwarded-For:1.1.1.1" -H "X-Forwarded-For:2.2.2.2"
2022-02-17 14:41:01
758
原创 Linux系统管理
创建一个用户,-d指定家目录,-s指定shell -e用户过期时间 -c用户描述 -m如果家目录不存在创建家目录[root@i-3pedyvud dispatcher.d]# useradd -d /home/rootbak -s /bin/bash -e '2099-01-01' -K PASS_MAX_DAYS=-1 -c 'User rootbak' -m rootbakuseradd:用户“rootbak”已存在[root@i-3pedyvud dispatcher.d]# chage -.
2022-02-04 18:57:32
673
原创 ?shell select
#!/bin/bashPS3="请选择要执行的程序. :"select program in 'netstat -antolp|grep "ESTABLISHED"' 'exit' 'date' 'pwd'do $programdone~
2022-01-23 19:15:33
446
原创 while循环语句
[root@i-3pedyvud ~]# cat quiz.sh#!/bin/bashecho "2007年12月19日选举的第17任大韩民国总统是谁?"read answerwhile [[ "$answer" != "李明博" ]]do echo "不是正确答案,请重新输入!" read answerdoneecho 正确答案. ::李明博[root@i-3pedyvud ~]# ...
2022-01-23 00:13:05
147
原创 nmap命令
nmap测试加密套件[root@i-3pedyvud script]# nmap --script ssl-enum-ciphers -p 8999 36.41.188.74Starting Nmap 7.92 ( https://nmap.org ) at 2022-01-21 21:21 CSTNmap scan report for cde.gkmang.cn (36.41.188.74)Host is up (0.025s latency).PORT STATE SERVIC
2022-01-21 21:26:33
3285
原创 tcpdump使用命令
tcpdump -i eth0 host 10.140.19.9 -nn -w >> 2b1.pcap -n 指定将每个监听到数据包中的域名转换成IP地址后显示,不把网络地址转换成名字; -nn: 指定将每个监听到的数据包中的域名转换成IP、端口从应用名称转换成端口号后显示 -w 直接将包写入文件中,并不分析和打印出来;.........
2022-01-21 15:36:09
647
原创 for 命令
路径/root/123/* 下的文件添加X权限。[root@i-3pedyvud script]# cat permx1.sh#!/bin/bashfor file in /root/123/*do if [[ -f $file && ! -x $file ]] then chmod +x $file echo $file 向文件添加执行许可 fidone[root@i-3pedyvud script]#...
2022-01-21 10:53:30
628
原创 here文档和case
[root@i-3pedyvud ~]# cat apache_status1.sh #!/bin/bashecho "请选择启动或终止web服务器"cat <<- ENDIT 1、启动apache服务 2、终止apache服务 3、重启apache服务ENDITread choicecase "$choice" in1) STATUS="开始" systemctl start httpd ;;2) STATUS="终止" systemctl stop http.
2022-01-18 00:09:44
1365
原创 awk、strftime函数
[root@i-3pedyvud ~]# awk 'BEGIN{now=strftime("%D",systime());print now}'01/16/22[root@i-3pedyvud ~]# awk 'BEGIN{now=strftime("%T");print now}'13:57:42[root@i-3pedyvud ~]# awk 'BEGIN{now=strftime("%m/%d/%y");print now}'01/16/22[root@i-3pedyvud ~]# awk
2022-01-16 14:00:29
864
原创 if、else、else if、next
[root@i-3pedyvud ~]# cat awkdataTom 85Jane 91Mary 74[root@i-3pedyvud ~]# cat awkscript1 {if ($2 > 89 && $2 < 101) print $1,"的学分是:Grade A"else if ($2 > 79) print $1,"的学分是:Grade B"else if ($2 > 69) print $1 ,"的学分是:Grade C"el.
2022-01-15 17:21:22
229
原创 apache虚拟主机
/etc/httpd/conf/httpd.confServerRoot "/etc/httpd"Listen 8088Listen 8443Include conf.modules.d/*.confUser apacheGroup apacheServerAdmin admin@abc.gkmang.cn<Directory /> AllowOverride none Require all denied</Directory>DocumentRo...
2022-01-15 00:54:21
176
原创 vim技巧
1,删除以#号开头的行::g/^#/d:%s/^#.*\n2,删除以空格开头的行::g/^\s/d “\s代表空格”:%s/^\s.*\n3,删除以空格#开头的注释行::g/^\ .*#/d “(.*)代表若干”:%s/^\s.*#.*\n//g4,删除空白行::g/^$/d:g/^\s*$/d “删除由空格组成的行”:g/^...
2022-01-15 00:41:57
277
原创 awk举例
按照第5列排序列出后,按照第4列为root,然后显示出目录文件[root@i-3pedyvud ~]# ls -l | sort -n -k5 | awk '$4 = "root"'| grep '^d'drwxr-xr-x 2 root root 21 1月 13 22:52 seddrwxr-xr-x 2 root root 33 1月 12 10:59 bindrwxr-xr-x 5 root root 43 1月 11 16:51 sharedrwxr-xr-x 5 root root.
2022-01-13 23:20:45
316
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人