首页

编程实现关闭显示器等的python源代码-等同于按显示器的电源键

可实现功能通过显示器的 DDC/CI 来直接操作显示器,拯救可怜的显示器按键。 支持的操作: 调整亮度 调整对比度 设置色温 / 颜色预设 设置RGB颜色的比例 OSD语言 开关机 切换输入源 自动调整图像 (VGA输入需要) 恢复出厂设置 系统需求Windows Vista +Python3 (建议安装时选上Python Launcher)支持DDC/CI的外接显示器,不支持笔记本内置显示器 使用参考GUI 模式不附加参数启动 monitor_ctrl.py 即可启动GUI,直接拖动滑条设置显示器的参数。 由于显示器应用VCP指令可能需要一定时间,为避免出错,GUI模式将忽略命令行指定的操作。 GUI中显示的配置不会自动刷新,要查看新的配置目前需要重启应用程序。 将文件后缀修改为 .pyw, 直接双击打开,可以避免显示conhost黑窗口 命令行模式当指定 -c 选项或者 tkinter import失败就会使用CLI模式。 py monitor_ctrl.py [-h] [-m Model_string] [-s Settings_string] [-r] [-t] [-c] [-l] [-v] -h 显示帮助 -m 指定要应用到的Monitor Model,不指定则应用到所有可操作的显示器 -s property1=value1:property2=”value 2” 应用多项设置 -r 将显示器恢复出厂设置 -t 对输入执行自动调整(仅VGA输入需要) -c 不启用GUI -l 显示可操作的显示器model -v Verbose logging

实现GiteePages自动部署的aardio源码

问题的由来github提供开源项目管理,同时提供静态网站github page,但国内访问速度很慢,经常打不开,gitee码云在国内,提供和github一样的功能,但gitee page每次推送文件后,不会自动刷新(免费版),必须手动刷新!网上已有提供python自动刷新Gitee Pages的源码! python自动部署Gitee Pages源码 python环境要求python3 + selenium + chromedrive.exe。 python源码1234567891011121314151617181920212223242526272829303132333435363738394041424344import timefrom selenium import webdriverfrom selenium.webdriver.common.alert import Alert# 模拟浏览器打开到gitee登录界面driver = webdriver.Chrome()driver.get('https://gitee.com/login')# 将窗口最大化driver.maximize_window()time.sleep(2)# 输入账号--通过html的id属性定位输入位置--改为你的账号user_login = driver.find_element_by_id('user_login')user_login.send_keys("此处改为你的账号")# 输入密码--通过html的id属性定位输入位置--改为你的密码driver.find_element_by_id('user_password').send_keys("此处改为你的密码")# 点击登录按钮--通过xpath确定点击位置driver.find_element_by_xpath( '/html/body/div[2]/div[2]/div[1]/div/div[2]/div/form[1]/div[2]/div/div/div[4]/input').click()time.sleep(2)# 切换到gitee pages界面--改为you_gitee_iddriver.get('https://gitee.com/此处改为you_gitee_id/此处改为you_gitee_id/pages')# 点击更新按钮--通过xpath确定点击位置driver.find_element_by_xpath('//*[@id="pages-branch"]/div[7]').click()# 确认更新提示框--这个函数的作用是确认提示框Alert(driver).accept()# 等待5秒更新time.sleep(5)# 这个print其实没事什么用,如果真的要测试脚本是否运行成功,可以用try来抛出异常print("成功")# 脚本运行成功,退出浏览器driver.quit()# 写上更新日志# 我这里是写在D盘,可以改为自己喜欢的目录fp = open("D:\log.txt", "a+")now_time = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())fp.write("部署时间:{0}\n".format(now_time))fp.close() 提供此代码的开源项目地址:https://github.com/witmy/my-giteepages aardio自动部署Gitee Pages的源码python的代码,如果是新手,安装python,然后直接运行上面的源码,成功的机率很小,因为Chrome driver是需要浏览器和driver版本匹配的!上面的python源码,如果你不熟悉python,基本上调试不会成功!不过不要紧,下面我讲的,小白也会的aardio教程,一步一步复杂粘贴就能实现,你不需要会python,不需要会aardio,一样可以编译一个自动更新gitee pages的执行文件! 查看chrome内核的浏览器版本只要是使用chrome为内核的浏览器,都可以,比如qq浏览器,360极速浏览器,搜狗浏览器或chrome谷歌浏览器!第一步打开浏览器,第二步,在地址栏输入 chrome://version 查看版本号,正常应该显示为这样查看版本号,上图版本号为86.0.4240.112,并且知道浏览器的路径为 D:\Program Files (x86)\360Chrome\Chrome\Application\360chrome.exe 打开chromedriver的镜像网站https://npm.taobao.org/mirrors/chromedriver 下载相应的chromedriver对应上面的chrome,应该下载86.0.4240.22,最后的版本号112,选择最接近的就行!进入86.0.4240.22目录,下载 chromedriver_win32.zip,并解压到本地目录,如d:\temp\ aardio部署gitee pages的源码123456789101112131415161718192021222324252627282930313233import chrome.driver;var driver = chrome.driver("D:\Program Files\CentBrowser64\chrome.exe","d:\temp\chromedriver.exe");//driver.addArguments("--headless","--disable-gpu","--remote-debugging-port=9222"); //无头模式var browser = driver.startBrowser( { loggingPrefs = { browser = 'ALL', performance = 'ALL', }; perfLoggingPrefs = { enableNetwork = true, enablePage= false, enableTimeline = false } });browser.go("https://gitee.com/login")var ele = browser.querySelector("body").querySelector("#user_login"); ele.setValue( "gitee的用户名" );//改为你的gitee用户名ele = browser.querySelector("body").querySelector("#user_password");ele.setValue( "gitee的登录密码" ); //改为你的gitee密码var searchButton = browser.doScript(` return arguments[0].querySelector("#new_user > div > div > div > div:nth-child(4) > input"); ` ,browser.querySelector("body"))searchButton.click();win.delay(2000)browser.go("https://gitee.com/此处改为you_gitee_id/此处改为you_gitee_id/pages"); //改为你的gitee项目地址var gxButton=browser.doScript(` return arguments[0].querySelector("#pages-branch > div.button.orange.redeploy-button.ui.update_deploy");`,browser.querySelector("body"))win.delay(5000)gxButton.click();browser.alert.accept();win.delay(2000)browser.closeAll(); 其中,代码的第二行的参数,第一个改为你的浏览器路径(其中第一步上面已查看到),第二个参数改为你下载的chromedriver的路径,然后在http://www.aardio.com 下载aardio,新建文件,复制上面代码,直接编译就可运行(如果没有chrome.divver库,aardio会自动下载) 后期可能失效说明登录按钮的css selector,现在为 #new_user > div > div > div > div:nth-child(4) > input更新按钮的css selector, 现在为 #pages-branch > div.button.orange.redeploy-button.ui.update_deploy如何查看这两个按钮的css selector比如更新按钮的css selector手动打开gitee pages更新页面,对着更新按钮,右键审查元素,在弹出的devtool的Elements界面,自动选中的地方右键,点击选择copy selector,把上面的代码中修改即可!

发现网卡变百兆自动发送邮件通知的AutoIt源码

