Skip to content

Instantly share code, notes, and snippets.

@Asjidkalam
Created November 15, 2020 08:03
Show Gist options
  • Save Asjidkalam/0bf9949d30de767daf6067460b768d1f to your computer and use it in GitHub Desktop.
Save Asjidkalam/0bf9949d30de767daf6067460b768d1f to your computer and use it in GitHub Desktop.
crackme challenge source code - YASCON2020
/*
Created for YASCON2020 - yetanothersec.com/yascon2020/
by @odinshell - 15/11/20
Challenge name: crackme
Category: Reverse engineering
Difficulty: Easy
*/
package main
import (
"fmt"
"os"
"strings"
)
var array []string
func main() {
var input string
fmt.Print("Dead or alive? \n")
fmt.Scan(&input)
array := strings.Split(input, "")
if len(input) < 10 {
fmt.Println("umm.. not that.")
os.Exit(1)
}
banner := `
.--.
( )
_/
, , |
|\_/|_________|
|+ + o
|_^_|-||_____||
U || ||
(_| (_|
Curiosity killed the cat.
`
if string(array[2+1]) == "C" &&
string(array[0]) == "Y" &&
string(array[0+1]) == "A" &&
string(array[7+1]) == "3" &&
string(array[13+1]) == "_" &&
string(array[6+1]) == "W" &&
string(array[17+1]) == "g" &&
string(array[14+1]) == "t" &&
string(array[19+1]) == "_" &&
string(array[21+1]) == "3" &&
string(array[29+1]) == "}" &&
string(array[3+1]) == "O" &&
string(array[9+1]) == "c" &&
string(array[20+1]) == "r" &&
string(array[9+1]) == "c" &&
string(array[1+1]) == "S" &&
string(array[18+1]) == "O" &&
string(array[23+1]) == "3" &&
string(array[4+1]) == "N" &&
string(array[8+1]) == "l" &&
string(array[5+1]) == "{" &&
string(array[14+1]) == "t" &&
string(array[10+1]) == "0" &&
string(array[12+1]) == "e" &&
string(array[15+1]) == "0" &&
string(array[16+1]) == "_" &&
string(array[11+1]) == "m" &&
string(array[22+1]) == "v" &&
string(array[25+1]) == "s" &&
string(array[28+1]) == "G" &&
string(array[26+1]) == "1" &&
string(array[24+1]) == "r" &&
string(array[27+1]) == "n" {
// flag - YASCON{W3lc0me_t0_gO_r3v3rs1nG}
fmt.Println(banner)
os.Exit(0)
} else {
fmt.Println("Ight, imma head out.")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment