Find a way to execute arbitrary javascript
Challenge page is here https://challenge-1121.intigriti.io/challenge/index.php?s=security
Upon loading the page I see the following:
package main | |
import ( | |
"log" | |
"net/http" | |
"time" | |
) | |
func main() { | |
log.SetFlags(log.Lshortfile) |
Find a way to execute arbitrary javascript
Challenge page is here https://challenge-1121.intigriti.io/challenge/index.php?s=security
Upon loading the page I see the following:
import com.codingame.gameengine.runner.MultiplayerGameRunner | |
import com.codingame.gameengine.runner.dto.GameResult | |
import groovy.time.TimeCategory | |
import groovyx.gpars.GParsPool | |
class Simulator { | |
static final champion = "config/champion.exe" | |
static final challenger = "config/challenger.exe" | |
static void main(String[] args) { |
package bench | |
import "testing" | |
func Benchmark_InterfaceMethods(b *testing.B) { | |
s := &Struct{} | |
for n := 0; n < b.N; n++ { | |
s.Method() | |
} |
.exec
and it doesn't throw but returns nullpackage main | |
import ( | |
"fmt" | |
"strings" | |
) | |
type BinaryTree struct { | |
Node int // or whatever | |
Left *BinaryTree |
// Main | |
IElement element = getElement() | |
printer(element) | |
// Classes | |
IElement getElement() { | |
// simulate not knowing the type of element at runtime | |
if (new Random().nextInt() % 2 == 0) { | |
return new Element1(var1: "hello") | |
} else { |
def randomElement | |
// simulate user input, for instance | |
if (new Random().nextInt() % 2 == 0) { | |
randomElement = new Element1() | |
} else { | |
randomElement = new Element2() | |
} | |
printer(randomElement) |
def printer(Element1 element) { | |
println "${element.name} ${element.element1Specific}" | |
} | |
def printer(Element2 element) { | |
println "${element.name} ${element.element2Specific}" | |
} |