问题的出现网吧维护中,由于交换机或水晶机或工艺上的问题,有些机器网卡正常的千兆会变成百兆,在无盘系统中启动机器或启动游戏变得很慢,用户体验相当不好!出现这个问题时,网管或维护却很难第一时间发现1000M变成100M的问题机器。以下是使用autoit3写的,发现任意网卡是100M,就会按mail.ini配置文件中指定的邮件发送邮件通知,让你第一时间发现这种网卡变100M的问题机器,及时进行处理! 把以下代码保存为au3脚本或编译为可执行文件后,需要在同目录下建一个mail.ini文件,内容如下[setup]FromAddress=发件人@qq.comtoaddress=收件人@qq.comusername=qq号password=QQ的smtp服务器提供的邮件授权码body=邮件正文内容 其中password内容,应该进入你的QQ邮箱开通smtp和取得授权码 使用方法设置好mainl.ini中的qq的smtp服务器的用户名及授权码等一切信息后,开机执行一次此代码就行,检测完成自动退出程序 autoit源码如下以下为autoit3实现发现任意一网卡是100M,自动根据设置的邮件发送邮件通知! 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <ListViewConstants.au3> #include <WindowsConstants.au3> #include <GuiListView.au3> #Include<file.au3>#NoTrayIcon$badlan=false$a = _GetAdaptersInfo() For $i = 1 To $a[0][0] $lSpeed=GetIfEntry($a[$i][3])if $lSpeed=100 then $badlan=true ExitLoopendifNextif $badlan=true then $SmtpServer = "smtp.qq.com" ; address for the smtp-server to use - REQUIRED $FromName = "发送人" ; name from who the email was sent $FromAddress = IniRead(@WorkingDir&"\mail.ini","setup","FromAddress","") $ToAddress = IniRead(@WorkingDir&"\mail.ini","setup","toaddress","") $Subject = @ComputerName&"号机器网卡为100M,请检查!" ; subject from the email - can be anything you want it to be ;$Body = "邮件正文" ; the messagebody from the mail - can be left blank but then you get a blank mail $Body = IniRead(@WorkingDir&"\mail.ini","setup","body","") $AttachFiles = "" ; the file you want to attach- leave blank if not needed $CcAddress = "" ; address for cc - leave blank if not needed $BccAddress = "" ; address for bcc - leave blank if not needed $Importance = "Normal" ; Send message priority: "High", "Normal", "Low" $Username = IniRead(@WorkingDir&"\mail.ini","setup","Username","") $Password = IniRead(@WorkingDir&"\mail.ini","setup","Password","") $IPPort = 465 ; port used for sending the mail $ssl = 1 $rc = _INetSmtpMailCom ( $SmtpServer, $FromName, $FromAddress, $ToAddress, $Subject, $Body, $AttachFiles, $CcAddress, $BccAddress, $Importance, $Username, $Password, $IPPort, $ssl )endif;msgbox(0,"",$ToAddress)Func SetListView() $a = _GetAdaptersInfo() $index = ($a[1][3]) For $i = 1 To $a[0][0] GUICtrlCreateListViewItem($a[$i][1] & '|' & _ StringLeft(Hex($a[$i][2]), 12) & '|' & _ $a[$i][6] & '|' & _ GetIfEntry($a[$i][3]) & ' MB', $ListView1) Next EndFunc ;==>SetListView Func GetIfEntry($ifIndex) Local $tagBuffer, $tBuffer, $pBuffer, $iResult, $iSpeed, $sDescr $tagBuffer = "wchar[256];dword[5];byte[8];dword[16];char[256]" $tBuffer = DllStructCreate($tagBuffer) $pBuffer = DllStructGetPtr($tBuffer) DllStructSetData($tBuffer, 2, $ifIndex, 1) $iResult = DllCall("iphlpapi.dll", "long", "GetIfEntry", "ptr", $pBuffer) $iSpeed = DllStructGetData($tBuffer, 2, 4) / 1000 / 1000 $sDescr = DllStructGetData($tBuffer, 5) $tBuffer = 0 Return SetError($iResult[0], $iSpeed, $iSpeed) EndFunc ;==>GetIfEntry Func _GetAdaptersInfo() Local $iResult, $tBuffer, $pBuffer, $aResult[1][9], $tagADPTINFO, $tAdpt ; 第一次调用传递空值,pOutBufLen ( $iResult[2] ) 设为结构所需大小,单位byte。 $iResult = DllCall("iphlpapi.dll", "dword", "GetAdaptersInfo", "ptr", 0, "ulong*", 0) $tBuffer = DllStructCreate("byte[" & $iResult[2] & "]") ; 定义$iResult[2] 字节的缓存区域 (分配内存空间)。 $pBuffer = DllStructGetPtr($tBuffer) ; 获取内存指针。 ; 第二次调用,GetAdaptersInfo把网卡信息复制到指定的内存空间 ($tBuffer) 中。 $iResult = DllCall("iphlpapi.dll", "dword", "GetAdaptersInfo", "ptr", $pBuffer, "ulong*", $iResult[2]) ; $iResult[0]值为0则调用成功,否则为系统错误号。 ; 数据转换, byte --> IP_ADAPTER_INFO $tagADPTINFO = "ptr NextAdpt; dword ComboIndex; char AdptName[260]; char AdptDescr[132];uint AddrLength;byte MacAddr[8];dword Index;uint Type; uint DhcpEnabled;ptr CurrentIpAddr;ptr NextIpAddr; char IpAddr[16];char IpAddrMask[16]; dword IpAddrCxt; ptr NextGateway; char GatewayAddr[16]; char GatewayAddrMask[16];dword GatewayCxt; ptr NextDhcp; char DhcpAddr[16]; char DhcpAddrMask[16];dword DhcpCxt; int HaveWins; ptr NextPriWinsServer; char PriWinsServerAddr[16]; char PriWinsServerAddrMask[16]; dword PriWinsServerCxt; ptr NextSecWinsServer; char SecWinsServerAddr[16]; char SecWinsServerAddrMask[16]; dword LeaseObtained; dword LeaseExpires" While $pBuffer $tAdpt = DllStructCreate($tagADPTINFO, $pBuffer) $aResult[0][0] += 1 ReDim $aResult[$aResult[0][0] + 1][9] $aResult[$aResult[0][0]][0] = DllStructGetData($tAdpt, "AdptName") ; 网卡名称 $aResult[$aResult[0][0]][1] = DllStructGetData($tAdpt, "AdptDescr") ; 网卡描述 $aResult[$aResult[0][0]][2] = DllStructGetData($tAdpt, "MacAddr") ; 网卡MAC $aResult[$aResult[0][0]][3] = DllStructGetData($tAdpt, "Index") ; 网卡索引号 $aResult[$aResult[0][0]][4] = DllStructGetData($tAdpt, "Type") ; 类型 $aResult[$aResult[0][0]][5] = DllStructGetData($tAdpt, "DhcpEnabled") ; DHCP是否启用 true = 启用, false = 禁用 $aResult[$aResult[0][0]][6] = DllStructGetData($tAdpt, "IpAddr") ; IP 地址 $aResult[$aResult[0][0]][7] = DllStructGetData($tAdpt, "GatewayAddr") ; 网关地址 $aResult[$aResult[0][0]][8] = DllStructGetData($tAdpt, "DhcpAddr") ; DHCP地址, 只有DhcpEnabled为true时,此值才有效。 $pBuffer = DllStructGetData($tAdpt, "NextAdpt") ; [下一张网卡信息的内存地址。] $tAdpt = 0 WEnd $tBuffer = 0 Return SetError($iResult[0], 0, $aResult) EndFunc ;==>_GetAdaptersInfo; The UDFFunc _INetSmtpMailCom ( $s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject = "", $as_Body = "", $s_AttachFiles = "", $s_CcAddress = "", $s_BccAddress = "", $s_Importance= "Normal", $s_Username = "", $s_Password = "", $IPPort = 25, $ssl = 0 ) Local $objEmail = ObjCreate ( "CDO.Message" ) $objEmail.From = '"' & $s_FromName & '" <' & $s_FromAddress & '>' $objEmail.To = $s_ToAddress Local $i_Error = 0 Local $i_Error_desciption = "" If $s_CcAddress <> "" Then $objEmail.Cc = $s_CcAddress If $s_BccAddress <> "" Then $objEmail.Bcc = $s_BccAddress $objEmail.Subject = $s_Subject If StringInStr ( $as_Body, "<" ) And StringInStr ( $as_Body, ">" ) Then $objEmail.HTMLBody = $as_Body Else $objEmail.Textbody = $as_Body & @CRLF EndIf If $s_AttachFiles <> "" Then Local $S_Files2Attach = StringSplit ( $s_AttachFiles, ";" ) For $x = 1 To $S_Files2Attach [ 0 ] $S_Files2Attach [ $x ] = _PathFull ( $S_Files2Attach [ $x ] ) ConsoleWrite ( '@@ Debug(62) : $S_Files2Attach = ' & $S_Files2Attach & @LF & '>Error code: ' & @error & @LF ) ;### Debug Console If FileExists ( $S_Files2Attach [ $x ] ) Then $objEmail.AddAttachment ( $S_Files2Attach [ $x ] ) Else ConsoleWrite ( '!> File not found to attach: ' & $S_Files2Attach [ $x ] & @LF ) SetError ( 1 ) Return 0 EndIf Next EndIf $objEmail.Configuration.Fields.Item ( "http://schemas.microsoft.com/cdo/configuration/sendusing" ) = 2 $objEmail.Configuration.Fields.Item ( "http://schemas.microsoft.com/cdo/configuration/smtpserver" ) = $s_SmtpServer If Number ( $IPPort ) = 0 then $IPPort = 25 $objEmail.Configuration.Fields.Item ( "http://schemas.microsoft.com/cdo/configuration/smtpserverport" ) = $IPPort ;Authenticated SMTP If $s_Username <> "" Then $objEmail.Configuration.Fields.Item ( "http://schemas.microsoft.com/cdo/configuration/smtpauthenticate" ) = 1 $objEmail.Configuration.Fields.Item ( "http://schemas.microsoft.com/cdo/configuration/sendusername" ) = $s_Username $objEmail.Configuration.Fields.Item ( "http://schemas.microsoft.com/cdo/configuration/sendpassword" ) = $s_Password EndIf If $ssl Then $objEmail.Configuration.Fields.Item ( "http://schemas.microsoft.com/cdo/configuration/smtpusessl" ) = True EndIf ;Update settings $objEmail.Configuration.Fields.Update ; Set Email Importance Switch $s_Importance Case "High" $objEmail.Fields.Item ( "urn:schemas:mailheader:Importance" ) = "High" Case "Normal" $objEmail.Fields.Item ( "urn:schemas:mailheader:Importance" ) = "Normal" Case "Low" $objEmail.Fields.Item ( "urn:schemas:mailheader:Importance" ) = "Low" EndSwitch $objEmail.Fields.Update ; Sent the Message $objEmail.Send If @error Then SetError ( 2 ) Return $oMyRet [ 1 ] EndIf $objEmail= ""EndFunc ;==>_INetSmtpMailCom; 成品下载地址

