
checkout listen port12345678910111213141516171819202122232425262728293031323334353637383940#!/usr/bin/env python# -*- coding: utf-8 -*-# @Date : 2023-06-16# @Author : jwgod# @Version : 1.0.0# 检测本机指定端口是否还在监听# 运行:check_listen_port.py -p 8080import socketimport argparseimport mail163import local_ip as lipdef check_listen_port(port): ip = lip.get_IP() s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) r = s.connect_ex(('127.0.0.1', port)) if r != 0: # print(' ...