首页
关于
留言
归档
友人
壁纸
Search
1
windows10、win11组策略(gpedit.msc)打不开?
3,994 阅读
2
2021-11 UDP53 67 68 绕过校园网web认证
1,208 阅读
3
抖音圣诞树代码HTML
1,020 阅读
4
湖北联通光猫DT741-csf更改为桥接模式(G230U211R1.0.2)
890 阅读
5
Python+OpenCv的人脸口罩识别系统附模型训练
535 阅读
杂乱无章
心情随笔
主题插件
Typecho插件
Typecho主题
资源分享
Web源码
活动资源
源码分享
技术文档
Linux教程
Win11
AC无限控制器
DCN交换机
DCWS-6028
软件推荐
Windows
Android
专题
登录
Search
标签搜索
Linux
WEB
AC
DCWS-6028
AP
typecho
十五
累计撰写
35
篇文章
累计收到
88
条评论
首页
栏目
杂乱无章
心情随笔
主题插件
Typecho插件
Typecho主题
资源分享
Web源码
活动资源
源码分享
技术文档
Linux教程
Win11
AC无限控制器
DCN交换机
DCWS-6028
软件推荐
Windows
Android
专题
页面
关于
留言
归档
友人
壁纸
搜索到
7
篇与
的结果
2022-06-14
信息收集工具命令
批处理vbs批量输出当前目录下所有文件夹大小VBS脚本命名dim fso dim myFd dim path_fd dim myFdSize dim stm dim path_output Set fso = CreateObject("scripting.filesystemobject") path_fd=".\" path_output=".\文件大小.txt" Set stm = CreateObject("ADODB.Stream") stm.Type = 2 stm.Open stm.Charset = "UTF-8" stm.Position = stm.Size stm.WriteText "文件夹名称|文件夹大小" & chr(10) For Each myFd In Fso.getfolder(path_fd).SubFolders myFdSize=myFd.size stm.WriteText myFd.name & "|" & TSIZE(myFdSize) & chr(10) next stm.SaveToFile path_output, 2 stm.Close set stm = nothing msgbox "===输出已完成by十五===" msgbox "使用方法①将文件夹大小.txt内容复制到wps或者word表格中②数据工具栏选择分列功能选项③选择分隔符号④选择其他 输入“|”⑤下一步完成完成" function TSIZE(myFdSize) If myFdSize>=1024 And myFdSize<1024*1024 Then TSIZE = Round( myFdSize/1024, 3 ) & " K" ElseIf myFdSize>=1024*1024 And myFdSize<1024*1024*1024 Then TSIZE = Round( myFdSize/1024/1024, 3 ) & " M" ElseIf myFdSize>=1024*1024*1024 And myFdSize<1024*1024*1024*1024 Then TSIZE = Round( myFdSize/1024/1024/1024, 3 ) & " G" ElseIf myFdSize>=1024*1024*1024*1024 Then TSIZE = Round( myFdSize/1024/1024/1024/1024, 3 ) & " T" Else TSIZE = myFdSize & " B" End If end function说明TSIZE = Round( myFdSize/1024, 3 ) & " K" #为输出单位大小K;例当前输出为328K,更改myFdSize/1024/1024时为0.32M(K改为M)数据分列:①将文件夹大小.txt内容复制到wps或者word表格中②数据工具栏选择分列功能选项③选择分隔符号④选择其他 输入“|”⑤下一步完成完成
2022年06月14日
52 阅读
1 评论
1 点赞
2021-10-18
FRP搭建内网穿透实现远程桌面等功能
FRP搭建内网穿透实现远程桌面等功能简介FRP 采用 C/S 模式,将服务端部署在具有公网 IP 的机器上,客户端部署在内网或防火墙内的机器上,通过访问暴露在服务器上的端口,反向代理到处于内网的服务。 在此基础上,FRP支持 TCP, UDP, HTTP, HTTPS 等多种协议,提供了加密、压缩,身份认证,代理限速,负载均衡等众多能力。官网https://gofrp.org/官方文档https://gofrp.org/docs/开源https://github.com/fatedier/frp安装包下载https://github.com/fatedier/frp/releases这里根据自己的环境选择相应的安装包开始安装公网服务端安装:下载解压frp:[root@VM-4-3-centos ~]# cd /home/FRP [root@VM-4-3-centos FRP]# wget https://github.com/fatedier/frp/releases/download/v0.37.1/frp_0.37.1_linux_amd64.tar.gz [root@VM-4-3-centos FRP]# ls frp_0.37.1_linux_amd64.tar.gz [root@VM-4-3-centos FRP]# tar -zxvf frp_0.37.1_linux_amd64.tar.gz [root@VM-4-3-centos FRP]# cd frp_0.37.1_linux_amd64/ [root@VM-4-3-centos frp_0.37.1_linux_amd64]# ls frpc frpc_full.ini frpc.ini frps frps_full.ini frps.ini LICENSE systemd [root@VM-4-3-centos frp_0.37.1_linux_amd64]# 修改服务端配置:详细服务端参数配置文档:https://gofrp.org/docs/reference/server-configures/[root@VM-4-3-centos frp_0.37.1_linux_amd64]# vim frps.ini #配置端口即认证 [common] bind_addr = 0.0.0.0 bind_port =7000 //frp服务本地端口,可自行更改 authentication_method = token //开启token认证 token = admin //token认证值 # 配置frp后台管理账号 dashboard_user = admin dashboard_pwd = admin dashboard_port = 7001 //web监控端口,可自行更改 enable_prometheus = true //开启监控 # 配置日志配置文件夹 log_file = /home/frp/frps.log log_level = info log_max_days = 3安装screen启动会话开启frp服务[root@VM-4-3-centos frp_0.37.1_linux_amd64]# yum install screen [root@VM-4-3-centos frp_0.37.1_linux_amd64]# screen -R frp //创建会话 [root@VM-4-3-centos frp_0.37.1_linux_amd64]# cd /home/FRP/frp_0.37.1_linux_amd64/ //进入frp根目录 [root@VM-4-3-centos frp_0.37.1_linux_amd64]# ./frps -c frps.ini //启动frp 2021/10/18 10:57:57 [I] [root.go:200] frps uses config file: frps.ini 2021/10/18 10:57:57 [I] [service.go:192] frps tcp listen on 0.0.0.0:7000 2021/10/18 10:57:57 [I] [root.go:209] frps started successfullyCTRL + a + d 退出当前screen会话 至此服务端配置完成screen语法 screen [-AmRvx -ls -wipe][-d <作业名称>][-h <行数>][-r <作业名称>][-s <shell>][-S <作业名称>] 参数说明: -A 将所有的视窗都调整为目前终端机的大小。 -d<作业名称> 将指定的screen作业离线。 -h<行数> 指定视窗的缓冲区行数。 -m 即使目前已在作业中的screen作业,仍强制建立新的screen作业。 -r<作业名称> 恢复离线的screen作业。 -R 先试图恢复离线的作业。若找不到离线的作业,即建立新的screen作业。 -s<shell> 指定建立新视窗时,所要执行的shell。 -S<作业名称> 指定screen作业的名称。 -v 显示版本信息。 -x 恢复之前离线的screen作业。 -ls或--list 显示目前所有的screen作业。 -wipe 检查目前所有的screen作业,并删除已经无法使用的screen作业。服务器开启相应的端口:7000,7001,及客户端配置的remote_port端口客户端安装:解压frp_0.37.1_windows_amd64.zip修改frpc.ini[common] server_addr = 123.13.123.123 //服务器IP server_port = 7000 //服务器frp端口 token = admin //服务器frp端 认证值 [mstsc] //这里可自行修改相应的介绍,必须为英文 type = tcp local_ip = 127.0.0.1 local_port = 3389 //本地服务端口 remote_port = 3399 //frp服务端监听的端口,访问此端口的流量将会被转发到本地服务对应的端口。 //例如123.13.123.123:3399 就能访问客户端的3389远程桌面服务 启动客户端:打开cmd或者新建一个.bat批处理脚本frpc.exe -c frpc.ini 验证配置:在虚拟机上开启客户端,并开启远程登陆功能,在另一台电脑上win+r运行mstsc结束可配置多个客户端,组名和端口不一致就行。被控端的cmd命令行窗口在使用过程中不可关闭。这次只是使用了3389端口做了远程桌面,FRP其它使用方式大家可以去探索和研究。
2021年10月18日
103 阅读
0 评论
2 点赞
2021-08-29
Linux web httpd配置个人主页
Linux web httpd配置个人主页安装 httpd;准备个人主页配置个人主页;启动服务并测试;一、使用 httpd 提供的个人主页功能,即配置个人主页后,每个用户可以访问自己家目录下的 web 页面。1.安装 httpd.x86_64[root@DJL djl]# yum list httpd 已加载插件:fastestmirror, langpacks Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast Loading mirror speeds from cached hostfile 可安装的软件包 httpd.x86_64 2.4.6-97.el7.centos updates [root@DJL djl]# yum install httpd.x86_64 已安装: httpd.x86_64 0:2.4.6-97.el7.centos 作为依赖被安装: apr.x86_64 0:1.4.8-7.el7 apr-util.x86_64 0:1.5.2-6.el7 httpd-tools.x86_64 0:2.4.6-97.el7.centos mailcap.noarch 0:2.1.41-2.el7 完毕!2.准备个人主页(1) 准备测试用户新建账号 user3,设置 user3 密码,并以 user3 登录。登录后进入 user3 家目录,新建 www 文件夹。浏览器访问 user3 主页,服务器端是 httpd 访问 user3 的主页目录,因此有如下权限要求: /home/user3:默认权限为 drwx------,除了 user3 外,其他用户无任何权 限,也不能 进入文件夹,需要修改为 drwx—x—x。[djl@DJL ~]$ su root 密码: [root@DJL djl]# useradd user3 [root@DJL djl]# echo "eis220" | passwd --stdin user3 更改用户 user3 的密码 。 passwd:所有的身份验证令牌已经成功更新。 [root@DJL djl]# su user3 [user3@DJL ~]$ cd /home/ [user3@DJL home]$ ll 总用量 4 drwx------. 15 djl djl 4096 8月 29 21:23 djl drwxrwxrwx. 2 root root 57 8月 6 19:31 tmp drwx------. 3 user1 RDD 78 8月 6 18:56 user1 drwx------. 3 user2 user2 78 8月 6 18:56 user2 drwx------. 5 user3 user3 107 8月 29 21:24 user3 [user3@DJL home]$ chmod 711 user3 ////修改家目录权限,允许其他人执行 [user3@DJL home]$ ll 总用量 4 drwx------. 15 djl djl 4096 8月 29 21:23 djl drwxrwxrwx. 2 root root 57 8月 6 19:31 tmp drwx------. 3 user1 RDD 78 8月 6 18:56 user1 drwx------. 3 user2 user2 78 8月 6 18:56 user2 drwx--x--x. 5 user3 user3 107 8月 29 21:24 user3 [user3@DJL home]$ (2)/home/user3/www:默认权限为 drwxr-xr-x,httpd 程序可以进入,也可 以读取里面的文件,不需要修改。[user3@DJL home]$ cd user3 [user3@DJL ~]$ mkdir www [user3@DJL ~]$ ll 总用量 0 drwxrwxr-x. 2 user3 user3 6 8月 29 21:29 www [user3@DJL ~]$ chmod 755 www/ [user3@DJL ~]$ ll 总用量 0 drwxr-xr-x. 2 user3 user3 6 8月 29 21:29 www [user3@DJL ~]$ (3)新建个人个人主页[user3@DJL ~]$ cd www/ [user3@DJL www]$ echo "Personal Home Page" > index.html [user3@DJL www]$ ls index.html [user3@DJL www]$ 3.配置个人主页个 人 主 页 配 置 部 分 可 能 位 于 /etc/httpd/conf/httpd.conf 或 者 /etc/httpd/conf.d/userdir.conf。CentOS7 中位于 userdir.conf,修改配置项,如 下:4.启动服务并测试关闭防火墙和selinux;[root@DJL djl]# systemctl stop firewalld.service [root@DJL djl]# setenforce 0启动服务[root@DJL html]# systemctl start httpd.service [root@DJL djl]# systemctl status httpd.service 二、查看服务器ip并测试(一)使用虚拟机127.0.0.1和外部主机访问httpd(url 为 http://localhost/~user3)(二)不加“ ~”访问个人主页 进入/var/www/html 目录,新建符号链接 user3,指向 /home/user3/www。创建符号链接:ln -s /home/user3/www user3[root@DJL conf.d]# cd /var/www/html/ [root@DJL html]# ln -s /home/user3/www/ user3 //创建符号链接 [root@DJL html]# ll 总用量 4 -rw-r--r--. 1 root root 164 8月 29 07:08 index.html lrwxrwxrwx. 1 root root 16 8月 29 21:49 user3 -> /home/user3/www/ [root@DJL html]# 三、结束,有不懂得问题,请在下方留言
2021年08月29日
214 阅读
0 评论
3 点赞
2021-08-28
Linux web 服务器配置及应用(apache 部署静态网站)
Linuxweb 服务器配置及应用(apache 部署静态网站)安装 apache;配置 apache;编写 web 应用并部署;启动 apache 服务器并测试;一、使用 apache 部署静态网站1.安装 httpd.x86_64[root@DJL djl]# yum list httpd 已加载插件:fastestmirror, langpacks Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast Loading mirror speeds from cached hostfile 可安装的软件包 httpd.x86_64 2.4.6-97.el7.centos updates [root@DJL djl]# yum install httpd.x86_64 已安装: httpd.x86_64 0:2.4.6-97.el7.centos 作为依赖被安装: apr.x86_64 0:1.4.8-7.el7 apr-util.x86_64 0:1.5.2-6.el7 httpd-tools.x86_64 0:2.4.6-97.el7.centos mailcap.noarch 0:2.1.41-2.el7 完毕!2.配置 apache安装好 apache 后,进入配置文件目录/etc/httpd 目录; conf 目录是 httpd 配置文件目录,conf.d 目录是子配置文件目录, conf.modules.d 是模块配置文件目录,modules 中则包含其他 httpd 可以加载 的模块;这里我们不修改 httpd 的默认配置,打开/etc/httpd/conf/httpd.conf,通过 DocumentRoot 项可以发现默认网站页面应该存放的目录为/var/www/html;3.编写 web 页面并部署这里编写一个简单页面 index.html,内容如下所示,部署到 /var/www/html 目录。<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> </head> <body> <h1>这是一个Apache部署的静态网站</h1> </body> </html> [root@DJL djl]# cd /etc/httpd/conf [root@DJL conf]# vim httpd.conf [root@DJL conf]# cd /var/www/html/ [root@DJL html]# ll 总用量 0 [root@DJL html]# touch index.html [root@DJL html]# vim index.html [root@DJL html]# ll 总用量 4 -rw-r--r--. 1 root root 160 8月 29 07:01 index.html [root@DJL html]# 4.启动服务并测试关闭防火墙和selinux;[root@DJL djl]# systemctl stop firewalld.service [root@DJL djl]# setenforce 0启动服务[root@DJL html]# systemctl start httpd.service [root@DJL djl]# systemctl status httpd.service 二、查看服务器ip并测试(一)使用虚拟机127.0.0.1和外部主机访问httpd三、结束,有不懂得问题,请在下方留言
2021年08月28日
261 阅读
1 评论
5 点赞
2021-08-06
配置 samba 无密码共享服务器
在samba无密码共享基础之上,修改配置,特定用户可以访问,特定组可以访问。要求:(1)probe 用户可以读可写;(2)RDD 组的用户可读可写,RDD 组有用户 user1。samba无密访问-->: samba无密访问一、配置 samba的smb.conf1.按照要求准备用户和组[root@DJL djl]# groupadd RDD [root@DJL djl]# useradd -g RDD user1 [root@DJL djl]# useradd user2 [root@DJL djl]# echo “eis220” | passwd --stdin user1 更改用户 user1 的密码 。 passwd:所有的身份验证令牌已经成功更新。 [root@DJL djl]# echo “eis220” | passwd --stdin user2 更改用户 user2 的密码 。 passwd:所有的身份验证令牌已经成功更新。 [root@DJL djl]# 2.添加 samba 账户samba 要求 samba 账户必须是系统中已经存在的账户,账户有多种添加方式,取决于 smb.conf 的 global 段中 passdb backend 的设定,passdb backed采用 tdbsam,则必须使用 pdbedit 增加账户 同理依次增加 samba 账户 user1、user2、djl。[root@DJL djl]# pdbedit -a -u user1 new password: //这里密码为自定123456 retype new password: Unix username: user1 NT username: Account Flags: [U ] User SID: S-1-5-21-384176301-2400065358-1191883548-1000 Primary Group SID: S-1-5-21-384176301-2400065358-1191883548-513 Full Name: Home Directory: \\djl\user13.修改 smb.conf修改 global 段中 security 字段为 user;修改 passdb backend 字段为 tdbsam。因为新建 samba 数据库使用 pebedit命令,秘钥后端必须使用 tdb 数据库格式[global] workgroup = SAMBA security = user # map to guest = Bad user passdb backend = tdbsam printing = cups printcap name = cups load printers = yes cups options = raw4.添加共享资源,并设置权限[tmp] comment = my share path = /home/tmp browseable = yes writable = no //关闭写权限 write list = djl,@RDD //指定用户djl和RDD组可以写入 guest ok = yes5.启动服务并测试关闭防火墙和selinux;[root@DJL djl]# systemctl stop firewalld.service [root@DJL djl]# setenforce 0启动服务[root@DJL djl]# systemctl start smb.service [root@DJL djl]# systemctl status smb.service 二、查看服务器ip并测试 user1 和 user2 账号对 tmp 的访问(一)用户名:djl 密码:123456 测试(二)用户名:user1 密码:123456 测试首先打开cmd删除用户djl的磁盘映射:PS C:\Users\user\Desktop> net use * /del /y新建用户user1连接,密码为123456PS C:\Users\user\Desktop> net use \\192.168.147.128 "123456" /user:user1权限测试(有写入权限)(三)用户名:user2 密码:123456 测试同理 新建用户user2连接,密码为123456权限测试(无写入权限)三、结束,有不懂得问题,请在下方留言
2021年08月06日
400 阅读
2 评论
1 点赞
1
2