使用croc两网吧之间同步互传文件

故事背景网吧A和网吧B之间经常有这样的事情发生:网吧A更新游戏,如pubg,更新量很大,比如40G,网吧A速度很快,已经更新完成,但网吧B速度慢,到游戏开服也只更新了20G。如果把网吧A的游戏同步更新到网吧B呢?一般的做法是用U盘从网吧A拷到网吧B但网吧使用无盘服务器,需要在服务器上插U盘,风险较高!并且比较麻烦,从网吧A拷了游戏还要跑网吧B操作。如果在网吧A开通ftp,再从网吧B下载,速度不敢保证,并且还得映射端口,各种复杂的操作!普通小白做不到!其中直接同步,可以采用syncthing实现两网吧P2P文件同步,syncthing需要双方安装,总之操作不够简单!croc是使用golang 编写的工具,允许任何两台计算机简单和安全地传输文件和文件夹。据我所知,croc 是唯一的 CLI 文件传输工具。对,你没听错,只需要一个文件croc.exe,分别拷到网吧A和网吧B的游戏目录,同时运行就可以互传文件或文件夹!如果网吧A和网吧B的带宽均不高,网吧间互传文件很慢,那么你也可以从网吧A用U盘拷游戏到网吧B,从客户机使用croc和网吧B的服务器同步文件,局域网传文件相当快,比在服务器插U盘相比,中毒风险直接排除! 功能介绍  croc 的特性:允许任意两台计算机传输数据(使用一个中继)  提供端到端加密(使用 PAKE)  支持方便的跨平台传输,支持 Windows、Linux、Mac  允许多文件传输  允许恢复被中断的传输  不需要本地服务器或端口转发  通过压缩和多路复用比虫洞、rsync、scp 更快(加速 1.5x 到 4x)  支持IPv6和IPv4;  支持使用Tor之类的代理; 简单使用方法 如需发送文件,可以直接运行下列命令: 123$ croc send [file(s)-or-folder]Sending 'file-or-folder' (X MB)Code is: code-phrase 接下来,在另一台电脑上使用下列命令来进行文件或目录接收: 1$ croc code-phrase 这里的code-phrase即密码短语,用于建立密码认证密钥协议(PAKE),该协议将生成一个密钥供发送方和接收方用于端到端加密。 自定义密码短语我们可以使用下列方式来配置自己的密码短语,必须是4个字符以上:

Delphi实现类似Android锁屏的密码锁控件

