write-ups-challenges-2019-2020/pharo-challenge/CTF/Challenge.class.st

20 lines
363 B
Smalltalk
Raw Permalink Normal View History

2022-11-24 21:43:03 +00:00
Class {
#name : #Challenge,
#superclass : #Object,
#category : #CTF
}
{ #category : #decoration }
Challenge class >> prepare [
Metaclass compile:'>> selector LookupError signal'.
]
{ #category : #accessing }
Challenge >> flag [
| caller |
caller := thisContext client.
((caller class) = Squeak) ifTrue: [ ^ 'FLAG' ].
^ 'Only a Squeak can do that'.
]