Toggle navigation
VA伐木累
社区
VA伐木累
Proxy
JSON
BASE64
MyGit
登录
注册
×
登录
邮箱
密码
忘记密码?
HideRun
•发布于
•作者
liuzy
•1716 次浏览
•来自
资讯
```c# using System; using System.Diagnostics; using System.IO; using System.Threading; namespace HideRun { class Program { static void Main(string[] args) { string src = "TestWindow.exe"; if (!File.Exists(src)) return; string dst = CopyAndHide(src); RunAndStop(dst); UnHideAndDelete(dst); } static string chars = "0123456789abcdefghijklmnopqrstuvwxyz"; static string CopyAndHide(string src) { Random random = new Random((int)(DateTime.Now.Ticks & 0xffffffffL) | (int)(DateTime.Now.Ticks >> 32)); string dst; do { dst = "["; for (int i = 0; i < 6; i++) { dst += chars[random.Next(chars.Length)]; } dst += "].exe"; } while (File.Exists(dst)); File.Copy(src, dst); FileAttributes MyAttributes = File.GetAttributes(dst); File.SetAttributes(dst, MyAttributes | FileAttributes.Hidden); return dst; } private static void RunAndStop(string dst) { Process p = Process.Start(dst); Thread.Sleep(5000); try { p.Kill(); while (Process.GetProcessById(p.Id) != null) { } } catch { } } private static void UnHideAndDelete(string dst) { FileAttributes MyAttributes = File.GetAttributes(dst); File.SetAttributes(dst, MyAttributes | FileAttributes.Normal); File.Delete(dst); } } } ```
0 回复
作者
liuzy
积分: 841
“ 黑眼圈圈男 ”
无人回复话题
SonarQube 9.4 + PostgreSQL
shell倒计时
日常网络巧技
使用ssh创建socks5代理服务
NodeJS集群demo
作者其他话题
SonarQube 9.4 + PostgreSQL
shell倒计时
日常网络巧技
使用ssh创建socks5代理服务
NodeJS集群demo
回到顶部
友情链接:
JFinal
©2015 Powered by
jfinalbbs
沪ICP备15012258号