Navigation X
ALERT
Click here to register with a few steps and explore all our cool stuff we have to offer!



   484

Answer this Python question correctly and you will win a VERY special prize.

by ZeroGay - 30 June, 2022 - 10:53 PM
This post is by a banned member (ZeroGay) - Unhide
This post is by a banned member (kazuma) - Unhide
kazuma  
Godlike
1.341
Posts
171
Threads
3 Years of service
#2
(30 June, 2022 - 10:53 PM)ZeroGay Wrote: Show More
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.  sheepe

Goose.
.
This post is by a banned member (ZeroGay) - Unhide
This post is by a banned member (kazuma) - Unhide
kazuma  
Godlike
1.341
Posts
171
Threads
3 Years of service
#4
(30 June, 2022 - 10:54 PM)ZeroGay Wrote: Show More
Incorrect, thanks for your entry though.

Damnn thanks for the oportunity
.
This post is by a banned member (sadnigga2) - Unhide
This post is by a banned member (ZeroGay) - Unhide
This post is by a banned member (TimeChangeEverything) - Unhide
42.093
Posts
14.692
Threads
6 Years of service
#7
(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 More
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.  sheepe
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
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 Kappa

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  Pepe


Sir you're doing your homework?
[Image: Refunding-2.gif]
[Image: jwGHBVl.gif]
[Image: h6S8dGS.gif]
This post is by a banned member (mrkaplan) - Unhide
mrkaplan  
Registered
14
Posts
2
Threads
3 Years of service
#8
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]
 
[Image: Ty06Xfb.gif]

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
or
Sign in
Already have an account? Sign in here.


Forum Jump:


Users browsing this thread: 1 Guest(s)