Coder Social home page Coder Social logo

Comments (11)

moonD4rk avatar moonD4rk commented on May 29, 2024 2

Maybe its better to handle this case by skipping reading files, not throw errors. @moonD4rk

Yes, it could be the issue. I will release a major update in the coming weeks and this particular ISSUSE will be resolved at the same time.

from hackbrowserdata.

moonD4rk avatar moonD4rk commented on May 29, 2024 2

@sheepdog0x3e Thanks Bro. The temporary solution is to disable ChromiumCookie in DefaultChromium . I will fix this issue as soon as possible.

from hackbrowserdata.

sheepdog0x3e avatar sheepdog0x3e commented on May 29, 2024 1

When the file C:\Users\Prisoner-Test\AppData\Local\Google\Chrome\User Data\Default\Network\Cookies is locked by other process, the following code will throw this error: [ERROR] [main.go:60,func1] open C:\Users\Prisoner-Test\AppData\Local\Google\Chrome\User Data\Default\Network\Cookies: The process cannot access the file because it is being used by another process.

utils/fileutil/fileutil.go line98-108

func CopyFile(src, dst string) error {
	s, err := os.ReadFile(src)   // The programe can't read Cookies because the file is locked by other process
	if err != nil {
		return err
	}
	err = os.WriteFile(dst, s, 0o600)
	if err != nil {
		return err
	}
	return nil
}

Maybe its better to handle this case by skipping reading files, not throw errors.
@moonD4rk

from hackbrowserdata.

moonD4rk avatar moonD4rk commented on May 29, 2024 1

@sheepdog0x3e Yep, it seems that the reason is that the temporary Cookie files were not deleted. On which platform did this ISSUSE occur? Windows or macOS?

from hackbrowserdata.

sheepdog0x3e avatar sheepdog0x3e commented on May 29, 2024 1

The core reason for this issue is the file C:\Users\username\AppData\Local\Google\Chrome\User Data\Default\Network\Cookies is locked by some process and the program doesn't have the priv to open this file.

I tried to copy this file mannually by using windows' copy /b "C:\Users\username\AppData\Local\Google\Chrome\User Data\Default\Network\Cookies" ".\cookie", but I got Process cannot access file because it is being used by another process.

So I comment //case item.ChromiumCookie to skip reading Chrome's cookies and delete the temp file cookie manually.

(I find out that I can comment this line out then the program will not try to parse cookie. And I don't have to delete the temp file either)

var DefaultChromium = []Item{
	ChromiumKey,
	ChromiumPassword,
	// ChromiumCookie,
	ChromiumBookmark,
	ChromiumHistory,
	ChromiumDownload,
	ChromiumCreditCard,
	ChromiumLocalStorage,
	ChromiumSessionStorage,
	ChromiumExtension,
}

Maybe you should check if you have the priv to open target files first, if not, then continue to parse next item .

from hackbrowserdata.

98games avatar 98games commented on May 29, 2024

我也遇到了这个问题

from hackbrowserdata.

saucer-man avatar saucer-man commented on May 29, 2024

+1

from hackbrowserdata.

sheepdog0x3e avatar sheepdog0x3e commented on May 29, 2024

BTW, I wonder why don't you throw errors in place so you can keep the actual line number for debugging? It took me quite a while to adrress this issue.

Finally I came up with a temp work around by commenting out these lines of code:

browingdata/browingdata.go

func (d *Data) addSources(items []item.Item) {
	for _, source := range items {
		switch source {
		case item.ChromiumPassword:
			d.sources[source] = &password.ChromiumPassword{}
		// case item.ChromiumCookie:
		// 	d.sources[source] = &cookie.ChromiumCookie{}
		case item.ChromiumBookmark:
			d.sources[source] = &bookmark.ChromiumBookmark{}
		......
		}
	}
}

PS: It will leave a file called cookie in the working directory. You must delete the file mannually when done.

from hackbrowserdata.

sheepdog0x3e avatar sheepdog0x3e commented on May 29, 2024

@sheepdog0x3e Yep, it seems that the reason is that the temporary Cookie files were not deleted. On which platform did this ISSUSE occur? Windows or macOS?

Windows.

from hackbrowserdata.

98games avatar 98games commented on May 29, 2024

作者大哥,什么时候能解决这个问题

from hackbrowserdata.

moonD4rk avatar moonD4rk commented on May 29, 2024

Discuss the specific solution to this issue in this ISSUSE. 👇

#243

from hackbrowserdata.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.