手机锁屏之后,开屏的时候,要求咱们输入密码的那个滑动效果输入的控件。 Android的那个锁屏的效果,用过的人应该都知道是个什么效果,也就是横竖各3行,排列成九宫格的效果,然后由用户在上面滑动以此来达到密码输入进而进行解锁和加密的效果。那么首先,俺们可以分析一下,他的具体形成思路,实际上是很简单的,就是一个排列,然后根据滑动产生的内容形成密码来达到解密的目的,那么最主要的就是这个密码和他本身的密码是如何对应解密的,实际上很简单,咱们给他排列的九宫格,都固定好位置 1 2 34 5 67 8 9 就像这样,排列的给他的位置固定好,然后每一个格子表示一个字符或者说字符串,进而用户滑动的时候,将对应的位置序列进入到一个列表中去保存,然后鼠标放开的时候,那么入队的选择位置进行组合,那么就是对应的密码了,比如 这样的输入就是表示123,如此顺序记录,就可以形成密码了,然后用户进行滑屏录入之后和以前的进行比较就可以知道密码是否正确了,当然我这个组合是相当简单的,如果想要整的复杂,可以给每个顺序位置给定复杂的字符串,这样形成的密码就足够的复杂了!给一般人去看,也是看不明白的。 那么分析清楚了,思路也就简单了,鼠标按下的时候,开始可以滑动形成密码,鼠标按下的第一个点,作为队列的第一个,然后再滑过的就顺序的一一的记录到队列中,鼠标放开的时候,从队列中获取各个顺序位置,组合形成密码然后和原密码比对,判断密码是否正确!源码如下: 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313{ Delphi实现的类似Android鼠标锁屏效果的控件 作者:不得闲 2012-7-23}unit AndroidLockControl;interfaceuses Windows,Classes,SysUtils,Graphics,Controls;type TDxLockItem = class private r: TRect; IsEnter: Boolean; IsChecked: Boolean; Value: AnsiChar; FRadio: TPoint; public constructor Create; end; TInPutPwdEvent = procedure(Sender: TObject;InputPwd: string) of object; TDxAndroidLock = class(TGraphicControl) private FItemSpace: Integer; FRowCount: Integer; FColCount: Integer; FItemRaidio: Integer; Items: TList; FUseNum: Boolean; FPassword: string; IsDown: Boolean; LastInItem: TDxLockItem; PwdItems: TList; FOnInputPwd: TInPutPwdEvent; procedure SetItemSpace(const Value: Integer); procedure SetItemRaidio(const Value: Integer); procedure SetUseNum(const Value: Boolean); protected procedure paint;override; procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; procedure CalcItemRects; public constructor Create(AOwner: TComponent);override; destructor Destroy;override; property Password: string read FPassword write FPassWord; published property ItemSpace: Integer read FItemSpace write SetItemSpace default 10; property OnInputPwd: TInPutPwdEvent read FOnInputPwd write FOnInputPwd; property ItemRaidio: Integer read FItemRaidio write SetItemRaidio default 20; property UseNum: Boolean read FUseNum write SetUseNum; end;implementationuses pngimage;{$R LockRc.RES}var PngIn,PngOut: TPngImage;{ TDxAndroidLock }procedure TDxAndroidLock.CalcItemRects;var i,j: Integer; p: TPoint; r: TRect; item: TDxLockItem;begin p.Y := FItemRaidio; for i := 1 to 3 do begin p.X := FItemRaidio; r.Left := p.X - FItemRaidio;r.Top := p.Y - FItemRaidio; r.Right := p.x + FItemRaidio;r.Bottom := p.Y + FItemRaidio; for j := 1 to 3 do begin item := Items[3*(i-1)+j - 1]; item.Value := AnsiChar(3*(i-1)+j+48); item.FRadio := p; item.r := r; p.X := p.X + FItemRaidio * 2 + FItemSpace; r.Left := p.X - FItemRaidio;r.Right := p.X + FItemRaidio; end; p.Y := p.Y + FItemRaidio * 2 + FItemSpace; end;end;constructor TDxAndroidLock.create(AOwner: TComponent);var i: Integer;begin inherited; LastInItem := nil; PwdItems := TList.Create; FPassWord := ''; Items := TList.Create; FItemSpace := 10; FRowCount := 3; FColCount := 3; FItemRaidio := 20; Width := FItemRaidio * 2 * 3 + FItemSpace * 2; Height := FItemRaidio * 2 * 3 + FItemSpace * 2; for i := 0 to 8 do begin Items.Add(TDxLockItem.Create); end; CalcItemRects;end;destructor TDxAndroidLock.Destroy;begin while Items.Count > 0 do begin TDxLockItem(Items[Items.Count - 1]).Free; Items.Delete(Items.Count - 1); end; PwdItems.Free; inherited;end;procedure TDxAndroidLock.MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);begin IsDown := Button = mbLeft; if IsDown then begin if LastInItem <> nil then begin LastInItem.IsChecked := IsDown; PwdItems.Add(LastInItem); end; Invalidate; end;end;procedure TDxAndroidLock.MouseMove(Shift: TShiftState; X, Y: Integer);var i: Integer; p: TPoint; OldInItem,Item: TDxLockItem;begin OldInItem := LastInItem; p := Point(x,y); LastInItem := nil; for i := 0 to items.Count - 1 do begin item := Items[i]; if PtInRect(Item.r,p) then begin LastInItem := Item; LastInItem.IsEnter := True; LastInItem.IsChecked := IsDown; Break; end; end; if LastInItem <> OldInItem then begin if OldInItem <> nil then OldInItem.IsEnter := False; if IsDown then begin if LastInItem <> nil then begin PwdItems.Add(LastInItem); end; Invalidate; end; end;end;procedure TDxAndroidLock.MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);var i: Integer; item: TDxLockItem; Np: string;begin IsDown := False; for i := 0 to items.Count - 1 do begin item := Items[i]; item.IsChecked := False; end; for i := 0 to PwdItems.Count - 1 do Np := Np + TDxLockItem(PwdItems[i]).Value; PwdItems.Clear; Invalidate; if Assigned(FOnInputPwd) then FOnInputPwd(self,Np);end;procedure DrawLineArrow(canvas: TCanvas; p1, p2: TPoint);const l = 6; //箭头长度 w = 4; //箭头宽度var slope, angle: Double; points: array[0..2] of TPoint; Xl,b: Single;begin canvas.Brush.Color := canvas.Pen.Color; canvas.Brush.Style := bsSolid; canvas.MoveTo(p1.X,p1.Y); canvas.LineTo(p2.X,p2.Y); if (p2.Y <> p1.Y) and (P2.X <> p1.X) then begin xl := (P2.Y - p1.Y) / (P2.X - p1.X); b := p2.Y - xl * p2.X; p2.X := (p2.X - p1.X) div 2 + p1.X; p2.Y := Trunc(p2.X * xl + b); end else if p2.Y = p1.Y then p2.X := (p2.X - p1.X) div 2 + p1.X else P2.Y := (p2.Y - p1.Y) div 2 + p1.Y;//画箭头 points[0] := Point(p2.x, p2.y);//箭头顶点 if (p2.x - p1.x = 0) then begin //垂直 if (p2.y - p1.y > 0) then slope := -1 else slope := 1; points[1] := Point(p2.x - w, p2.y + Trunc(l * slope)); points[2] := Point(p2.x + w, p2.y + Trunc(l * slope)); end else begin //倾斜 slope := (p2.y - p1.y) / (p2.x - p1.x); angle := ArcTan(slope); if (p2.x - p1.x > 0) then angle := angle - PI; points[1] := Point(p2.x + trunc(l * cos(angle) - w * sin(angle)), p2.y + trunc(l * sin(angle) + w * cos(angle))); points[2] := Point(p2.x + Trunc(l * cos(angle) + w * sin(angle)), p2.y + Trunc(l * sin(angle) - w * cos(angle))); end; canvas.Polygon(points);end;procedure TDxAndroidLock.paint;var i: Integer; item,item1: TDxLockItem; r: TRect;begin if not IsDown then begin for i := 0 to Items.Count - 1 do begin item := items[i]; r.Left := item.FRadio.X - 5;r.Right := item.FRadio.X + 5; r.Top := item.FRadio.Y - 5;r.Bottom := item.FRadio.Y + 5; Canvas.Draw(r.Left,r.Top,pngIn); end; end else begin //绘制指向线条 Canvas.Pen.Width := 2; Canvas.Pen.Color := clGreen; for i := 0 to PwdItems.Count - 2 do begin item := PwdItems[i]; item1 := PwdItems[i + 1]; Canvas.MoveTo(item.FRadio.X,item.FRadio.Y); Canvas.LineTo(item1.FRadio.X,item1.FRadio.Y); DrawLineArrow(Canvas,item.FRadio,item1.FRadio); end; for i := 0 to Items.Count - 1 do begin item := items[i]; if item.IsChecked then begin Canvas.Draw(item.r.Left,item.r.Top,pngOut); end; r.Left := item.FRadio.X - 5;r.Right := item.FRadio.X + 5; r.Top := item.FRadio.Y - 5;r.Bottom := item.FRadio.Y + 5; Canvas.Draw(r.Left,r.Top,pngIn); end; end;end;procedure TDxAndroidLock.SetItemRaidio(const Value: Integer);begin FItemRaidio := Value;end;procedure TDxAndroidLock.SetItemSpace(const Value: Integer);begin FItemSpace := Value;end;procedure TDxAndroidLock.SetUseNum(const Value: Boolean);begin FUseNum := Value;end;{ TDxLockItem }constructor TDxLockItem.Create;begin r := Rect(0,0,0,0); IsEnter := False;end;initialization PngIn := TPngImage.Create; PngIn.LoadFromResourceName(Hinstance,'InnerGra'); PngOut := TPngImage.Create; PngOut.LoadFromResourceName(Hinstance,'Outer');finalization PngIn.Free; PngOut.Free;end. 运行之后的效果就是转载自: https://www.cnblogs.com/DxSoft/archive/2012/07/23/2604941.html

