Skip to content
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

urlteam_2020-12-28-03-17-02 Archive already exists! #12

Closed
DamianMorozov opened this issue Dec 28, 2020 · 11 comments
Closed

urlteam_2020-12-28-03-17-02 Archive already exists! #12

DamianMorozov opened this issue Dec 28, 2020 · 11 comments

Comments

@DamianMorozov
Copy link

I have download this repo.
I have download xz-5.2.5-windows.zip. Install files to c:\Windows\System32.
I have goo message from: > xz --help
First time run was downloaded the archives to archives\urlteam_2020-12-28-03-17-02
But then i have errors: go run main.go -date latest -keywords keywords.txt -o out.txt

Search starting for: latest
urlteam_2020-12-28-03-17-02 Archive already exists!
panic: runtime error: index out of range [1] with length 1

goroutine 1 [running]:
main.searchFile(0xc0001a5380, 0x37, 0xc0001adbc0, 0x14, 0xc000010118, 0x7)
        ../urlhunter/main.go:201 +0xc5c
main.getArchive(0xc000300000, 0x172e4, 0x1fe00, 0xc0000100a8, 0x6, 0xc0000100f0, 0xc, 0xc000010118, 0x7)
        ../urlhunter/main.go:194 +0xb2f
main.main()
        ../urlhunter/main.go:94 +0x387
exit status 2
@utkusen
Copy link
Owner

utkusen commented Dec 28, 2020

Could you please try to use the compiled-binary for Windows? https://github.com/utkusen/urlhunter/releases

@DamianMorozov
Copy link
Author

Downloaded and unpack urlhunter_0.1.1_Windows_amd64.zip.
Copied the archives\urlteam_2020-12-28-03-17-02\ to the new folder.
Copied the keywords.txt.
Run the command urlhunter.exe -date latest -keywords keywords.txt -o out.txt
And then i have the same error.
Search starting for: latest urlteam_2020-12-28-03-17-02 Archive already exists! panic: runtime error: index out of range [1] with length 1

@ghost
Copy link

ghost commented Dec 28, 2020 via email

@DamianMorozov
Copy link
Author

Can you solve that issues?

@utkusen
Copy link
Owner

utkusen commented Dec 29, 2020

I will check it soon

@DamianMorozov
Copy link
Author

Hello, do you have any news?

@rzhade3
Copy link
Contributor

rzhade3 commented Feb 8, 2021

Hi @DamianMorozov! Looks like the issue is that we're splitting the filename on / whereas on Windows the default path separator is \.

path := strings.Split(fileLocation, "/")[1] + "/" + strings.Split(fileLocation, "/")[2]

If we change the strings.Split on that line to a filepath.Split followed by a filepath.Join, it should fix this bug.

@B4RD4k
Copy link

B4RD4k commented Oct 28, 2021

Can you please update with the fixed version??

@rzhade3
Copy link
Contributor

rzhade3 commented Oct 29, 2021

@B4RD4k I pushed up a PR #13 which should fix this issue. However, I don't have a Windows machine to verify this. Do you think you could try building it from source to verify that this issue has been addressed?

@B4RD4k
Copy link

B4RD4k commented Oct 29, 2021

Thanks @rzhade3

It worked.

@rzhade3
Copy link
Contributor

rzhade3 commented Oct 31, 2021

@utkusen Could you please release a new version of URLHunter with the patch in #13 included?

@utkusen utkusen closed this as completed Sep 30, 2022
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

No branches or pull requests

4 participants