Hack Forums
[Python] Run a python script (compression) - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [Python] Run a python script (compression) (/showthread.php?tid=6056661)



Run a python script (compression) - Zamper - Mar 13, 2020

I post on this section cuz its python related.

Basically I got some files compressed with some python script

I want to uncompress this simple file
http://ge.tt/8FzjOk13


it appears like this:
[Image: 37300ff20d2f542ba9f0af4ead641377.png]


compression script files:
http://ge.tt/4gmh5l13


pic:
[Image: a45a1ebd7ada78e61410cb6fe5f0001e.png]


Any idea how to run the python script to unzip the files? hahas

cheers ✌


RE: Run a python script (compression) - Flash7475 - Mar 13, 2020

It looks like the auto.py is responsible for file compression and decompression.

put the gat.koc file in the same directory as auto.py, open up the comand line in the same directory also and run either:

python3 auto.py gat.koc

or

python auto.py gat.koc


RE: Run a python script (compression) - Zamper - Mar 29, 2020

(Mar 13, 2020 10:27 AM)Flash7475 Wrote:  It looks like the auto.py is responsible for file compression and decompression.

put the gat.koc file in the same directory as auto.py, open up the comand line in the same directory also and run either:

python3 auto.py gat.koc

or

python auto.py gat.koc

[Image: 8b5a04c3882db7065a2a0a8160c4ca06.png]


RE: Run a python script (compression) - 10x - Mar 29, 2020

(Mar 29, 2020 04:28 PM)Donovan Wrote:  [Image: 8b5a04c3882db7065a2a0a8160c4ca06.png]

Looks like python2 code to me. Install Python2 and run the same command but with Python2.


RE: Run a python script (compression) - Zamper - Mar 29, 2020

all python2 downloads seems like not working on my pc cuz old versions

isn't there a way to use this script with python3?


RE: Run a python script (compression) - lockhead - Mar 30, 2020

(Mar 29, 2020 06:46 PM)Donovan Wrote:  all python2 downloads seems like not working on my pc cuz old versions

isn't there a way to use this script with python3?

Yes, you can rewrite the whole code for Python2 instead of Python3, or just install Python2.7 ...


RE: Run a python script (compression) - Zamper - Apr 3, 2020

What i'm doing wrong here?

[Image: 74d99a71d5b6c64506830fd7d8833a92.png]


I tried all ways possibles...


RE: Run a python script (compression) - lockhead - Apr 3, 2020

Run it form the terminal by pressing: WinKey + R
Code
python3 auto.py gat.koc

If you get another SnytaxError: missing parenthesis in call "print" then run:
Code
python auto.py gat.koc

and make sure you have python2.7 installed and ur path PATH variable is pointing to that py2.7 installation


RE: Run a python script (compression) - Zamper - Apr 3, 2020

(Apr 3, 2020 08:51 AM)lockhead Wrote:  Run it form the terminal by pressing: WinKey + R
Code
python3 auto.py gat.koc

If you get another SnytaxError: missing parenthesis in call "print" then run:
Code
python auto.py gat.koc

and make sure you have python2.7 installed and ur path PATH variable is pointing to that py2.7 installation

[Image: 01f5a1a2a0d6abfff9ae60a423c51379.png]

still sintax error, i have installed python 2.7 as you can see

any other tips? I need to run this!!


RE: Run a python script (compression) - Nachfolger - Apr 3, 2020

(Apr 3, 2020 03:50 PM)Donovan Wrote:  [Image: 01f5a1a2a0d6abfff9ae60a423c51379.png]

still sintax _error_, i have installed python 2.7 as you can see

any other tips? I need to run this!!
Because that's the python shell buddy, he's talking about running the command in your command prompt.


RE: Run a python script (compression) - Zamper - Apr 6, 2020

I tried running it on the cmd as well and not results at all.

What i'm doing wrong? if somebody can help me I'll reward with some dollars.


RE: Run a python script (compression) - Sc00by - Apr 7, 2020

(Apr 6, 2020 01:08 PM)Donovan Wrote:  I tried running it on the cmd as well and not results at all.

What i'm doing wrong? if somebody can help me I'll reward with some dollars.

You need to go do some research before anyone can help you.

You're trying to run a command "python3 FILENAME.py" in your python terminal. This isn't going to do anything for you. Understanding what the command means, will lead you to your answer. You're going to spend a lot more energy trying to solve every problem you run into, opposed to simply doing a bit of research on how to run python scripts.

Python3 = the portion of the command that is calling your python.exe. This is commonly in your PATH as python3, or python.
FILENAME.py the file you are trying to run

You must run this command from the command prompt. If you are using old code, get that python version, if you can't figure out how to download it, do some research as nobody will be able to explain that to you in one forum response.