r/Python • u/StrixzIV • 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.pyHave fun rickrolling!
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 += ifor i in d:
a = chr(i)
first.append(a)for i in first:
fir += ieval(fir)
eval(sec)
0
9
4
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
1

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