You are not logged in.
I'm creating the following PKGBUILD
pkgname=netbios-share-scanner
pkgver=1.0
pkgrel=2
pkgdesc='This tool could be used to check windows workstations and servers if they have accessible shared resources.'
arch=('any')
url='https://www.secpoint.com/netbios-share-scanner.html'
license=('BSD')
depends=('python')
source=("https://www.secpoint.com/freetools/$pkgname-$pkgver.zip")
sha512sums=('7ac4c309c348707015b6e0e77bb1fa9595762b9e0b1ea5dd462a8d9810e6eed5dea8131690e236c91ea399a72ae2aa8a267fd848809c97acda04b7d6f6878568')
package() {
cd "nb${pkgver/./}"
install -dm 755 "$pkgdir/usr/bin"
install -dm 755 "$pkgdir/usr/share/$pkgname"
install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.txt
rm README.txt
cp -a * "$pkgdir/usr/share/$pkgname/"
cat > "$pkgdir/usr/bin/$pkgname" << EOF
#!/bin/sh
cd /usr/share/$pkgname
exec python $pkgname.py "\$@"
EOF
chmod +x "$pkgdir/usr/bin/$pkgname"
}
and I note that, during the download of the source, I get the error:
curl: (56) The requested URL returned error: 403
==> ERROR: Failure while downloading https://www.secpoint.com/freetools/netbios-share-scanner-1.0.zip
Aborting...
==> ERROR: Failed to generate new checksums
while, if I download the file by the browser, I can download it with no issues.
Is there a way to make the process to download it as well with no errors?
Offline
Going to that URL in a browser throws an error as well. Your link is just bad, it's 'shares', not 'share'.
Online
Even if I add that "share" like:
source=("https://www.secpoint.com/freetools/netbios-shares-scanner-$pkgver.zip")
I continue to get:
==> ERROR: Failure while downloading https://www.secpoint.com/freetools/netbios-shares-scanner-1.0.zip
Aborting...
Offline
does it say why?
Online
cloudflare (and 403 is "forbidden")
-b cookies -c cookies will only get you a block warning instead of the target url
It's somwhat possible to get around cloudflares security measures, but I'm not sure you can put that into the AUR.
Offline
https://www.secpoint.com/freetools/netbios-shares-scanner-1.0.zip
does work from within firefox for me.
makepkg & wget are not able to download it though.
Maybe some kind of a redirection issue ?
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
The HTTP response is 403 when using PKGBUILD (curl). By using Chromium, instead, it is downloaded with no errors.
Last edited by D3vil0p3r (2024-04-28 12:48:22)
Offline
Faking the user agent will actually do in this particular case.
Offline
How can I fake it in the PKGBUILD?
Offline
Offline
I tried those options but with no luck. Getting 403.
Offline
What options? The literal UA dummies in the wiki? Incl. the one that say "this will not work"?
Try
Mozilla_X11_Linux_x86_64_AppleWebKit_537.36_KHTML_like_Gecko_Chrome_123.0.0.0_Safari_537.36
The UA testers aren't exactly "AI", they just look for very generic tokens in the UA.
Offline
Having curl remove the header completely worked for me.
Edit:
If you did need to set a value put the option and value in $pkgname.curlrc then:
CURL_HOME="$srcdir"
DLAGENTS=("https::/usr/bin/curl --config $pkgname.curlrc -fLC - --retry 3 --retry-delay 3 -o %o %u")
Last edited by loqs (2024-05-12 16:26:22)
Offline