softether的安装及使用

1af2aaa64b94522a0556bd1ec5c327926c3e53ccd8a5cce18e30a1a06212345c39a0594ac69cb5f1cd1efdccf8f8c467cb00d5665bf4b7596eee3bea313b472f73605f819af6268411d9122ba6b7631c6c3dc2b3288d760da6593fc3ab568204a1c2a685d9c713821606443c4ec7fe09e5a0afca762525fd133d75ebfc1cec126cb3355c673cfa1a780e5f0d79ffbe7845ac5b634edbea8b3255789a2228f6ea620d97584378534e4299ad0a04028479cee9636724a1f0113c8c4cc72eaa794aa31ca5c2b77e3078b297045e2910b55be686d71cf8566edf5abeeda8b26c5c0347bf6c0ecd90d18f311ed2edd963bc0d7fb79adc1da87bd419ca2b7abc12c25db43d1b59860cb53cec064e6eb60931e72f4f14ed8a0a765ca25d8229d2284074bc9556b3fd53a98926df74eee856b77f23c0e3ee43bccde4390666e5441263e5724eae7d3b4b7f140184c12e89fe18190ce2b752abe43c2469a35e5ad8506e7a99f1d2a69fb4b55a24b98391c12261e6c7406deb92827bb78a68346541f90d73efda46e6270535c935fcbd2c76f1c40b554b64f04565f78cb8a55c9f69dc291465a637971e4f95656a6c0a3181ee0316d04d315f76281fc79c7723865fd60eb70bf5184f182af89f09f42c2a4e6a3da4ee7e16b483798559e3c4a8d609038f5b1cc57b17b02f718e6e935878cbf3ec488982e5b2797a8087364539789754217147399a2aae33dac303c263b870118197d583fa1bfa944ed19ff5c66dd758a232d5da51af3c8c19420617d130680793f4988a580f14365b26b680b2d40c78dbfb6e32814ee2d8b4224a9cd773e7281dd89cfec49e33cecf0b547b34cea9135f4f09c3e66549c42f5766a1af954e32673e3f1a123efa57dc909e65e5ded61069d07f2275b5cb9222d8bd560163f40788f558c5b619c1d303c5725bfc5cf3a229932ce353d0b1f4ffce92491e291173a9929d47471260e7eae3ce64be6a645fca513c8a7d5873620fdd3ab74f9529602749ffa068ff7a1302947964d04f13e7a66fdd0e17dda486ef9bde17f0f34a05f26a2918de2b2b847c716fc4aa365ea75b67f836775e442ad03335dc011c46304d480b4f7d66afecf21b947539e6dbbaef8f5995a196dda323c1c2bfa45d2c802683dcbe1e4d1fffb7876241f9b67feca9014c1b3a8183b13dc5ed776b67c2c97d260e6c34155097692f23adecc0cde13ba9f3017c12ace5519cfb9d200f1182e8e6417b6f9f23030aee6f719f72929c6f0aad7f556cad29ef9986fc43b03376137255b7c660cd840609d435e8da6c8ca8e3192c5910b051a08bb04500be85180234b010030d59b1c9d718a571da10647bd6ca327f10df82a1fddfbdf1a485237db8d1d0d7b67b5563eb051fdc6e2ad655165fbd67a075722633d0e4d41458b5ce489cec91dab3b2ed3ba2acd0d9085241fdd9d81268afbc5b2b88e81e6b980081dc108b1759d393bc3742cfa9a6e09c1367e84c4d572b89265de8136a3daf9a8c55967466d74add7f0f39a362f98913c8afd7074da07a6934b98b5d689ab62167aa8f518fdc262dc661a0b49c0d8e7075533af52774b4cbba149008d01ff968ad5817b6499c38f6e726ae9fbbe3655ef9ae25fbc0a0eaa1df45995196275c1a69b657a9e028f5224919e67ed43ba86f77e40b1e94513b1fd31d0059915fe382d06c9fc4836cc69bcb0ec81ee634b757bd2de56d69b386448edfc8ad4b1b2675b31dd3896f5bbdd4df5baf7ac93b2adbead6a7b2e9f99d6f9c496501cafc2cafc5323ed50628e32b9ff2e7adad5c30de93e229e80e8f8fab425d0e76d333e9b0cf6d692ed3db10b79ade834bbe05b9f15e1a75d2bcd8e911a0e484ee5ba8fae2df5a4c4da537c51fbbcf4d767cbfc9b28d7ec0c27b8bc7dffd4e0486a3de69816bda7e08d4c16f5707defc7d67f7ee8f60967be3d282995a1dc9ac80c2167d648344bd4fef7191a3b7396d3be96e8bfa33b79e3149d29e3f2eb7c8288e92257204c198ca0541e578e08c5b61c5123c6d07fd6ba221972a1065c09996d90400cf1a76279e8dbdc9d7a6411ebd303371e714777ba8d7716dda16ee9148a3cc807929585dec72f5a4327f72467214fb637fd82e9877c8c100e106ba731a0937a05a6b7dd3fc431605e1bceff2d00592fa82e912680779a46b583a71b5e50fcc5c856c258e7ba8f45eb9c9cedbd45db959c1dcdc2760bdde45b5c0c7acafaafb30a0d6c624de80b4258d4eb0d9a3eeeebbbe966dbe23e9d23c1ae7499ee4e1f6676961f2e5816a1eaa1fefeef98aaee77b6592fe9d2e4eef0de3019d82bb22abededff90da990749ee279876195991dd5c2132ac6fcd943d95650a72014ba49ff554b67d15885652569162e0278254809de8f14e7e84b55d80f09b351abb454e3d71509f697929ecda17bce4df04874de1316a1a142f07fa0183e7c873577fb985a278e40b7e65fc0d3d6dc20860d50d17a69c56b34b20cfb6e48f214df582c4b4470ecc96e37fc005b138c793012d1a3d4bffce75ada3bfd0d0972d2faa7592405c92bcd5df3477c4b3612cb150d0b88e4fcece0792bdea716f848cd6d0bb587c32267f2eaba9f60172274457c6da177e8e946cc9e873f4dd6a281b4a82e2a90a301fb6bc4d7ac7f618c845b0c705203bd0766681e618c2e39d5bcf344f6d0656bc1e56572fadb50a4aceb9feb9cdba91b2d53a29a93d9a976343bfd9da9a46e768bc12c859207388ce439d98b5dbe488e0104e25844c1a61176d6c1d3d85715fdcf7815fa32097b73d728b1db818de8d14c64128367ce53f4172c4a006e6e335f7d70c1103414843d6c8c157b202b827dd9bd96d86025a95173405816ffac516614ac78399688f172a9dfad10bdf65c929805e7d67f54fb53f416b26bec9baee37798e7966140c6167e8968a0d6dd8d414f99567f9ebf33a7f2daa2cef091d389d97a11113fad0b3ad8dc0aa074a0a6f79f06b33af3638a09c8449544565f83dd733452c3258c1c3668b2b89d0328c740a570f1332db01b85d41bb1452ef947bbe85d0962e3341e9c3771d6205b446628198630092f09daf1c7a44d52c167af42e601070604d92d52c073284c21008d853559a244977fec4ab5e1fb613812a98f1491622bda05726a32ff915a4de22074fb0fbf22a0b324e16a78984eed987ab94cd9ca7493b9873b05152f47058bfc71d9839e58296e3f3fd0cdd456e32eeee26906850654d50b654cfbd1d3d8846099771dc65d8ff0e7cd804a6b55687d15a0195fc79768760b84ffacd89bd95baa4e1e218f10f19acbe27050637cf01f2d8cb635b9a4403260edbacc437af32c387a67a2a2cd772c5e7567d878ec194b1984d559854aed8b133c0bf435f2f906c3f30c9cfa84412f1c8f97ae3b770f2011b6b28662d0c4282d088dffde036a9ad2dae174727a33d21caa06e5caca1ab0346ba4ae336ca7c18b637f2ecb2236d83ebeb1b8e134d112a3da1ed51a42da9032b9805652e6db679acc56b665868378beda2f17766c7a13165283c093ec81fb9cc2f1647940a4850c466fd347f370c43c6c97bbd31483172dfa9998e76124943584603ffcb1c63d151e260a1a36f64e57bb0b5061c0762c3e360b01bd02668d37b793cfdf0413e3148533c6ee3e0120ed4d09596f57b7d94f9a2f2d0e958f7f6348898a47648e36fbacd81844a3c37581d97fec904adee4b79ad20670cad59da21fa60c7dc5cfd9215567761f3984db39bf62814db8649f5574e5b4fbc124892c86cafed6e833ee520a762629fec745d03d838b41f56d97c19da09d5594e278141015e1844b2eef4d4b1c5e2f62b241aa68e391391ebb7d91e82b3a52ec2e421734d029efc368133f4a10a2201198743276ee03a19229be581970683a9d4817f028a72c64bbd7176e9bc389303341ddb352f8fffa277077bd9e47cd818e27128fac0a57be928343490eccd0051a08797e0b57b97443dfaf466c08ef6bccc6db980a4b5926cac219ec6b30d7175f6f21cb97c1827028c10934f1dfcf2b4e2098870b30b1226d178f3e246e0d23ff5a91e294ddce262326cc55ec2b33fb0e9d22ff03f034e60fb6f771a7732ad59e8a63907af1a55492c8b55aa96892fd3c7ff7a67b4030945fdfcf2e3ad13ba0aac112272d1bab54327dee1b158e14f5d2a8195055021a2e3ed64716ca624ca4fd7c17289815c6512f421746ccc760b1f06886120c3d3d601b425b9f3aa97306e7927d73f1cbd41491813a98d0f29691997d72906a94a558d9f05acb0b4ef1b65cb002330826659536b5262a61b4bb920eeaff82d4464705a8682e92964f4782718030034de61829ad8736e2907b4376f2e33ece18dcd9e75fdedb5868afa64b840ca90f74f384335557d87a93421a6cf0fd65c755fa8195e7ec38eae344fc5ce33d6a1eeabe3d30a8969de3c3859ebfe23bf7d749eda08a028c49f6817cc7c9093c430b1c5f41bb66147fceca9dbbd93567ebd30d4eef4dbaab170ffcf942db181b496d8f0a1d0e00c658b6328e99046d503ef65caf2815a40bfd116fe8eb218febe2d6aa9f9d8be8498267325f02913d7d236667ca80b09a2ccd78bed8c061d9d4ef6d3e8610774bf403535728eaa1904570beb963788ee3f8c21fac3835b39a6a7dc6b66137d003f1b2538c0aeb74d8587676e53d125de75db5de1064c35afb1e468a480d418691435f2ad452d735101b6f93c5790a4ac98302e6727548414bdbc36cbb4a737fd5f435f26eed05779419939e4882fdbcfb2ae20f3d70247bfc32847eae5dd71cbddd0198aadecf21e5f7a72a47cd09cc289b8ab70475476af38261920f7085b3ebb4ca3ea40d71809215d5c7096f462db7de4be9fd384a5c4b6612a31c5364263ca6060840e54e3ca29a3438e8d6beef8cf5f44d9b4327a9b57f020cdc480a211d7127731ee128f11d6231758c56aa44c12fb793dead5bd0f9912908b9c0d9dcbb01d1392edb486cec36b6d2a24f2eb1a7cbe7805e0e29081071da7611ee163476c446bf1d79ef16cbbcdba2add10421ecf8bce71e5e0f43e443a4a3b0f2e7d187856fea53eb64292b990fa0d21f8cea79812071b19fd1ff70419a25037e3b63a86edf7e8e39b557842863fa31954d8d8d92a26a21b62e5247a941a9f635781638cf3bdcc2b5f6b3557471d2279dfe96c19a230de7d0eeb6dd7085ebd59d4904b20310c06103106bcfa0ba8c44ebe4fe79ffe3bd8807b556195bfdf63ebb25722ff99e47e7686d2ba82e27997b4f31cf0bbb760e8c97fd6bd8712c829fe44b5a772c4e737a73ef1bfa1446a87351a1e62259226c03b2387b66ac77a59ebbb2ce676a720b23978bc1629700d50f06687fa60d36e9da6d22d1ef3ff10d463e13eb9ee296a11450eceba00da5b31d7c871cb5a98ced52dab57fd7bb1b4eda8142b9593a37d77200df52f9e786dbb3b4cbe87f3c4ba3ee516892c3c92a23d076d02f65e2f171ea0d8b7557358533a84f03478f1eccf91163a8322f6ab9b495eebc23804e95e1027f7758eb68f9cd34b6c1be795d0b4b7d5c1a36a0f8e304af40f740c8820a41a1f9063dce2d02def17b9a68308bd1b9f281e28a06b34e1eecac7acf5a7c50caf39bcd44c3af5e242630e761ece89dc6892ee17802ad56e161f06aafeb08e3fec5030212357d2b5e5ef2ebc36efa9801f5eb19036dbf7a8b5fb911ada0391e41e65c22218eeaf27bd4b783c935d4d2b1699df5ba0bf5ff2a4d792b57b0f0980a37bb37ca0d1fd37c3c7dab30d2ca1994943b2c7a2820adad706693e4791ac0cd500ddf55235c47dd21d6bb60eb557fc21e82fd0b5f635fbda00dc11dd430af293f124452a5f6f1f394e0b6c9c50c935bff6c91da6d3df8d15ac044f71c560a363da8157b1f06b2c26240cd65b1cff50b3a6545fbd59b37d8268c0777534705c29215cf262ddf4a37bad2ccd5fe715be78f34c6126b1e2468827fc2c1a74b113a751f96cd8107f143d514aeb81aa7f54a72ceba9a328afe2f054b2c7100813dbd7865e538cf5074bc3db2f530b5d0d97af080ee1c43186359ef78757f5bea7a5201357a5da09f3aba6cb8330fa6ad4cb6838530ae5aa3df4595c7fa1d0e5d425edf69153815f93a1ab4ad3ddc558c2139cb47585c4824ca4fd5e4f4b396eb4597dce2a5d80bfffef89b7a6524c120d9a433424400d4fa8990f4b4a1a3f09934adb80567b9cf181e83b2080f86c67907e335324d43f51d97e02955e92488f93086edbbb9ef98254fddb9830bbb4f099aa39de590d7c9a9372a4df7989963a38164ff920703f2ba5d142dea9a9041fd066e86a7e65405bc0c7345b3e22edb2854e3c31e4622e2d60baa1bdf19ff072ac279804240458977aa076cb1348c87e2406c12e18da65c12e74dc9396c289c341197181f986c3c089920ee767f6e3638c4c680cbca71c5af1947a7eb385120dccf568cb7bf7a984cf63aa4defd4ac3e850241598ce2b1dad30495d296b7db732cf88b4e2a59be02e36385a97fcbdb6d422b97cd55f82c7a9c285b2212b617939e49ccb5f39d7fe1e220ce4213c7a3a4ade4387e44e6b076ba14e3fcb9ac0cab36c34e99bd97fdd5e5d5659ce056f91f71eb7436d6aa5ec0779d1691f53a61d977da835209b699836f61669eeb33788dda4af3592b406e5b885c178c2769c45d9dc87cfa34e277b659952c1da75dad3a0ff6d912d7dc074a66ef9b9b3161c4cca0c5971e0be41d800c7b314e3c363a293fc71eced3f8f9d43b18b6d6ad7588368fd79f88a1ff77ae619b4ce37f051ecd22637f9557edf5f10bdf2ad33f3c1712a20715b2bb5be04195cc6a7311ad888b975809d20fe98aca88a23cd38be4aea88ae04d912ed426da83c90941862523ea7ab565cc61627f648b57964c56d162a8ef32bee955198ea8476d25273a6a9b3ccf67b088c006e007b8a896629a3a81097f0521a0feef2e22c04372e22bd9c86490b073c6cc5a49c7215828aa480aacd2c0ca07a459eabc8514dcebfe05c5c2a6e8dc7e21e540cef55c3800a217f2faf12caa615f96fc24949e70f41702f90122f91a8a7da3a0f1d4bff7dadaff9f9c66f9ba3d1b970212c214099dd00647cf4539759d540c9a15a534c39c6d1b55c147eac41e5b6962ec866815f36e60749e1fb4197d15a39bf3b1a676863bffebd06a5a31a91fa71a90c86c3a26b4892edfdf5952fb344677e30f2b3f26994dde5b819a5a52e4df435df37a2858394452c19230a3ae6577a76c5aa00904bf78d8c427935050234d8ea1208d0dcdb59b676e982c6a8919cdac76dcaadb5d5de54b4e3f0519786974816ea25c48e256f9d9713a60079fbcfaf8367528d209c8dc73a076af693b2476c02acb2bfdfa563132b97e9dbf72b6d87da445d20007ad8f112d57cc4b13447ba9baf41a4cda397fa167a1788ec103b4ef014e555b4e7fc008a212fccaf24f6c54a6a5b211b8a40d2fc87bb08adc9eefff1e87bb240864e99e685cdf10393ae01cb3ea34cce58cb2fb3f04a742b9aac854c08879212c55c2f9e3041725f921c1e5016ba32c493cfdb0914dc6e2427c9331953178dc03c9b4ec16ab9bffdddd436bdc0fb65c8f9f391ad33a4381cd4b379a10c85eaf49fd1b5d38427273971a1749cd6976eaa00c50c4db83761089b8d30deb8a97375f39cc9f739eeca7380ae41adac7046c3fc3d53d8461c609c4e8dbc53c0df90ba0366b72ba2fa0f4030d7710c6d242f6012e4d6f6bcfce43aa2fe2064f928b27ba2b0875fa924b98b5f6261867d2ffc06b1a58508183a1e4f0fb56d45baaa4fd65bdca6bade63a692a9c1ed39b4ecbfcf31027da5ac7afcdd4461ac4084c81ab72f4edd150c6a3b33932590c7321f3926a5aac81e73f76d1bddc550082626e114d79ce768b37b0c4eafd6b8e20c51508d43212d1aed1ae8d28168b499d51d364e550000575a756bf8650136f8b07bda5bb040d78b60bd7e7e823fad0b0b0cff5fcaa2520b0334f48bd0b6e9d62b0f90b8bc68795fbfb99a97ccaabc51f36bf2b90c513b4a55d883bef12ba44bfc17431e9abde52afd2cf30e9a4f098d39d85d5632592b690324f8e257f59e880b687cb7782bc7aabd3fa038becdc6af066f56985f427d87ba539696e558ad99aecad76bfbf35df4271e9c4ef01bdab8fbdc0200ff9523795627310c89898e80af964d3c47acfa033a3579b4b550170eed3605fc13c3229d3aa04fedf360bf5e60456adc5b2af1043a65615a7ad4268d9342de95762017b7341da38f8983abe731332a737917893d3290fb362b1f5634d2fa4725281ad06341a3a93fa8c5e736e66a5fed01454301a96c335fac3e648a9d8b1e58a750e4191c83dfe4f0972f43564493620143f088d72c1abc6434ee26bf8ec8ed1c0234627047dccb399bcf2e4a378a831067689f2436778512f3c10bda7be51c3d4a486efda20e2554589e3054822ccf8fc141ff1d10df36cd390287963424c47daa5fc7971b257cbce3b0a781ba1d5c91dd89c3ce926ec01f23131f91af0a4e2ab7ef4f461b501ea128565b7867ce7d1909f67c9fcc95dd690ffcbc1fb99546285f2d9249498203fe14d52a0f4c57af41194e98ec60d02cfe8dea508da0741b5f0441880a6d51191a23ae2357874721781c592b2957434bcee304d125dc241c90d9ef25410c782a686a83f2d3a7d8d303f30ac08e265098678846ee6faa2c74c2e9cafbcf850eda106d2648e7690d06f0d5c406f725f1df8cfa5d43bfe2b3a3fe5f2f8d9aa37555af66a09e81847e5c564b2ae07a15a229bd68522c31e15e178cb47469e7f7e0ed8fe1ff24dbcfb1977f12a618fdee7a1c1db4f868e5508f4ec0bd91a246c2bbb3a0de596da98d348d02abea4e98e23c15cad8602872370c3548d7fbe1362af6b874f3a392622b87d7d192513135ffa6fa521034a093ddb7d1ea94bbfa6d09798b49a7abd6751afdf29443d019fb65cb963547a6d231a58f67bf9b45834c24c54eb94313dc803fbcfe27c746e0f6d26e5753cb1dd8352ea211f3008e8244f326cad6411a69df58bef7f5d63cbcf51595da6434a55bd06bd919c4b053b8172cdb80a310e0f8a4f1d7a2b2f1af8f37407152198e6e822b4fe2d963c32d7f2ed6c505fb2d7270842a54fe2491638f2049a06224fd79184e084e9b07fe8a2677328c50f625d2375a29d21d67f98c125e5776109b40a71d0849352f6569c48c159459d0b428ee66f403185b5c9dbdfff77f269cb99401a0323c697628fc8afe808a9fd5010b8646af89b8c0f210965923b94706fded156a2aabd2b359378b96754fbfb44cf5eef66ddc5afe34c848fc35d97ee1cafb19c96a1d405b6917b4f878ad0375e9a675ddd4367dc5dd8e14e7378186ca244e02a3635e2cc58b0bcdd4758796b3e628d77dbef68b701056040321214682251255bc9593672ff2e7d56b2193a771373aa74f32161fa07e78a63a97d827449a8a7ca468e8180f2faa937aa554c49d468a8afef660a094a0d27d8d8f7b63278889ff04d6f011d0983c5c2fc638d5824025e85fcfd585618e616e83cbd5e06298ea7a4186e14ce9b0526dd3958e250bb9cb1d3c158541f7c11e77de71f780496d51dd2c80e7cd9ff607b4db4434c77cff79d7498787816f98831ab480447320f3b51d7064b8d04e5be8e7ff438c512c347b4096b7fe6f8201d61ba224867fc9cea3454b6a9d2bb3db796fa6379d27d3292e09bbf10019c5d224dc3d9910261e477e371ef85cdf27cb5dcdefd516426ab7f3aab281aca444b98e194 输入密码查看内容

