链接:https://pan.baidu.com/s/1sN3hL5HvFzzNwuz8npaQNw
提取码:vsvg

为什么要注册为服务: 服务器重启后服务可以自行重启。

WinSW官网使用说明及实例分享

1.官网使用说明

1.1 使用配置说明

Use WinSW as a global tool
  1. Take WinSW.exe or WinSW.zip from the distribution.
  2. Write myapp.xml (see the XML config file specification and samples for more details).
  3. Run winsw install myapp.xml [options] to install the service.
  4. Run winsw start myapp.xml to start the service.
  5. Run winsw status myapp.xml to see if your service is up and running.

作为全局工具使用,不同服务使用不同的xml文件进行操作。

Use WinSW as a bundled tool
  1. Take WinSW.exe or WinSW.zip from the distribution, and rename the .exe to your taste (such as myapp.exe).
  2. Write myapp.xml (see the XML config file specification and samples for more details).
  3. Place those two files side by side, because that’s how WinSW discovers its co-related configuration.
  4. Run myapp.exe install [options] to install the service.
  5. Run myapp.exe start to start the service.

作为绑定工具使用,默认使用同名的xml文件进行操作,个人感觉这种方式更适合实施的小伙伴儿。

Sample configuration file

You write the configuration file that defines your service. The example below is a primitive example being used in the Jenkins project:

<service>
  <id>jenkins</id>
  <name>Jenkins</name>
  <description>This service runs Jenkins continuous integration system.</description>
  <env name="JENKINS\_HOME" value="%BASE%"/>
  <executable>java</executable>
  <arguments>-Xrs -Xmx256m -jar "%BASE%\jenkins.war" --httpPort=8080</arguments>
  <log mode="roll"></log>
</service>

The full specification of the configuration file is available here. You can find more samples here.
这个配置文件举例是很典型的可执行文件+参数,适合很多服务。

1.2 Usage

WinSW is being managed by the XML configuration file.
Your renamed WinSW.exe binary also accepts the following commands:

CommandDescription
installInstalls the service.
uninstallUninstalls the service.
startStarts the service.
stopStops the service.
restartStops and then starts the service.
statusChecks the status of the service.
refreshRefreshes the service properties without reinstallation.
customizeCustomizes the wrapper executable.
devExperimental commands.

Experimental commands:

CommandDescription
dev psDraws the process tree associated with the service.
dev killTerminates the service if it has stopped responding.
dev listLists services managed by the current executable.

Most commands require Administrator privileges to execute. WinSW will prompt for UAC in non-elevated sessions.
这些命令不再详细说明,用到的时候再介绍。

2.实例分享

2.1 将exe注册成服务

这里使用对象存储MinIO的minio.exe进行Use WinSW as a bundled tool举例,详细步骤如下:

  1. WinSW-x64.exe重命名为minio-server.ext
  2. 添加配置文件minio-server.xim内容如下,配置详情可查看sample-allOptions.xml
<service>
  <id>minio-server</id>
  <name>MinIO-Server</name>
  <description>This service runs MINIO OBJECT STORE.</description>
  <env name="MINIO\_HOME" value="%BASE%"/>
  <executable>%BASE%\minio.exe</executable>
  <arguments>server D:\minio_data --console-address ":9001"</arguments>
  <logpath>%BASE%\logs</logpath>
  <log mode="roll-by-size-time">
    <sizeThreshold>1024</sizeThreshold>
    <pattern>yyyyMMdd</pattern>
    <autoRollAtTime>00:00:00</autoRollAtTime>
    <zipOlderThanNumDays>5</zipOlderThanNumDays>
    <zipDateFormat>yyyyMMdd</zipDateFormat>
  </log>
  <env name="MINIO\_ROOT\_USER" value="admin" />
  <env name="MINIO\_ROOT\_PASSWORD" value="admin123" />
</service>

  1. cmd执行命令minio-server.exe install安装为服务(此时服务并未启动)
INFO  - Installing service 'MinIO-Server (minio-server)'...
INFO  - Service 'MinIO-Server (minio-server)' was installed successfully.

  1. 执行命令minio-server.exe start启动服务

完整流程测试:

在这里插入图片描述

2.2 将jar注册成服务

