Skip to content

Instantly share code, notes, and snippets.

View stonexer's full-sized avatar
🎯
Focusing

SToneX stonexer

🎯
Focusing
View GitHub Profile
@stonexer
stonexer / List of vectors for checking on XSS
Created December 29, 2023 07:44 — forked from scabbiaza/List of vectors for checking on XSS
ReactJS - prevent XSS vulnerability
// Theory
// http://htmlpurifier.org/live/smoketests/xssAttacks.php
// https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
// A full collection of HTML5 related XSS attack vectors:
// https://github.com/cure53/H5SC https://raw.githubusercontent.com/cure53/H5SC/master/vectors.txt
// Short list
<script>alert("XSS: script tag")</script>
<script src="http://hackers-site.powertofly.com"></script>
@stonexer
stonexer / machine.js
Last active July 3, 2020 09:17
Generated by XState Viz: https://xstate.js.org/viz
Machine({
id: '云客服招募',
initial: 'INIT',
context: {
user: null,
},
states: {
/**
* 初始化(登录)
*/
@stonexer
stonexer / machine.js
Created June 23, 2020 05:30
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
function countReactFibers() {
const rootContainer = document.getElementById('root');
const root = rootContainer._reactRootContainer;
const internalRoot = root._internalRoot;
let fiberCount = 0;
let elementCount = 0;
function travelFibers(fiberNode) {