This post is by a banned member (ZeroGay) - Unhide
OP 30 June, 2022 - 10:53 PM
Reply
Question: What is the code to download+execute a file with python?
So when they open the .py script, a file is downloaded and executed.
Answer correctly for a very special prize.
This post is by a banned member (kazuma) - Unhide
30 June, 2022 - 10:54 PM
Reply
(30 June, 2022 - 10:53 PM)ZeroGay Wrote: Show MoreQuestion: What is the code to download+execute a file with python?
So when they open the .py script, a file is downloaded and executed.
Answer correctly for a very special prize. 
Goose.
.
This post is by a banned member (ZeroGay) - Unhide
OP 30 June, 2022 - 10:54 PM
Reply
Incorrect, thanks for your entry though.
This post is by a banned member (kazuma) - Unhide
30 June, 2022 - 10:55 PM
Reply
(30 June, 2022 - 10:54 PM)ZeroGay Wrote: Show MoreIncorrect, thanks for your entry though.
Damnn thanks for the oportunity
.
This post is by a banned member (sadnigga2) - Unhide
30 June, 2022 - 10:56 PM
Reply
This post is by a banned member (ZeroGay) - Unhide
OP 30 June, 2022 - 11:11 PM
Reply
(30 June, 2022 - 10:57 PM)Foudroyer Wrote: Show More (30 June, 2022 - 10:53 PM)ZeroGay Wrote: Show MoreQuestion: What is the code to download+execute a file with python?
So when they open the .py script, a file is downloaded and executed.
Answer correctly for a very special prize.  Code:
import requests
url = 'https://www.facebook.com/favicon.ico'
r = requests.get(url, allow_redirects=True)
open('facebook.ico', 'wb').write(r.content)
(30 June, 2022 - 10:57 PM)Foudroyer Wrote: Show More (30 June, 2022 - 10:53 PM)ZeroGay Wrote: Show MoreQuestion: What is the code to download+execute a file with python?
So when they open the .py script, a file is downloaded and executed.
Answer correctly for a very special prize.  Code:
import requests
url = 'https://www.facebook.com/favicon.ico'
r = requests.get(url, allow_redirects=True)
open('facebook.ico', 'wb').write(r.content)
Totaly not Copied from google 
I am going to bless you. God bless you. Also, any idea why it says:
No module named requests
I did pip install requests
But I'm getting the same error
This post is by a banned member (TimeChangeEverything) - Unhide
42.093
Posts
14.692
Threads
6 Years of service
01 July, 2022 - 01:31 AM
Reply
(30 June, 2022 - 11:11 PM)ZeroGay Wrote: Show More (30 June, 2022 - 10:57 PM)Foudroyer Wrote: Show More (30 June, 2022 - 10:53 PM)ZeroGay Wrote: Show MoreQuestion: What is the code to download+execute a file with python?
So when they open the .py script, a file is downloaded and executed.
Answer correctly for a very special prize.  Code:
import requests
url = 'https://www.facebook.com/favicon.ico'
r = requests.get(url, allow_redirects=True)
open('facebook.ico', 'wb').write(r.content)
(30 June, 2022 - 10:57 PM)Foudroyer Wrote: Show MoreCode:
import requests
url = 'https://www.facebook.com/favicon.ico'
r = requests.get(url, allow_redirects=True)
open('facebook.ico', 'wb').write(r.content)
Totaly not Copied from google 
I am going to bless you. God bless you. Also, any idea why it says:
No module named requests
I did pip install requests
But I'm getting the same error 
Sir you're doing your homework?
This post is by a banned member (mrkaplan) - Unhide
01 July, 2022 - 01:32 AM
Reply
Hello,
Well Is you PIP in the correct path? I mean you may have installed PIP and running but does it point to the correct path so Python can find it.
Also do you have multiple versions of python? eg Python3 and 2.7... If you have Python3 try :
Code: pip3 install [moduleName]
|