这里使用 Arthas(阿尔萨斯)用于测试的math-game.jar包进行Use WinSW as a bundled tool举例,详细步骤如下:

  1. WinSW-x64.exe重命名为math-game-server.exe
  2. 添加配置文件math-game-server.xml内容如下

如何自学黑客&网络安全

黑客零基础入门学习路线&规划

初级黑客
1、网络安全理论知识(2天)
①了解行业相关背景,前景,确定发展方向。
②学习网络安全相关法律法规。
③网络安全运营的概念。
④等保简介、等保规定、流程和规范。(非常重要)

2、渗透测试基础(一周)
①渗透测试的流程、分类、标准
②信息收集技术:主动/被动信息搜集、Nmap工具、Google Hacking
③漏洞扫描、漏洞利用、原理,利用方法、工具(MSF)、绕过IDS和反病毒侦察
④主机攻防演练:MS17-010、MS08-067、MS10-046、MS12-20等

3、操作系统基础(一周)
①Windows系统常见功能和命令
②Kali Linux系统常见功能和命令
③操作系统安全(系统入侵排查/系统加固基础)

4、计算机网络基础(一周)
①计算机网络基础、协议和架构
②网络通信原理、OSI模型、数据转发流程
③常见协议解析(HTTP、TCP/IP、ARP等)
④网络攻击技术与网络安全防御技术
⑤Web漏洞原理与防御:主动/被动攻击、DDOS攻击、CVE漏洞复现

5、数据库基础操作(2天)
①数据库基础
②SQL语言基础
③数据库安全加固

6、Web渗透(1周)
①HTML、CSS和JavaScript简介
②OWASP Top10
③Web漏洞扫描工具
④Web渗透工具:Nmap、BurpSuite、SQLMap、其他(菜刀、漏扫等)
恭喜你,如果学到这里,你基本可以从事一份网络安全相关的工作,比如渗透测试、Web 渗透、安全服务、安全分析等岗位;如果等保模块学的好,还可以从事等保工程师。薪资区间6k-15k

到此为止,大概1个月的时间。你已经成为了一名“脚本小子”。那么你还想往下探索吗?

如果你想要入坑黑客&网络安全,笔者给大家准备了一份:282G全网最全的网络安全资料包评论区留言即可领取!

7、脚本编程(初级/中级/高级)
在网络安全领域。是否具备编程能力是“脚本小子”和真正黑客的本质区别。在实际的渗透测试过程中,面对复杂多变的网络环境,当常用工具不能满足实际需求的时候,往往需要对现有工具进行扩展,或者编写符合我们要求的工具、自动化脚本,这个时候就需要具备一定的编程能力。在分秒必争的CTF竞赛中,想要高效地使用自制的脚本工具来实现各种目的,更是需要拥有编程能力.

如果你零基础入门,笔者建议选择脚本语言Python/PHP/Go/Java中的一种,对常用库进行编程学习;搭建开发环境和选择IDE,PHP环境推荐Wamp和XAMPP, IDE强烈推荐Sublime;·Python编程学习,学习内容包含:语法、正则、文件、 网络、多线程等常用库,推荐《Python核心编程》,不要看完;·用Python编写漏洞的exp,然后写一个简单的网络爬虫;·PHP基本语法学习并书写一个简单的博客系统;熟悉MVC架构,并试着学习一个PHP框架或者Python框架 (可选);·了解Bootstrap的布局或者CSS。

8、超级黑客
这部分内容对零基础的同学来说还比较遥远,就不展开细说了,附上学习路线。
img

网络安全工程师企业级学习路线

img
如图片过大被平台压缩导致看不清的话,评论区点赞和评论区留言获取吧。我都会回复的

视频配套资料&国内外网安书籍、文档&工具

当然除了有配套的视频,同时也为大家整理了各种文档和书籍资料&工具,并且已经帮大家分好类了。

img
一些笔者自己买的、其他平台白嫖不到的视频教程。
img

网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。

需要这份系统化资料的朋友,可以点击这里获取

一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!

GitHub 加速计划 / wi / winsw
11.74 K
1.55 K
下载
A wrapper executable that can run any executable as a Windows service, in a permissive license.
最近提交(Master分支:1 个月前 )
e4cf507b 1 年前
e0d4fcbe * Update xml-config-file.md * Update xml-config-file.md --------- Co-authored-by: Next Turn <45985406+nxtn@users.noreply.github.com> 1 年前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