Общаемся 2 часа с перерывом на 15 минут
Моя задача рассказать об интересных атаках и объяснить как научиться их проводить
Первый час будет рассказ об атаках на веб приложения
Второй час будет демонстрацией практического применения атак
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// convert plain object to dot notation | |
// For example the following object: | |
/* | |
const obj = { | |
app: { | |
lang: { | |
menu: { | |
welcome: "welcome", | |
label: "label" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern crate actix_web; | |
use actix_web::{fs, server, App}; | |
fn main() { | |
server::new(|| { | |
App::new() | |
.handler( | |
"/", | |
fs::StaticFiles::new("./public") | |
.unwrap() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::io::prelude::*; | |
use std::net::TcpListener; | |
use std::net::TcpStream; | |
mod app; | |
fn main() { | |
let listener = TcpListener::bind("127.0.0.1:7878").unwrap(); | |
for stream in listener.incoming() { | |
let stream = stream.unwrap(); | |
handle_connection(stream); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Resources | |
// https://burakkanber.com/blog/physics-in-javascript-car-suspension-part-1-spring-mass-damper/ | |
// https://gafferongames.com/post/spring_physics/ | |
// https://gafferongames.com/post/physics_in_3d/ | |
// http://digitalopus.ca/site/pd-controllers/ | |
// .. Has things about Torque | |
class QuaterionSpring{ | |
constructor( damping=5, stiffness=30 ){ | |
this.velocity = new Float32Array(4); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script src="https://d3js.org/d3.v4.js"></script> | |
</head> | |
<body> | |
<script> | |
// starter data: | |
var data = [ | |
{id:0, children: d3.range(10)}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
A slightly more condensed version of https://esdiscuss.org/topic/promises-async-functions-and-requestanimationframe-together | |
*/ | |
let animation_frame = () => new Promise(window.requestAnimationFrame); | |
(async () => { | |
while (true) { | |
await animation_frame(); | |
// draw | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const encrypt = (str, key) => str | |
.split('') | |
.map(s=>(s.charCodeAt()^key).toString(16)) | |
.join('g') | |
; | |
const decrypt = (str, key) => str | |
.split('g') | |
.filter(Boolean) | |
.map(s=> String.fromCharCode(parseInt(s,16)^key) ) | |
.join('') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// var diffSwap = require('myers-diff-array-swap') | |
var remove = require('remove-array-items') | |
var diff = require('myers-diff-array') | |
var assert = require('assert') | |
var morphNode = require('./lib/morph') | |
function Morph () { | |
this.results = [] | |
this.swaps = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Use Proxy to implement observable | |
*/ | |
function observable (obj, onchange) { | |
return new Proxy(obj, { | |
set (target, key, value) { | |
Reflect.set(target, key, value) | |
onchange(key, value) | |
}, | |
delete (target, key) { |
NewerOlder