实现进程被结束就蓝屏的函数

1. 保护进程,结束就蓝屏RtlSetProcessIsCritical函数可以启用或关闭开启之后变得和系统进程一样被杀系统直接蓝屏系统进程也是此函数实现的上图可以用于进程保护设置自己为保护进程,这样结束掉就会蓝屏,蓝屏信息翻译就是 重点保护进程。 设置为保护进程:RtlSetProcessIsCritical(True,Null(或Nothing),False) 取消(关闭时记得加上去。):RtlSetProcessIsCritical(False,Null,False)把进程做crss中止就蓝屏,防止进程被杀这是最不占用CPU的方式了 以下为C代码 1234567891011121314151617181920212223#include<stdio.h>#include<Windows.h>typedef (NTAPI*Rtl)(ULONG,BOOL,BOOL,PBOOL);typedef (NTAPI*PT1)(BOOL, PBOOLEAN, BOOL);typedef (NTAPI*PT2)(BOOL,PBOOLEAN,BOOL);void Protect(){ BOOL B; ULONG SE_DEBUG_PRIVILEGE = 20; Rtl RtlAdjustPrivilege=(Rtl)GetProcAddress(GetModuleHandleW(L"ntdll"),"RtlAdjustPrivilege"); PT1 RtlSetProcessIsCritical=(PT1)GetProcAddress(GetModuleHandleW(L"ntdll"), "RtlSetProcessIsCritical"); PT2 RtlSetThreadIsCritical=(PT2)GetProcAddress(GetModuleHandleW(L"ntdll"), "RtlSetThreadIsCritical"); RtlAdjustPrivilege(SE_DEBUG_PRIVILEGE,TRUE,FALSE,&B); RtlSetProcessIsCritical(TRUE,NULL,FALSE); RtlSetThreadIsCritical(TRUE, NULL, FALSE); //BY 1361784102}void main(){ Protect(); getchar(); //BY 1361784102} vb代码如下: 12345678910Option ExplicitPublic Declare Function RtlAdjustPrivilege Lib "ntdll.dll" (ByVal Privilege As Long, ByVal Enable As Boolean, ByVal Client As Boolean, WasEnabled As Long) As LongPublic Declare Function RtlSetProcessIsCritical Lib "ntdll" (Optional ByVal NewValue As Boolean, Optional ByVal Value As Boolean, Optional ByVal WinLogon As Boolean = True)Sub Main() RtlAdjustPrivilege 20, True, False, 0 RtlSetProcessIsCritical False, False, True EndEnd Sub 2. RtlAdjustPrivilege提权后NtRaiseHardError制造系统蓝屏VB代码如下:

