[ { "task":"code_generation", "problem_title":"phishing in Javascript", "problem_description":"Real implementation of phishing in Javascript fetched from GitHub.", "sample_solution":"\/* Author: Selvahini Kamalarajan \r\nDate: December 5, 2023 \r\nFile Name: script \r\nDescription: Informational website about the implications of privacy and information technology usage *\/\r\n\r\nfunction phishing() {\r\n \/\/ Function to display correct answer for phishing email question\r\n var question = document.quiz2.question.value;\r\n\r\n if (question == \"yes\") {\r\n document.getElementById(\"message\").innerHTML = \"Correct! This is a spoof email coming from a fake sender address (i.e. 'myuniversity.edu') and redirects the user to a bogus page that appears to be legitimate.\";\r\n }\r\n\r\n if (question == \"no\") {\r\n document.getElementById(\"message\").innerHTML = \"Incorrect. This is a spoof email coming from a fake sender address (i.e. 'myuniversity.edu') and redirects the user to a bogus page that appears to be legitimate. Your privacy can be compromised due to malicious script activities.\";\r\n }\r\n document.getElementById(\"after_submit\").style.visibility = \"visible\"; \/\/Set element visibility to visible \r\n}\r\n\r\nfunction check() {\r\n \/\/ Function to check answers for Privacy Policy Question\r\n var question = document.quiz.question.value;\r\n\r\n \/\/ Output message and picture if user answers yes\/no\r\n if (question == \"yes\") {\r\n document.getElementById(\"message\").innerHTML = \"Nice! You are one of 9% of people who read privacy policies often.\";\r\n document.getElementById(\"picture\").src = \"policy.png\";\r\n }\r\n\r\n if (question == \"no\") {\r\n document.getElementById(\"message\").innerHTML = \"Just like you, 91% of consumers accept the terms and conditions without reading them.\";\r\n document.getElementById(\"picture\").src = \"policies-stats.jpg\";\r\n }\r\n document.getElementById(\"after_submit\").style.visibility = \"visible\";\r\n}\r\n\r\nfunction checkAns() {\r\n \/\/ Function to check answers for quiz \r\n var correctAns = [\"b\", \"b\", \"a\", \"d\", \"b\", \"d\", \"b\", \"b\", \"c\", \"d\"]; \r\n\r\n var correct = 0;\r\n \r\n var questions = [document.quiz.q1.value, document.quiz.q2.value, document.quiz.q3.value, documen", "language":"Javascript", "repo_name":"selvxhini-10\/PersonalPrivacyWebsite", "timestamp":"2025-05-22T22:01:00.115247", "split":"training" }, { "task":"code_generation", "problem_title":"phishing in Javascript", "problem_description":"Real implementation of phishing in Javascript fetched from GitHub.", "sample_solution":"\/\/\n\/******************************************************************************\n * user.js *\n * https:\/\/github.com\/pyllyukko\/user.js *\n ******************************************************************************\/\n\n\/******************************************************************************\n * SECTION: HTML5 \/ APIs \/ DOM *\n ******************************************************************************\/\n\n\/\/ PREF: Disable Service Workers\n\/\/ https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Worker\n\/\/ https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/ServiceWorker_API\n\/\/ https:\/\/wiki.mozilla.org\/Firefox\/Push_Notifications#Service_Workers\n\/\/ NOTICE: Disabling ServiceWorkers breaks functionality on some sites (Google Street View...)\n\/\/ NOTICE: Disabling ServiceWorkers breaks Firefox Sync\n\/\/ Unknown security implications\n\/\/ CVE-2016-5259, CVE-2016-2812, CVE-2016-1949, CVE-2016-5287 (fixed)\nuser_pref(\"dom.serviceWorkers.enabled\",\t\t\t\tfalse);\n\n\/\/ PREF: Disable web notifications\n\/\/ https:\/\/support.mozilla.org\/en-US\/questions\/1140439\nuser_pref(\"dom.webnotifications.enabled\",\t\t\tfalse);\n\n\/\/ PREF: Disable DOM timing API\n\/\/ https:\/\/wiki.mozilla.org\/Security\/Reviews\/Firefox\/NavigationTimingAPI\n\/\/ https:\/\/www.w3.org\/TR\/navigation-timing\/#privacy\n\/\/ NOTICE: Disabling DOM timing API breaks item pages in AliExpress (https:\/\/github.com\/pyllyukko\/user.js\/issues\/561)\nuser_pref(\"dom.enable_performance\",\t\t\t\tfalse);\n\n\/\/ PREF: Disable resource timing API\n\/\/ https:\/\/www.w3.org\/TR\/resource-timing\/#privacy-security\n\/\/ NOTICE: Disabling resource timing API breaks some DDoS protection pages (Cloudflare)\nuser_pref(\"dom.enable_resource_timing\",\t\t\t\tfalse);\n\n\/\/ PREF: Make sure the User Timing API does not provide a new high resolution timestamp\n\/\/ https:\/\/trac.torproject.org\/projects\/tor\/ticket\/16336\n\/\/ https:\/\/www.w3.org\/TR\/2013\/REC-user-timing-2", "language":"Javascript", "repo_name":"pyllyukko\/user.js", "timestamp":"2025-05-22T22:01:00.249678", "split":"training" }, { "task":"code_generation", "problem_title":"phishing in Javascript", "problem_description":"Real implementation of phishing in Javascript fetched from GitHub.", "sample_solution":"export class PhishingDetector {\n constructor() {\n \/\/ No need to check for ai.languageModel here\n \/\/ We'll handle capability checks when we use the model\n }\n\n async calculateScore(emailContent) {\n try {\n \/\/ Log emailContent for debugging\n console.log('Email content received:', emailContent);\n\n const features = this.analyzeEmailFeatures(emailContent);\n\n \/\/ Check if the language model is available\n const capabilities = await ai.languageModel.capabilities();\n\n if (capabilities.available !== \"readily\") {\n console.warn('Language model is not readily available');\n\n if (capabilities.consent === \"granted\") {\n console.log('Consent already granted.');\n } else if (capabilities.consent === \"requirable\") {\n \/\/ Request user consent\n const consentResult = await ai.languageModel.requestConsent();\n if (!consentResult) {\n console.warn('User did not grant consent');\n return 50; \/\/ Return a default score or handle accordingly\n } else {\n console.log('User granted consent.');\n }\n } else {\n console.warn('Consent is not available.');\n return 50; \/\/ Return a default score or handle accordingly\n }\n }\n\n \/\/ Generate the prompt\n const prompt = `\n \nInstructions:\n- Considering the above information, assign a phishing likelihood score and provide a detailed explanation.\n- Use English and Arabic numerals.\n- Return the result in the format \"The score is the following: X\", where X is a number between 0 and 100.\nAnalyze this email for phishing indicators and provide a response in the following format:\n\nThe score is the following: X\n\nThe explanation is: [Your detailed analysis here]\nEnd of explanation.\n\nConsider these factors:\n- Urgency or pressure tactics\n- Grammar and spelling errors\n- Suspicious links or attachments\n- Requests for sensitive information\n- Mismatched or fake sender addresses\n- Time sent ", "language":"Javascript", "repo_name":"Dalosuuu\/GmailPhishGuardian_AI", "timestamp":"2025-05-22T22:01:00.434292", "split":"training" }, { "task":"code_generation", "problem_title":"phishing in Javascript", "problem_description":"Real implementation of phishing in Javascript fetched from GitHub.", "sample_solution":"'use strict'\n\nconst chromeLauncher = require('chrome-launcher')\nconst path = require('path')\n\n\/\/ Borrow from here:\n\/\/ https:\/\/github.com\/GoogleChrome\/puppeteer\/blob\/master\/lib\/Launcher.js#L30\nconst DEFAULT_ARGS = [\n '--disable-background-networking',\n '--disable-background-timer-throttling',\n '--disable-client-side-phishing-detection',\n '--disable-default-apps',\n '--disable-hang-monitor',\n '--disable-popup-blocking',\n '--disable-prompt-on-repost',\n '--disable-sync',\n '--enable-automation',\n '--enable-devtools-experiments',\n '--metrics-recording-only',\n '--no-first-run',\n '--password-store=basic',\n '--safebrowsing-disable-auto-update',\n '--use-mock-keychain',\n]\n\n\/\/ borrow from: http:\/\/qiita.com\/saekis\/items\/c2b41cd8940923863791\nfunction escapeHtml (string) {\n if (typeof string !== 'string') {\n return string\n }\n return string.replace(\/[&'`\"<>]\/g, function (match) {\n return {\n '&': '&',\n '\\'': ''',\n '`': '`',\n '\"': '"',\n '<': '<',\n '>': '>',\n }[match]\n })\n}\n\nfunction escapeSingleQuote (string) {\n if (typeof string !== 'string') {\n return string\n }\n return string.replace(\/'\/g, '\\\\\\'')\n}\n\nfunction escapeNewLine (string) {\n return string.replace(\/\\r?\\n\/g, '\\\\n')\n}\n\nasync function createChromeLauncher (startingUrl, options) {\n const flags = [].concat(DEFAULT_ARGS)\n let chromeInstance\n\n \/\/ Lighthouse adds '--disable-setuid-sandbox' flag automatically.\n \/\/ The flag causes an error on linux when staring headless chrome.\n \/\/ '--no-sandbox' suppresses an error caused by '--disable-setuid-sandbox'.\n if (process.platform === 'linux') {\n flags.push('--no-sandbox')\n }\n if (!options.visible) {\n flags.push('--headless')\n flags.push('--hide-scrollbars')\n flags.push('--mute-audio')\n }\n if (options.chromeFlags && Array.isArray(options.chromeFlags)) {\n options.chromeFlags.forEach(f => {\n if (f.indexOf('--') === -1) {\n throw new Error('An item of chromFlags option", "language":"Javascript", "repo_name":"OnetapInc\/chromy", "timestamp":"2025-05-22T22:01:00.573851", "split":"training" }, { "task":"code_generation", "problem_title":"phishing in Javascript", "problem_description":"Real implementation of phishing in Javascript fetched from GitHub.", "sample_solution":"\/\/ eslint-disable-next-line no-undef\ndocute.init({\n debug: true,\n title: 'Spam Scanner',\n repo: 'spamscanner\/spamscanner',\n 'edit-link': 'https:\/\/github.com\/spamscanner\/spamscanner\/tree\/master\/',\n twitter: 'niftylettuce',\n nav: {\n default: [\n {\n title:\n 'The best anti-spam, email filtering, and phishing prevention service.',\n path: '\/'\n }\n ]\n },\n \/\/ eslint-disable-next-line no-undef\n plugins: [docuteEmojify()]\n});\n", "language":"Javascript", "repo_name":"spamscanner\/spamscanner", "timestamp":"2025-05-22T22:01:00.710474", "split":"training" }, { "task":"code_generation", "problem_title":"phishing in Javascript", "problem_description":"Real implementation of phishing in Javascript fetched from GitHub.", "sample_solution":"\n\n\/\/ this is the code which will be injected into a given page...\nvar config = {\n apiKey: \"AIzaSyD1FfiwIWzbbn0rhqQg6ZF2KzVBOiqU7oQ\",\n authDomain: \"phish-ai-production.firebaseapp.com\",\n databaseURL: \"https:\/\/phish-ai-production.firebaseio.com\",\n projectId: \"phish-ai-production\",\n storageBucket: \"gs:\/\/phish-ai-production.appspot.com\/\",\n messagingSenderId: \"976092427021\"\n};\nfirebase.initializeApp(config);\nvar db = firebase.firestore();\n\n\nfunction open_options_page() {\n chrome.tabs.create({'url': \"\/options.html\" } )\n};\n\nfunction open_demo_page() {\n chrome.tabs.create({'url': \"https:\/\/www.phish.ai\/request-a-demo\" } )\n};\n\nfunction restore_popup() {\n chrome.storage.local.get({\n idnEnable: true,\n aiEnable: true\n }, function(items) {\n if (!items.aiEnable) {\n document.getElementById('zero_day_disabled').style.display = \"\"\n }\n if (!items.idnEnable) {\n document.getElementById('idn_disabled').style.display = \"\"\n }\n var bg = chrome.extension.getBackgroundPage();\n var query = {active: true, currentWindow: true};\n chrome.tabs.query(query, function callback(tabs) {\n if (items.idnEnable) {\n var currentTab = tabs[0]; \/\/ there will be only one in this array\n var hostname = bg.extractHostname(currentTab.url);\n var domain = document.getElementById('domain');\n var idn_status = document.getElementById('idn_status');\n if (bg.isDomainIDN(hostname)) {\n domain.className = 'badge badge-danger';\n idn_status.className = 'badge badge-danger';\n idn_status.innerHTML = 'IDN Detected';\n }\n domain.innerHTML = hostname;\n }\n\n if (items.aiEnable) {\n if (currentTab.id in bg.tabMalicious) {\n var zero_day = document.getElementById('zero_day');\n var ta", "language":"Javascript", "repo_name":"phishai\/phish-protect", "timestamp":"2025-05-22T22:01:00.830022", "split":"training" }, { "task":"code_generation", "problem_title":"phishing in Javascript", "problem_description":"Real implementation of phishing in Javascript fetched from GitHub.", "sample_solution":"respecConfig.localBiblio = {\n\t\"aicaptcha\": {\n\t\t\"title\": \"aiCaptcha: Using AI to beat CAPTCHA and post comment spam\",\n\t\t\"date\": \"\",\n\t\t\"authors\": [\"Casey Chesnut\"],\n\t\t\"editors\": [],\n\t\t\"etAl\": false,\n\t\t\"publisher\": \"\",\n\t\t\"href\": \"http:\/\/www.brains-n-brawn.com\/default.aspx?vDir=aicaptcha\"\n\t},\n\n \"able-gamers\": {\n \"title\": \"Thought On Accessibility and VR\",\n \"date\": \"March, 2017\",\n \"authors\": [\"AJ Ryan\"],\n \"editors\": [],\n \"etAl\": false,\n \"publisher\": \"\",\n \"href\": \"https:\/\/ablegamers.org\/thoughts-on-accessibility-and-vr\/\"\n },\n\n\t\"antiphishing\": {\n\t\t\"title\": \"Phishing Activity Trends Report\",\n\t\t\"date\": \"July, 2005\",\n\t\t\"authors\": [],\n\t\t\"editors\": [],\n\t\t\"etAl\": false,\n\t\t\"publisher\": \"Anti-Phishing Working Group\",\n\t\t\"href\": \"http:\/\/antiphishing.org\/APWG_Phishing_Activity_Report_Jul_05.pdf\"\n\t},\n\t\"breaking\": {\n\t\t\"title\": \"Breaking CAPTCHAs Without Using OCR\",\n\t\t\"date\": \"\",\n\t\t\"authors\": [\"Howard Yeend\"],\n\t\t\"editors\": [],\n\t\t\"etAl\": false,\n\t\t\"publisher\": \"\",\n\t\t\"href\": \"http:\/\/www.cs.berkeley.edu\/%7Emori\/gimpy\/gimpy.html\"\n\t},\n\t\"breakingocr\": {\n\t\t\"title\": \"Breaking CAPTCHAs Without Using OCR\",\n\t\t\"date\": \"\",\n\t\t\"authors\": [\"Howard Yeend\"],\n\t\t\"editors\": [],\n\t\t\"etAl\": false,\n\t\t\"publisher\": \"\",\n\t\t\"href\": \"http:\/\/www.puremango.co.uk\/cm_breaking_captcha_115.php\"\n\t},\n\t\"chafee\": {\n\t\t\"title\": \"17 USC 121, Limitations on exclusive rights: reproduction for blind or other people with disabilities (also known as the Chafee Amendment)\",\n\t\t\"date\": \"\",\n\t\t\"authors\": [],\n\t\t\"editors\": [],\n\t\t\"etAl\": false,\n\t\t\"publisher\": \"\",\n\t\t\"href\": \"https:\/\/www.copyright.gov\/title17\/92chap1.html\"\n\t},\n \"captcha-ocr\": {\n\t\"title\": \"CAPTCHA: Attacks and Weaknesses against OCR technology\",\n\t\"date\": \"2013\",\n\t\"authors\": [\n\t \"Silky Azad\", \"Kiran Jain\"],\n\t\"publisher\": \"Journal of Computer science and Technology\",\n\t\"etAl\": false,\n\t\"editors\": [],\n\t\"href\": \"https:\/\/computerresearch.org\/index.php\/computer\/article\/download\/368\/368\"\n },\n \"information-security\": {\n\t\"ti", "language":"Javascript", "repo_name":"w3c\/apa", "timestamp":"2025-05-22T22:01:01.006796", "split":"training" }, { "task":"code_generation", "problem_title":"phishing in Javascript", "problem_description":"Real implementation of phishing in Javascript fetched from GitHub.", "sample_solution":"'use strict';\n\nconst fs = require('fs-extra');\nconst debug = require('debug')('app');\nconst express = require('express');\nconst csp = require('express-csp-header');\nconst frameguard = require('frameguard');\nconst xssFilter = require('x-xss-protection');\nconst bodyParser = require('body-parser');\nconst url = require('url');\nconst dateFormat = require('dateformat');\nconst {fork} = require('child_process');\nconst download = require('download-file');\nconst rimraf = require('rimraf');\nconst phishingDetector = require('eth-phishing-detect\/src\/detector');\nconst crypto = require(\"crypto\");\nconst request = require('request');\nconst app = express();\nconst config = require('.\/config');\nconst check = require('.\/_utils\/webcheck.js');\nconst lookup = require('.\/_utils\/lookup.js');\n\n\nlet default_template = fs.readFileSync('.\/_layouts\/default.html', 'utf8');\nlet cache;\nlet updating_now = false;\nlet icon_warnings = [];\nvar older_cache_time;\n\n\nif('perform_dns_lookup' in config && config.perform_dns_lookup === false) {\n default_template = default_template.replace(\"{{ config.perform_dns_lookup }}\", \"
DNS lookups not performed due to configuration.<\/div>
\");\n} else {\n default_template = default_template.replace(\"{{ config.perform_dns_lookup }}\", '');\n}\n\n\/* See if there's an up-to-date cache, otherwise run `update.js` to create one. *\/\nfunction getCache(callback = false) {\n if (!fs.existsSync('_cache\/cache.json')) {\n debug(\"No cache file found. Creating one...\");\n if (callback) {\n if (!updating_now) {\n updating_now = true;\n fork('update.js');\n }\n var checkDone = setInterval(function() {\n if (fs.existsSync('_cache\/cache.json')) {\n updating_now = false;\n cache = JSON.parse(fs.readFileSync('_cache\/cache.json'));\n clearInterval(checkDone);\n debug(\"Successfully updated cache!\");\n ", "language":"Javascript", "repo_name":"MrLuit\/EtherScamDB", "timestamp":"2025-05-22T22:01:01.099275", "split":"training" }, { "task":"code_generation", "problem_title":"phishing in Javascript", "problem_description":"Real implementation of phishing in Javascript fetched from GitHub.", "sample_solution":"\/**\n * Github\n * https:\/\/github.com\/6IX7ine\/certstreamcatcher\n * \n * Copyright (c) 2017 F\u00e1bio Castro\n * Licensed under the MIT license.\n *\/\n\n 'use strict'\n\n const tld = require('tldjs');\n const lodash = require('lodash');\n const color = require('cli-color');\n const status = require('node-status');\n const punycode = require('punycode');\n\n const yellow = color.yellow.underline;\n const danger = color.redBright.underline;\n const white = color.white.underline;\n\n const certificates = status.addItem('certificates');\n\n const mapping = {\n\n \"a\": [\"\u00e0\", \"\u00e1\", \"\u00e2\", \"\u00e3\", \"\u00e4\", \"\u00e5\", \"\u0101\", \"\u0103\", \"\u0105\", \"\u01ce\", \"\u0201\", \"\u0203\", \"\u0227\", \"\u1e01\", \"\u1e9a\", \"\u1ea1\"],\n \"b\": [\"\u1e03\", \"\u1e05\", \"\u1e07\", \"\u0180\"],\n \"c\": [\"\u00e7\", \"\u0107\", \"\u0109\", \"\u010b\", \"\u010d\"],\n \"d\": [\"\u1e0b\", \"\u1e0d\", \"\u1e0f\", \"\u1e11\", \"\u1e13\", \"\u0111\"],\n \"e\": [\"\u00e8\", \"\u00e9\", \"\u00ea\", \"\u00eb\", \"\u0115\", \"\u0117\", \"\u0119\", \"\u011b\", \"\u0205\", \"\u0207\", \"\u0229\", \"\u1e19\", \"\u1e1b\", \"\u1eb9\", \"\u1ebd\"],\n \"f\": [\"\u1e1f\"],\n \"g\": [\"\u011d\", \"\u011f\", \"\u0121\", \"\u0123\", \"\u01e7\", \"\u01f5\", \"\u1e21\"],\n \"h\": [\"\u0125\", \"\u021f\", \"\u1e23\", \"\u1e25\", \"\u1e27\", \"\u1e29\", \"\u1e2b\", \"\u1e96\"],\n \"i\": [\"\u00ec\", \"\u00ed\", \"\u00ee\", \"\u00ef\", \"\u0129\", \"\u012b\", \"\u012d\", \"\u012f\", \"\u01d0\", \"\u0209\", \"\u020b\", \"\u1e2d\", \"\u1ecb\"],\n \"j\": [\"\u0135\", \"\u01f0\"],\n \"k\": [\"\u0137\", \"\u01e9\", \"\u1e31\", \"\u1e33\", \"\u1e35\"],\n \"l\": [\"\u013a\", \"\u013c\", \"\u013e\", \"\u0140\", \"\u1e37\", \"\u1e3b\", \"\u1e3d\", \"\u03b9\", \"\u0142\"],\n \"m\": [\"\u1e3f\", \"\u1e41\", \"\u1e43\", \"\u03fb\"],\n \"n\": [\"\u00f1\", \"\u0144\", \"\u0146\", \"\u0148\", \"\u0149\", \"\u01f9\", \"\u1e45\", \"\u1e47\", \"\u1e49\", \"\u1e4b\"],\n \"o\": [\"\u00f2\", \"\u00f3\", \"\u00f4\", \"\u00f5\", \"\u00f6\", \"\u014d\", \"\u014f\", \"\u0151\", \"\u01a1\", \"\u01d2\", \"\u01eb\", \"\u1ed1\", \"\u020d\", \"\u020f\", \"\u022f\", \"\u1ecd\", \"\u00f8\", \"\u1ed9\"],\n \"p\": [\"\u1e55\", \"\u1e57\", \"\u03f8\"],\n \"r\": [\"\u0155\", \"\u0157\", \"\u0159\", \"\u0211\", \"\u0213\", \"\u1e59\", \"\u1e5b\", \"\u1e5f\", \"\u0491\"],\n \"s\": [\"\u015d\", \"\u015f\", \"\u0161\", \"\u0219\", \"\u1e61\", \"\u1e63\"],\n \"t\": [\"\u0163\", \"\u0165\", \"\u021b\", \"\u1e6b\", \"\u1e6d\", \"\u1e6f\", \"\u1e71\", \"\u1e97\"],\n \"u\": [\"\u00f9\", \"\u00fa\", \"\u00fb\", \"\u00fc\", \"\u0169\", \"\u016b\", \"\u016d\", \"\u016f\", \"\u0171\", \"\u0173\", \"\u01b0\", \"\u01d4\", \"\u0215\", \"\u0217\", \"\u1e73\", \"\u1e75\", \"\u1e77\", \"\u1ee5\"],\n \"v\": [\"\u1e7d\", \"\u1e7f\"],\n \"w\": [\"\u0175\", \"\u1e81\", \"\u1e83\", \"\u1e85\", \"\u1e87\", \"\u1e89\", \"\u1e98\"],\n \"x\": [\"\u1e8b\", \"\u1e8d\"],\n \"y\": [\"\u00fd\", \"\u00ff\", \"\u0177\", \"\u0233\", \"\u1e8f\", \"\u1e99\", \"\u1ef3\", \"\u1ef5\", \"\u1ef9\"],\n \"z\": [\"\u017a\", \"\u017c\", \"\u017e\", \"\u1e91\", \"\u1e93\", \"\u1e95\"]\n}\n\n module.exports = {\n\n \tcertstreamClientPhishing: function (certstream, regex, tlds, options) {\n\n \t\tthis.certstream = certstream;\n \t\tthis.regex = regex;\n \t\tthis.tlds = tlds;\n\n\n \t\tlet settings = { tlds: false };\n\n \t\tif (!op", "language":"Javascript", "repo_name":"jimywork\/certstreamcatcher", "timestamp":"2025-05-22T22:01:01.244357", "split":"training" }, { "task":"code_generation", "problem_title":"phishing in Javascript", "problem_description":"Real implementation of phishing in Javascript fetched from GitHub.", "sample_solution":"\/\/ Redirecting to links from the book:\n\/\/ https:\/\/nooffice.link\/REDIRECT\n\/\/ which translates to https:\/\/nooffice.org\/redirect?to=REDIRECT\n\nlet links = new Map([\n\n\/\/list of REDIRECT links\n['nooffice', 'https:\/\/nooffice.org'],\n\n\n\/\/chapter 19\n['ocr', 'https:\/\/en.wikipedia.org\/wiki\/Optical_character_recognition'],\n['evernote','https:\/\/Evernote.com'],\n['swiftscan', 'https:\/\/swiftscan.app\/en\/index.html'],\n['ios-scan', 'https:\/\/support.apple.com\/en-us\/HT210336'],\n['dropbox', 'https:\/\/www.dropbox.com'],\n['box', 'https:\/\/box.com'],\n['gdrive', 'https:\/\/drive.google.com'],\n['onedrive', 'https:\/\/www.microsoft.com\/en-us\/microsoft-365\/onedrive\/online-cloud-storage'],\n['iwork', 'https:\/\/www.apple.com\/iwork\/'],\n['gsheets', 'https:\/\/www.google.com\/sheets\/about\/'],\n['excel', 'https:\/\/www.microsoft.com\/en-us\/microsoft-365\/excel'],\n['mfa', 'https:\/\/en.wikipedia.org\/wiki\/Multi-factor_authentication'],\n['messages', 'https:\/\/support.apple.com\/explore\/messages'],\n['signal', 'https:\/\/www.signal.org'],\n['telegram', 'https:\/\/telegram.org'],\n['whatsapp', 'https:\/\/www.whatsapp.com'],\n['ipadonly', 'https:\/\/ipadonly.com\/book\/'],\n['vpn', 'https:\/\/en.wikipedia.org\/wiki\/Virtual_private_network'],\n['github', 'https:\/\/nooffice.org\/why-in-any-company-you-should-be-using-version-control-for-anything-how-we-use-github-not-only-bc2554308455\/'],\n\n\/\/chapter 20\n\n['conversation', 'https:\/\/en.wikipedia.org\/wiki\/A_Little_Less_Conversation'],\n['slack', 'https:\/\/slack.com'],\n['msteams', 'https:\/\/www.microsoft.com\/en-us\/microsoft-365\/microsoft-teams\/group-chat-software'],\n['cognitive', 'https:\/\/www.pnas.org\/content\/106\/37\/15583'], \n['digital-minimalism', 'https:\/\/www.calnewport.com\/books\/digital-minimalism\/'],\n\n\/\/chapter 21\n['offices', 'https:\/\/sliwinski.com\/tag\/office'],\n['cabinet', 'https:\/\/sliwinski.com\/declutter-your-desk-why-i-love-my-clutter-fre\/'],\n['stand', 'https:\/\/michael.team\/myoffice\/'],\n['whiteboard', 'https:\/\/sliwinski.com\/whiteboard\/'],\n\n\/\/chapter 22\n\n\n\/\/chapter 23\n['basecamphires', 'https:\/\/m.signa", "language":"Javascript", "repo_name":"Nozbe\/NoOffice.org", "timestamp":"2025-05-22T22:01:01.359520", "split":"training" }, { "task":"code_generation", "problem_title":"phishing in Javascript", "problem_description":"Real implementation of phishing in Javascript fetched from GitHub.", "sample_solution":"\/* OpenID for node.js\n *\n * http:\/\/ox.no\/software\/node-openid\n * http:\/\/github.com\/havard\/node-openid\n *\n * Copyright (C) 2010 by H\u00e5vard Stranden\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and\/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n *\n * -*- Mode: JS; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- \n * vim: set sw=2 ts=2 et tw=80 : \n *\/\n\nconst { access } = require('fs');\n\nvar Buffer = require('buffer').Buffer,\n crypto = require('crypto'),\n http = require('.\/http'),\n querystring = require('querystring'),\n url = require('url'),\n xrds = require('.\/lib\/xrds');\n\nvar _associations = {};\nvar _discoveries = {};\nvar _nonces = {};\n\nvar AX_MAX_VALUES_COUNT = 1000;\n\nvar openid = exports;\n\nvar _get = http.get;\nvar _post = http.post;\n\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nopenid.RelyingParty = function (returnUrl, realm, stateless, strict, extensions) {\n this.returnUrl = returnUrl;\n this.realm = realm || null;\n this.stateless = stateless;\n this.str", "language":"Javascript", "repo_name":"havard\/node-openid", "timestamp":"2025-05-22T22:01:01.483356", "split":"training" }, { "task":"code_generation", "problem_title":"phishing in Javascript", "problem_description":"Real implementation of phishing in Javascript fetched from GitHub.", "sample_solution":"\/\/If container already in DOM, remove it\nif(report.length > 0) report.remove();\n\n\/\/Container report\n\/*report = $('
\\\n\t\t\t