token-validator: ssh_access is given through receiveChallenge

This commit is contained in:
nemunaire 2023-02-21 04:45:57 +01:00
parent 847e941b0c
commit 268695563c
2 changed files with 4 additions and 3 deletions

View File

@ -351,13 +351,13 @@ func accessibleChallenge(r *http.Request, ps httprouter.Params, _ []byte) (inter
}
}
// receiveChallenge treats TP1{shadow} and TP2, TP3 challenges.
// receiveChallenge treats TP1{shadow,ssh_access} and TP2, TP3 challenges.
func receiveChallenge(r *http.Request, ps httprouter.Params, body []byte) (interface{}, error) {
if chid, err := strconv.Atoi(string(ps.ByName("chid"))); err != nil {
return nil, err
} else if chid < 0 {
return nil, errors.New("This challenge doesn't exist")
} else if chid != 0 && chid <= len(challenges) {
} else if chid != 0 && chid < len(challenges) {
return nil, errors.New("This is not the good way to hit this challenge")
} else {
var gt givenToken

View File

@ -24,7 +24,8 @@ const tuto_progress = [
8: { title: "Bonus disk", icon: "💽", label: "Bonus 2"},
9: { title: "Bonus email", icon: "📧", label: "Bonus 3"},
10: { title: "Wg tunnel", icon: "🚇", label: "Tunnel up"},
11: { title: "Uploaded SSH key", icon: "💊", label: "SSH"},
11: { title: "SSH key", icon: "🔑", label: "Key"},
12: { title: "SSH evade", icon: "💊", label: "SSH"},
},
{
100: { title: "HTTP on IP", icon: "0", label: "HTTP IP"},