1 апр. 2022 г.
29 мар. 2022 г.
React.StrictMode calls your render() and reducer() twice
In a strict mode development build of React renders your components twice. It calls your render() method, functional components, all the hooks two times. The reducer() function from the useReducer() hook is also called twice.
Before the second call, React disables all console output methods. In case your code works in non-strict mode but shows strange results in strict mode, you may want to see console output from the second call. In order to do that you can store the original console.log method at the very beginning of your code:
import { useReducer } from "react";
// other imports...
const log = console.log;
function MyComponent() {
const [state, dispatch] = useReducer(reducer, undefined, init);
log("MyComponent", state); // note: log instead of console.log
return <div>markup...</div>;
}
3 февр. 2022 г.
Browser fingerprinting and bot detection
Links from https://incolumitas.com/2021/11/03/so-you-want-to-scrape-like-the-big-boys/
- CreepJS: https://github.com/abrahamjuliot/creepjs
- Browser Red Pills, Dan Boneh: https://www.usenix.org/system/files/conference/woot14/woot14-ho.pdf
- Browser Based Port Scanning, 2021: https://incolumitas.com/2021/01/10/browser-based-port-scanning/
- Google Picasso: https://research.google/pubs/pub45581/
- Font Fingerprinting: https://browserleaks.com/fonts
- TCP/IP Fingerprinting: https://github.com/NikolaiT/zardaxt
- TLS Fingerprinting: https://github.com/salesforce/ja3
- Behavioral Classification, 2021: https://incolumitas.com/2021/04/11/bot-detection-with-behavioral-analysis/
- Gyroscope API querying (device movement/rotation detection), 2021: https://incolumitas.com/2021/02/05/why-does-this-website-know-i-am-sitting-on-the-toilet/
- Fingerprinting without JavaScript using HTTP headers, CSS feature queries and Fonts: https://fingerprintjs.com/blog/disabling-javascript-wont-stop-fingerprinting/
Подписаться на:
Сообщения (Atom)