test
2021/6/11 18:55:42
本文主要是介绍test,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
#! /usr/bin/env python import os,sys import time def main(): url_dnsrbl3=r'curl -connect-timeout 100 -m 900 -X GET https://dgarchive.caad.fkie.fraunhofer.de/today/3/dnsrbl -u yd0str:soapdoorwivettlcamweir >' url_today=r'curl -connect-timeout 10 -m 900 -X GET https://dgarchive.caad.fkie.fraunhofer.de/today -u yd0str:soapdoorwivettlcamweir >' url_dnsrbl=r'curl -connect-timeout 10 -m 900 -X GET https://dgarchive.caad.fkie.fraunhofer.de/today/dnsrbl -u yd0str:soapdoorwivettlcamweir >' nowtime=time.strftime('%Y-%m-%d',time.localtime()) #updatetime=time.strftime('%H:%M:%S',time.localtime()) updatetime=r'08:18:08' print updatetime if not os.path.exists(r'/home/w131/yd/dga_data_analysis/dga_family_path/dgarchive_domain/'): os.mkdir('/home/w131/yd/dga_data_analysis/dga_family_path/dgarchive_domain/') out_dnsrbl3=nowtime+'_dnsrbl_3' out_today=nowtime+'_today' out_dnsrbl=nowtime+'_dnsrbl' os.system("%s %s" % (url_dnsrbl3,r'/home/w131/yd/dga_data_analysis/dga_family_path/dgarchive_domain/'+out_dnsrbl3)) os.system("%s %s" % (url_today,r'/home/w131/yd/dga_data_analysis/dga_family_path/dgarchive_domain/'+out_today)) os.system("%s %s" % (url_dnsrbl,r'/home/w131/yd/dga_data_analysis/dga_family_path/dgarchive_domain/'+out_dnsrbl)) if sys.argv[1]=="t": while 1: if updatetime==time.strftime('%H:%M:%S',time.localtime()): nowtime=time.strftime('%Y-%m-%d',time.localtime()) out_dnsrbl3=nowtime+'_dnsrbl_3' out_today=nowtime+'_today' out_dnsrbl=nowtime+'_dnsrbl' os.system("%s %s" % (url_dnsrbl3,r'/home/w131/yd/dga_data_analysis/dga_family_path/dgarchive_domain/'+out_dnsrbl3)) os.system("%s %s" % (url_today,r'/home/w131/yd/dga_data_analysis/dga_family_path/dgarchive_domain/'+out_today)) os.system("%s %s" % (url_dnsrbl,r'/home/w131/yd/dga_data_analysis/dga_family_path/dgarchive_domain/'+out_dnsrbl)) time.sleep(86000) if __name__=='__main__': main()
这篇关于test的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-11-23Springboot应用的多环境打包入门
- 2024-11-23Springboot应用的生产发布入门教程
- 2024-11-23Python编程入门指南
- 2024-11-23Java创业入门:从零开始的编程之旅
- 2024-11-23Java创业入门:新手必读的Java编程与创业指南
- 2024-11-23Java对接阿里云智能语音服务入门详解
- 2024-11-23Java对接阿里云智能语音服务入门教程
- 2024-11-23JAVA对接阿里云智能语音服务入门教程
- 2024-11-23Java副业入门:初学者的简单教程
- 2024-11-23JAVA副业入门:初学者的实战指南