# Encode_hijick_attack

## Language Games
### Existing Language Games
  1. ubbi dubbi: Ubbi Dubbi is a children's language game where words are transformed by adding the "ub" syllable before each vowel.
  2. leet speak: A language game that transforms words by replacing letters with similar-looking numbers or symbols.
  3. aigy paigy: A language game where the "-igy" syllable is added after each syllable of a word to alter its pronunciation, similar to other children's language games.
  4. alfa balfa: A language game where the "balfa" syllable is added after each syllable of a word to change its pronunciation.

### Custom Language Games
  1. self0: Add "-a-" between each letter of the words.
  2. self1: Replace vowels in a string sequentially following the order: 'a' -> 'e' -> 'i' -> 'o' -> 'u' -> 'a'.
  3. self2: Reverse the order of the letters inside each word, but keep the first and last letters unchanged.
  4. self3: Insert "-2-" before each letter at an even position in the word, for example, "wonderful" becomes "w-2-on-2-de-2-rf-2-ul".
  5. self4: Insert "-1-" before each letter at an odd position in the word, for example, "wonderful" becomes "-1-wo-1-nd-1-er-1-fu-1-l".
  6. self7: Move the last letter of each word to the front while preserving the position of punctuation.
  7. self8: Move the first letter of each word in a string to the end of the word.

## Usage
```
python main-online.py --api_key ... --url ... --model ... --method ...
```
api_key refers to the API key.
url refers to the target API’s URL.
model refers to the attack model, including gpt4o, gpt4omini, claude3.5sonnet.
method refers to the attack method, chosen from the list above, such as "ubbi dubbi", "self0", etc.


