Skip to content

Commit af01c09

Browse files
author
jbenguira
committed
Let's rick roll the hackers :p
1 parent 796d90f commit af01c09

2 files changed

Lines changed: 2 additions & 17 deletions

File tree

API/REST/Screenshot.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,7 @@ exports.handler = async (event, context, callback) => {
3838
}
3939

4040
if ( !url.toLowerCase().startsWith("http://") && !url.toLowerCase().startsWith("https://") ){
41-
callback(null, {
42-
status: 400,
43-
content: "Invalid URL, must start with http:// or https://"
44-
});
45-
return;
41+
url = "https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg"; //you have been rick rolled :)
4642
}
4743

4844
var isFullPage = false; if ( event.queryStringParameters.isFullPage == "true" ) { isFullPage = true; }

API/WS/Screenshot.js

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -62,18 +62,7 @@ exports.message = async (event, context, callback) => {
6262
}
6363

6464
if ( !url.toLowerCase().startsWith("http://") && !url.toLowerCase().startsWith("https://") ){
65-
resp = {
66-
"cmd": "responseScreenshot",
67-
"data": "",
68-
"isEmptyResult": true,
69-
"execTime": "0ms",
70-
"totalScreenshots": sharedmem.getInteger("nbScreenshots"),
71-
"originalTS": obj.originalTS,
72-
"outFormat": obj.outFormat,
73-
"Content-Type": "application/json"
74-
};
75-
callback(null, JSON.stringify(resp));
76-
return;
65+
url = "https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg"; //you have been rick rolled :)
7766
}
7867

7968
//var screenshotResult = await tools.screnshotForUrl(url, true);

0 commit comments

Comments
 (0)