Closed Twistee closed 1 month ago
Hi @Twistee,
Could you provide the output of grep -V
and bash --version
?
You are doing nothing wrong, I suspect this is some kind of compatibility problem with grep
.
mcbash
has a built-in URL checker that needs grep
with extended regexp support (-E
).
As far as I know, it should work with recent versions (even BusyBox).
As a shaky workaround, you could try replacing everything in the inspect_dns()
function by something dummy like echo "Bypassing DNS checking."
.
bash --version
Thank you for trying to help :)
These are my versions => ➜ ~ grep -V grep (BSD grep, GNU compatible) 2.6.0-FreeBSD ➜ ~ bash --version GNU bash, version 3.2.57(1)-release (arm64-apple-darwin24) Copyright (C) 2007 Free Software Foundation, Inc.
putting dummy code into the function also did not resolve the error for what ever reason..
Classic macOS' out-of-date packages :/, he are some workarounds:
upgrading grep or installing ggrep/ripgrep or whatever up-to-date grep-like compatible aliased to grep
modify the inspect_dns()
function (this must work, see below)
add an option to bypass url verification (I'll probably add that for mac users)
Modifying inspect_dns()
to bypass URL checking must work. Here's how you can proceed:
open the script ./bin/mcbash
from this repo in your editor
replace the function (currently from line 222 to 250) by this:
inspect_dns() {
echo "Bypassing URL verification."
}
launch the script sh ./bin/mcbash
if this does not work, I'll add a bypass option
sh ./bin/mcbash
Wow thank you it really worked :) I wrongly tried to adjust the function in the func directory and not in the script file directly. God bless ✌️
Glad it worked :) !
Modifying it in the func directory can work too if you then run sh build.sh
(it rebuilds the script inside the ./bin/mcbash
folder).
Hey guys i get the error invalid dns format with EVERY URL i tried. This is my input/output: mcbash -u yesimes.oknirvana.club:8880 -w 1.5 -b 10 -d 3 -s 1500 -t 2 grep: repetition-operator operand invalid ERROR: invalid DNS format.
Am i doing something wrong?