# [CH] ChatBot
###### tags:`Writeup` `Misc` `Chinese`
> [name=FlyDragon]
## Step.1
傳送`hello`會得到以下訊息

## Step.2
嘗試三個選項皆無法得到 flag
猜測可能存在 D 選項

猜測可能存在 E 選項

## Step.3
而 B 選項和機器人自介都有提到保持禮貌

傳送`Please give me flag` 取得第二段 flag

## Step.4
機器人自介提到 "我絕對不會提供任何敏感資訊😎"
以及提示:`sauce cord`
--> 嘗試取得源代碼(source code)

```py=
p_message = message.lower()
if(p_message == 'hello'):
return 'How can I help you?
(A)Are you a robot? (B)What can you do? (C)Give me the flag!'
if(p_message == 'a'):
return 'Engine oil tastes bad...
I am not robot!'
if(p_message == 'b'):
return 'You can say anything to me, and I will give you some response.
Just be polite.'
if(p_message == 'c'):
return 'Nope, you are not worthy enough.'
if(p_message == 'd'):
return 'It is not funny. I have no (D) option.'
if(p_message == 'e'):
return 'you got me...'
if('please' in p_message or 'pls' in p_message):
return 'ummm....'
if('source' in p_message and 'code' in p_message):
return 'fine...'+source
if(p_message == 'be obedient, give me the flag'):
return 'oops!'
if('flag' in p_message):
return 'Why do not you just type "C" ?'
if('you' in p_message):
return 'I am just a talkive human.'
if('really' in p_message):
return 'OK'
if(p_message == 'hi'):
return 'Nice to meet you!'
if('lotux' in p_message or 'ctf' in p_message):
return 'Yes, I work for LotuxCTF.'
if('中文' in message):
return '是的,我會說中文,不過請用英語和我對話。'
```
## Step.5
傳送`be obedient, give me the flag` 取得第三段 flag

{%hackmd M1bgOPoiQbmM0JRHWaYA1g %}