HackBrowserData icon indicating copy to clipboard operation
HackBrowserData copied to clipboard

New version of Chrome cannot obtain password without administrator privileges

Open Lcys opened this issue 8 months ago • 0 comments

image

The new version of Chrome fails to traverse the directory due to changes in directory permissions, resulting in subsequent Chrome-related actions not being executed

The file path where the bug exists: browser/chromium/chromium.go

func chromiumWalkFunc(items []types.DataType, multiItemPaths map[string]map[types.DataType]string) filepath.WalkFunc {
	return func(path string, info fs.FileInfo, err error) error {
		for _, v := range items {
			if info.Name() != v.Filename() {
				continue
			}
			if strings.Contains(path, "System Profile") {
				continue
			}
			profileFolder := fileutil.ParentBaseDir(path)
			if strings.Contains(filepath.ToSlash(path), "/Network/Cookies") {
				profileFolder = fileutil.BaseDir(strings.ReplaceAll(filepath.ToSlash(path), "/Network/Cookies", ""))
			}
			if _, exist := multiItemPaths[profileFolder]; exist {
				multiItemPaths[profileFolder][v] = path
			} else {
				multiItemPaths[profileFolder] = map[types.DataType]string{v: path}
			}
		}
		return err
	}
}

The solution is to change the return value to nil image

image

Lcys avatar Jun 12 '24 11:06 Lcys