Skip to content

Commit

Permalink
Update file.go
Browse files Browse the repository at this point in the history
  • Loading branch information
blacktop committed Feb 1, 2024
1 parent 4d09cd2 commit 06e8fad
Showing 1 changed file with 23 additions and 24 deletions.
47 changes: 23 additions & 24 deletions pkg/dyld/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -1126,35 +1126,34 @@ func (f *File) parseSlideInfo(uuid mtypes.UUID, mapping *CacheMappingWithSlideIn
}
case 5:
log.Warnf("slide info version: %d, was added to macOS 14.4beta1 and I'm still working on REing it (stay tuned 😉)", slideInfoVersion)
for {
slideInfo := CacheSlideInfo5{}
if err := binary.Read(sr, binary.LittleEndian, &slideInfo); err != nil {
return nil, err
}

f.SlideInfo = slideInfo
slideInfo := CacheSlideInfo5{}
if err := binary.Read(sr, binary.LittleEndian, &slideInfo); err != nil {
return nil, err
}

if !parsePages {
return nil, nil
}
f.SlideInfo = slideInfo

output(dump, "slide info version = %d\n", slideInfo.Version)
output(dump, "page_size = %#x\n", slideInfo.PageSize)
output(dump, "page_starts_count = %d\n", slideInfo.PageStartsCount)
output(dump, "auth_value_add = %#x\n", slideInfo.AuthValueAdd)
output(dump, "\n")
if !parsePages {
return nil, nil
}

if slideInfo.Version != 5 {
output(dump, "\n")
break
}
output(dump, "slide info version = %d\n", slideInfo.Version)
output(dump, "page_size = %#x\n", slideInfo.PageSize)
output(dump, "page_starts_count = %d\n", slideInfo.PageStartsCount)
output(dump, "auth_value_add = %#x\n", slideInfo.AuthValueAdd)

starts := make([]uint16, slideInfo.PageStartsCount)
if err := binary.Read(sr, binary.LittleEndian, &starts); err != nil {
return nil, err
}
_ = starts
}
// var targetValue uint64
// var pointer CacheSlidePointer3

// starts := make([]uint16, slideInfo.PageStartsCount)
// if err := binary.Read(sr, binary.LittleEndian, &starts); err != nil {
// return nil, err
// }

// if endPage == 0 || endPage > uint64(len(starts)-1) {
// endPage = uint64(len(starts) - 1) // set end page to MAX
// }
default:
log.Errorf("got unexpected dyld slide info version: %d", slideInfoVersion)
}
Expand Down

0 comments on commit 06e8fad

Please sign in to comment.