可实现维护通道的vbs脚本类

前言闲来无事,为了方便,用vbs写了一个类! 别瞧不上vbs脚本语言,其实当你学习的语言越多,发现所有编程语言都是那么一回事,最终的目的都是完成某项功能,vbs的 好处就是可以使用系统的计事本直接编辑,不需要任何语言安装环境,python开源库是多,但却必须安装python的语言环境, c++等语言生成的程序功能是可以足够强大,但要立即增加修改功能却很麻烦(因为需要安装编程环境)! vbs特别适合拿来即用,代码不对随时可以修改!就好比批处理虽然功能不强,windows却一直保留到现在!也许windows的激活 slmgr.vbs和office的激活ospp.vbs一直保留到现在的原因可能就是说明vbs还是有存在的道理的!如果你仔细看了这个vbs自定义 类,你就会发现vbs也可以实现很多功能!比如这个vbs类中的中止线程函数,所有语言实现,都是取得线程ID,然后发送中止线 程的消息,其实此自定义类就用了三句代码,这就是其他软件中的根据窗口关闭网吧广告的功能,也可以中止那些在任务管理器 中无法结束的进程! 介绍vbs常用函数代码,包括一些特色函数,杀毒软件可能会报毒,使用notepad++等软件可直接查看源代码,未进行任何加密 最大的特色,可以让vbs使用windows api函数,api能办到的功能,vbs也能做到! 自定义vbs类的函数,见demo\demo.vbs文件 软件架构lib目录的MyVbsClass.vbs和dynwrapx.dll为核心文件,即vbs自定义类 demo为示例代码, 维护通道是使用vbs自定义类写的网吧开机维护通道 虽然是明文方式写的vbs脚本,一样能实现如深蓝维护通道等类软件中的绝大部份功能,一样可以关闭网吧的广告及广告窗口! 安装教程

