{"id":22900955,"url":"https://github.com/johnib/xss-example","last_synced_at":"2025-04-01T05:15:58.822Z","repository":{"id":91957778,"uuid":"67630005","full_name":"johnib/xss-example","owner":"johnib","description":"cross-site scripting example","archived":false,"fork":false,"pushed_at":"2016-09-08T07:48:13.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-07T03:29:21.551Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johnib.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-07T17:44:15.000Z","updated_at":"2016-09-07T17:45:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"e6ef7bfe-0eeb-4b0b-8458-03f6b7f9f19e","html_url":"https://github.com/johnib/xss-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnib%2Fxss-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnib%2Fxss-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnib%2Fxss-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnib%2Fxss-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnib","download_url":"https://codeload.github.com/johnib/xss-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246586035,"owners_count":20801028,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-14T01:30:50.173Z","updated_at":"2025-04-01T05:15:58.803Z","avatar_url":"https://github.com/johnib.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cross-Site Scripting Simple Example\n\n## Abstract\nMany websites allow people to add comments, mostly at the bottom of the page.\nBy taking user-input comes great responsibility for validating the input and \neliminate chances for scripts to be run on other user's browsers.\n\n## Install\n```\nnpm install\n```\n\n## Run\n```\nnode webserver.js\nnode listener.js\n```\n\n## This project\nThis project is a simple example of a website that allows adding and viewing \ncomments.\n\nIt comes with two versions:\n\n1. XSS-proof: `http://localhost:3000/`.\n2. XSS-vulnerable: `http://localhost:3000/xss`\n\nIf you add malicious code as a comment in the vulnerable endpoint - you'll \nnotice that once the page is reloaded - the malicious code actually executes.\n\n## How to demo\nI have added two examples:\n\n1. LocalStorage theft.\n2. Keylogging.\n\nOpen `demo-scripts.html`, each one of the scripts should be tested separately\n(meaning - cleaning the db file and restarting the webserver).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnib%2Fxss-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnib%2Fxss-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnib%2Fxss-example/lists"}