Coder Social home page Coder Social logo

lan-ip's Introduction

Indroduction

一个用于 Windows 局域网设备的 IP 上报 Demo

  • main.py:API 接口,用于获取/更新局域网设备 IP
  • corn.py:定时向 API 接口上报设备 IP

How to start

安装依赖

conda create lanip python=3.10
conda activate lanip
pip install flask pyinstaller

corn.py 通过 pyinstaller 打包为 exe 文件,然后注入为 Windows 系统服务:

pyinstaller -F .\corn.py -i .\nana.ico -n printer_ip_report
参数 含义
-F 打包文件
-i 图标(可选)
-n 生成可执行文件名

注入系统服务可使用图形化界面 nssm 或者powershell的 New-Service cmdlet

How to use

启动后端接口(以 Linux 为例)

# main.py
nohup python main.py &

启动上报 IP 服务(Windows PowerShell)

.\your_exe
# 查看启动参数
.\your_exe --help

lan-ip's People

Contributors

sun2ot avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.