让电源键关机变重启

让电源键关机变重启 使用说明 注意:需要关闭无盘的闪电关机,开启闪电关机,本软件无效! 功能:运行本工具,按电源键,或系统中点关机,会执行重启!总之就是不关机,关机就是重启,关机直接重启,关机会重启,说三遍! 适用范围:息屏挖矿,按电源键会关机,本软件作用就显现了!机器正在挖矿,显示器黑屏,总有顾客以为机器是关了的,去按电源键开机,这时机器就会关机。顾客就会以为这台机器有问题,明明按了开关键,结果机器没开起,有些会立马换一台机器,重复上面的操作。使用了本软件,按了电源键不会关机,直接变成重启,顾客不会置疑了,呼叫网管的次数少了! 下载地址

八圈9.5版关闭侧边栏工具-怎样关闭8圈侧边栏

如果说8圈智能场所管理平台等,提高了网吧运营管理的效率,让整个管理流程更加便捷;那么8圈机器人,就是让整个运营管理更加智能化,降低人为因素造成的失误,在原有的基础上提高运营管理的准确性、安全性。 据李金平介绍,8圈机器人能够轻松解决困扰网吧业主的收银员不负责,收银员成本高,招聘难,员工不稳定,财务统计困难,身份证冒用现象频发等系列问题。 不仅如此,8圈机器人优势明显: 设置简单、操作方便,无需专人指导一点就会;全天候24小时工作,节省人工成本开支提高竞争力;在财务管理上,自助收银,机器人收入按班次自动汇总,当班收入掌上8圈随时可查,更安全;AI人脸识别,杜绝人证不一致。 9.5版去侧边栏下载地址: 点击开始下载