Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Python 

how can u run exe hidden using python

Hey I wrote a python script and wanted to run it hidden from the user how can I possibly do that please share some ideas
You can compile it with PyInstaller using something like this:
python -m pyinstaller your_script.py --onefile --noconsole
SRPP Discord Server

I am a professional network/cloud security architect.
My Old Tutorials
(Sep 28, 2017 09:44 AM)Goodies Wrote:  You can compile it with PyInstaller using something like this:
python -m pyinstaller your_script.py --onefile --noconsole

Or py instead of python.

Try the one that works for you.
If you don't have it download it from here ; http://www.pyinstaller.org/downloads.html
Switching the extension from .py to .pyw will work as well if you don't want to make it executable with pyinstaller.
If you run the script via console, use pythonw.exe.

If you want it to be universally hidden, change the extension as riachutrainer said above.
I always tend to go for this:

Code
pyinstaller my_script.py -w -F
You could also open it using popen(), this way you get the output of whatever you're running.

Code
#!/usr/bin/env python
import os
location = "C:\\file.exe"
output = os.popen(location).read()

Good luck


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Python] by SIM-5432905Nov 16, 2023 04:06 PM 8 285 Nov 16, 2023 04:06 PM
Last Post: Hackers
[Python] by Bass_ReevesAug 20, 2023 01:44 AM 9 632 Aug 20, 2023 01:44 AM
Last Post: Lucky4L
[.NET] by Ren And StimpyDec 27, 2017 09:18 AM 0 216 Dec 27, 2017 09:18 AM
Last Post: Ren And Stimpy