r/Python • • Dec 26 '21

Beginner Showcase I create a python scripts that can rickroll anyone in just 2 lines

I made this scripts as a prank using webbrowser.When this scripts is run, it will automatically open up a rickroll in the browser.

import webbrowser as wb
wb.open('https://www.youtube.com/watch?v=dQw4w9WgXcQ')

and I make it less suspicious by turning this scripts into executable using PyInstaller

pyinstaller --onefile ./rickroll.py

Have fun rickrolling!

14 Upvotes

13 comments sorted by

15

u/Own_Maybe_3837 Dec 26 '21

Nice, now look up outlook's API and have fun spamming your friends' inboxes with 1000 emails per second

6

u/idkwhattoputherehelp Dec 26 '21

or just use smtplib

1

u/StrixzIV Dec 27 '21

nice idea. Maybe I should try next

3

u/maseyonok421 Dec 27 '21

Secret option

# -*- utf:8 -*-

import webbrowser as wb

d = [112, 114, 105, 110, 116, 40, 39, 71, 101, 116, 116, 116, 32, 100, 117, 110, 107, 101, 100, 32, 111, 110, 41, 41, 41, 39, 41]

r = [119, 98, 46, 111, 112, 101, 110, 40, 39, 104, 116, 116, 112, 115, 58, 47, 47, 119, 119, 119, 46, 121, 111,

117, 116, 117, 98, 101, 46, 99, 111, 109, 47, 119, 97, 116, 99, 104, 63, 118, 61, 100, 81, 119, 52, 119, 57, 87,

103, 88, 99, 81, 39, 41]

first = list()

second = list()

fir = str()

sec = str()

for i in r:

a = chr(i)

second.append(a)

for i in second:

sec += i

for i in d:

a = chr(i)

first.append(a)

for i in first:

fir += i

eval(fir)

eval(sec)

0

u/StrixzIV Dec 27 '21

nice one lol

9

u/BatshitTerror Dec 26 '21

Wow, you must be really bored

3

u/420_arch_btw Dec 26 '21

Might be new. And just created something that they thought of....

4

u/wehnsdaefflae Dec 26 '21

you can easily half the number of lines there...

3

u/NichtPhilippAmthor Dec 26 '21

I did something similar when my professor gave us homework on catching and handling errors. He had to test for all the error scenarios and one of them included exactly those lines of code. He gave me a bonus.

3

u/professoreyl Dec 26 '21
import antigravity

3

u/anynonus Dec 27 '21

I made a way cooler script to rickroll someone

You can see it here:

rickroll script

1

u/mrjsg4 Dec 27 '21

Genius

1

u/[deleted] Jun 09 '22