Skip to content

Align description with run description #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 15, 2025
Merged

Conversation

Asfolny
Copy link
Contributor

@Asfolny Asfolny commented Jun 8, 2025

Comparing against ASMLevel30 and level-23/DESCRIPTION.md reveals
(red is the class in run, green is the description)

most_common_byte(src_addr, size):
  i = 0
  while i <= size-1:
    curr_byte = [src_addr + i]
    [stack_base - curr_byte * 2] += 1
    i += 1

-   b = 0
+  b = 1
  max_freq = 0
  max_freq_byte = 0
-  while b <= 0xff:
+  while b <= 0x100
    if [stack_base - b * 2] > max_freq:
      max_freq = [stack_base - b * 2]
      max_freq_byte = b
    b += 1

  return max_freq_byte

Maybe it's worth adding a warning/note and/or renaming "stack_base" to "list_base", because when doing this my dumbass forgot about the fact that rsp contains the return pointer, since the function is called; or maybe I'm just a dumbass that forgot

@zardus
Copy link
Member

zardus commented Jul 15, 2025

@mahaloz, does this look accurate to you?

@mahaloz
Copy link

mahaloz commented Jul 15, 2025

@zardus the changes to the DESCRIPTION file align with the original intention of level 23, so I'd say yes. Private link to the original (you should have access): https://github.com/mahaloz/EmbryoASM/blob/a1308ed2cf310e85cbb13df19158f5a2aa1a213e/embryoasm.py#L1780

@zardus zardus merged commit b743cdd into pwncollege:main Jul 15, 2025
@zardus
Copy link
Member

zardus commented Jul 15, 2025

Sweet, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants