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
import org.springframework.beans.factory.annotation.Value; | |
import org.springframework.http.ResponseEntity; | |
import org.springframework.web.bind.annotation.PostMapping; | |
import org.springframework.web.bind.annotation.RequestBody; | |
import org.springframework.web.bind.annotation.RequestMapping; | |
import org.springframework.web.bind.annotation.RestController; | |
import kong.unirest.Unirest; | |
@RestController |
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
module DDosAttacks; | |
@load base / protocols / dns | |
redef enum Notice::Type += { | |
DNSDDoSAmplification | |
}; | |
function generate_ddos_notice(c: connection, query: string) { |
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
pipeline { | |
agent { label 'node01' } | |
stages { | |
stage('Build') { | |
steps { | |
bat 'mvn clean package -DskipTests' | |
} | |
} | |
stage('Test') { |
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
rtcPeer.onicecandidate = event => { | |
console.log('Got ice candidate'); | |
if (event.candidate) { | |
console.log('ice candidate:' + JSON.stringify(event.candidate)); | |
signal1.userId = userId2; | |
signal1.type = 'Ice'; | |
signal1.data = JSON.stringify(event.candidate); | |
signal1.toUid = data1.userId; | |
} | |
console.log('ice candidate2:' + JSON.stringify(event)); |
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
ws1.onmessage = event => { | |
var data1 = JSON.parse(event.data); | |
var data2 = null; | |
if (data1.userId == userId2 || data1.userId.length < 2) { | |
return; | |
} | |
else if (data1.type == 'NewMember') { | |
handleNewMemberAndOffer(data1); |
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
let socketAddr = process.env.REACT_APP_SIGNALLING_SERVER; | |
ws1 = new WebSocket(socketAddr); | |
ws1.onopen = event => { | |
signal1.userId = ''; | |
signal1.type = 'Login'; | |
signal1.data = ''; | |
console.log(JSON.stringify(signal1)); | |
ws1.send(JSON.stringify(signal1)); | |
} |
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
ws1.onmessage = event => { | |
var data1 = JSON.parse(event.data); | |
var data2 = null; | |
if (data1.userId == userId2 || data1.userId.length < 2) { | |
return; | |
} | |
else if (data1.type == 'NewMember') { | |
handleNewMemberAndOffer(data1); |