Python script monitors domain name certificate expiration time and sends notification message to DingTalk

Version 1: Execute the script with –dingtalk-webhook and –domains and then specify the DingTalk token and domain name. python3 ssl_spirtime.py –dingtalk-webhook https://oapi.dingtalk.com/robot/send?access_token=avd345324 –domains www.abc1.com www.abc2.com www.abc3.com The script is as follows #!/usr/bin/python3 import ssl import socket from datetime import datetime import argparse import requests def get_ssl_cert_expiration(domain, port=443): context = ssl.create_default_context() conn = context.wrap_socket(socket.socket(socket.AF_INET), server_hostname=domain) conn.connect((domain, […]

ajax-axios sends a get request or sends a post request with request body parameters

/* axios v0.21.1 | (c) 2020 by Matt Zabriskie */ !function(e,t){“object”==typeof exports & amp; & amp;”object”==typeof module?module.exports=t():”function”==typeof define & amp; & amp; define.amd?define([],t):”object”==typeof exports?exports.axios=t():e.axios=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r]. call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p=””,t(0) }([function(e,t,n){e.exports=n(1)},function(e,t,n){“use strict”;function r(e){var t=new i(e) ,n=s(i.prototype.request,t);return o.extend(n,i.prototype,t),o.extend(n,t),n}var o=n(2),s=n (3),i=n(4),a=n(22),u=n(10),c=r(u);c.Axios=i,c.create=function(e){return r( a(c.defaults,e))},c.Cancel=n(23),c.CancelToken=n(24),c.isCancel=n(9),c.all=function(e){return Promise. all(e)},c.spread=n(25),c.isAxiosError=n(26),e.exports=c,e.exports.default=c},function(e,t,n){“use strict”;function r(e){return”[object Array]”===R.call(e)}function o(e){return”undefined”==typeof e}function s(e){return null! ==e & amp; […]

Kafka Producer message sending process and mechanism

Kafka Producer message sending process and mechanism Message sending process We can use the Producer class provided by Kafka to quickly send messages. The sending demo code is as follows: public class MyProducer {<!– –> // Server connection address private static final String BOOTSTRAP_SERVERS =”worker1:9092,worker2:9092,worker3:9092″; //Basic TOPIC private static final String TOPIC = “disTopic”; public […]

Serial port DMA method to send and receive data based on HAL library

Article directory Preface 1. What is DMA? 2. Serial port DMA configuration Summarize Foreword As we continue to learn, we find that the demand for microcontrollers is getting higher and higher. Of course, serial port communication is also used more and more frequently. However, in our previous studies, the serial port always interrupted every time […]

Principle of OC message sending and forwarding mechanism

Objective-C (OC) is an object-oriented programming language with unique mechanisms in message passing and method invocation. In OC, objects call methods through messages instead of calling functions directly like traditional programming languages. This article will deeply explore the principles of OC’s message sending and forwarding mechanism, including its basic concepts, implementation process, code examples, and […]

Serial communication (3) Implementation of printf serial port output redirection and sending of one frame and one string of data

This article is the original csdn first release of the blogger. I hope it will be helpful to you after reading it. Please correct me if I have any shortcomings! Let’s communicate and learn together and make progress together! >Personal homepage: @日月同光, a blog that coexists with me >You are welcome to like the original […]

FPGA module – serial port sending and receiving module

FPGA module – serial port module Send code receive code Pin constraints Send code 1. Use the sending module Using this module requires outputting a sending port output uart_txd, //UART send port /*————————————————-*/ wire uart_rx_done = 1’b1; //UART receives completion signal wire[7:0] rx_data; assign rx_data = 8’b11111111; //Data to be sent //parameter define parameter CLK_FREQ […]

Java export data to Excel and send to online document

1. Demand Now the list data is exported to excel and the file is sent to the online document, abandoning the old model of downloading directly on the front end. 2. pom dependency <!– redission –> <dependency> <groupId>org.redisson</groupId> <artifactId>redisson-spring-boot-starter</artifactId> <version>3.14.0</version> <exclusions> <exclusion> <groupId>org.redisson</groupId> <artifactId>redisson-spring-data-23</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.redisson</groupId> <artifactId>redisson-spring-data-20</artifactId> <version>3.14.0</version> </dependency> <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> […]

Springboot implements the function of sending email (activation code)

Step 1: Now enable the smtp service in the mailbox Here we use the 163 mailbox as an example to configure the authorization password. This should be remembered in advance. Step 2: Introduce dependencies <?xml version=”1.0″ encoding=”UTF-8″?> <project xmlns=”http://maven.apache.org/POM/4.0.0″ xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=”http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd”> <modelVersion>4.0.0</modelVersion> <groupId>com.example</groupId> <artifactId>malisend</artifactId> <version>0.0.1-SNAPSHOT</version> <name>malisend</name> <description>malisend</description> <properties> <java.version>1.8</java.version> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <spring-boot.version>2.6.13</spring-boot.version> </properties> <dependencies> […]