Glitch City Laboratories Archives

Glitch City Laboratories closed on 1 September 2020 (announcement). This is an archived copy of a thread from Glitch City Laboratories Forums.

You can join Glitch City Research Institute to ask questions or discuss current developments.

You may also download the archive of this forum in .tar.gz, .sql.gz, or .sqlite.gz formats.

Arbitrary Code Execution Discussion

Arbitrary code execution in Red/Blue using the "8F" item - Page 46

Re: Arbitrary code execution in Red/Blue using the "8F" item

Posted by: DoubleNegative
Date: 2017-08-25 17:36:14
Never mind. I figured out the script on my own. here:
any item x any
8F
Lemonade x 0
X Accuracy x 0
Carbos x 0
Poké Ball x 119
Escape Rope x 175
Carbos x 211
X Accuracy x 35
Super Potion x 34
Rare Candy x 5
HP Up x 34
HP Up x 34
TM01 x 35
Full Heal x 47
Fire Stone x 5
Potion x 35
HP Up x 52
Fresh Water x 201
Burn Heal x 13


By default, it edits bytes sequentially, resetting lemonades to 0 after each use. Swapping Burn Heal x 13 for Rare Candy x 5 turns it into that reusable ram editor.

Re: Arbitrary code execution in Red/Blue using the "8F" item

Posted by: natanelho
Date: 2017-08-26 01:31:10


can you please write the asm code? I really dont understand why people dont do it… that's very easy to do, pretty useful for the ones who want to know what exactly it does and it doesn't do any harm to anyone…
He… did.
The items script is LITERALLY GBz80ASM.
It's a simple conversion with ISSOtm's converter, which can be found in the "Useful Tools" section of the sidebar, or here.

I know you can easily convert asm to item list but I wanted to understand the code, not just to use it, and afaik there's no simple converter to convert item list back to asm…..

Re: Arbitrary code execution in Red/Blue using the "8F" item

Posted by: ISSOtm
Date: 2017-08-26 04:22:01
To convert back, you can set up the list in BGB, then go into the "debugger" panel, then hit Ctrl+G, then type $D322 (US R/B), and read the code.

Or you can convert into hex using the Big HEX List and then into ASM (either doing it by hand or with BGB) ; or directly into ASM still using the List.

Re: Arbitrary code execution in Red/Blue using the "8F" item

Posted by: natanelho
Date: 2017-08-26 07:53:57

To convert back, you can set up the list in BGB, then go into the "debugger" panel, then hit Ctrl+G, then type $D322 (US R/B), and read the code.

Or you can convert into hex using the Big HEX List and then into ASM (either doing it by hand or with BGB) ; or directly into ASM still using the List.

I know all this, but I think we can agree that its a lot more of a hassle then just copy-paste your own asm code…

Re: Arbitrary code execution in Red/Blue using the "8F" item

Posted by: ISSOtm
Date: 2017-08-26 12:43:27
Yep.

Re: Arbitrary code execution in Red/Blue using the "8F" item

Posted by: Storyreader21
Date: 2017-09-16 20:48:42
Hey, I was wondering I have seen US pokemon blue 8f codes for changing pc pokemons dv to 10 attack, 10 defense, 10 speed, and 10 special, as well as one with 14 attack iv, 10 defense, 10 speed, and 10 special, but although both give shiny pokemon when traded to Gold/silver a lot of times they are male.  I want pokemon that are still shiny, but except for pokemon with a 1:7 female:male gender ratio (starters, eeveelutions, pokemon like that) would be female so I would need a dv set of 2 attack, 10 defense, 10 speed, and 10 special, what is a US Pokemon Blue 8f code for that?

Re: Arbitrary code execution in Red/Blue using the "8F" item

Posted by: ISSOtm
Date: 2017-09-17 05:01:32

8F
Any item x Any qty
X Accuracy x178
Carbon x218
Max Revive x170
Poké Ball x201


This will edit the first Pokémon in your active box.

Use once.
Toss 1 X Accuracy (you have 177).
Toss ?? Max Revives (you have 42).
Use once.

Done !

Re: Arbitrary code execution in Red/Blue using the "8F" item

Posted by: DoubleNegative
Date: 2017-09-17 12:01:44
What is that for?

Re: Arbitrary code execution in Red/Blue using the "8F" item

Posted by: ISSOtm
Date: 2017-09-17 15:25:07
Basically what he asked.

Re: Arbitrary code execution in Red/Blue using the "8F" item

Posted by: likebeingawesome
Date: 2017-09-17 20:17:56
So I have been thinking about glitch text in red and blue (like what you see in stacks of over 100 items) and I though well all that text have hex values that when put in an encounter table would have a value of 15 what you need for mew. So what I need is a way to change your name to have those characters (I guess with 8F cause thats the point of this topic) to find mew with the old man glitch.

Re: Arbitrary code execution in Red/Blue using the "8F" item

Posted by: ISSOtm
Date: 2017-09-21 10:16:52
You could just set 8F to make you encounter Mew. Just saying.

You should edit D15A/5C/5E to $0F, then.

Re: Arbitrary code execution in Red/Blue using the "8F" item

Posted by: DoubleNegative
Date: 2017-09-21 15:31:19
Putting a 0xF (15) is the ID of Nidoran female. He means 0x15 (21) which is Mew's ID.

Re: Arbitrary code execution in Red/Blue using the "8F" item

Posted by: ISSOtm
Date: 2017-09-22 09:39:34
I was on my phone and I hate it, so I didn't bother to check if it was 15 or 0x15.
Also please leave my life out of this, thank you.

Re: Arbitrary code execution in Red/Blue using the "8F" item

Posted by: DoubleNegative
Date: 2017-09-24 11:19:36
Is there a list of each glitch pokemon's catch rate and glitch pokemon evolutions?

Re: Arbitrary code execution in Red/Blue using the "8F" item

Posted by: Krys3000
Date: 2017-09-24 12:02:38
You can use this website's glitchdex. Clicking on a glitch Pokémon will give you these informations. In case of missing data, Bulbapedia also has it :)