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

Proxychains4 with brew for MacOs error #109

Closed
bobbuilder123 opened this issue Feb 22, 2016 · 41 comments
Closed

Proxychains4 with brew for MacOs error #109

bobbuilder123 opened this issue Feb 22, 2016 · 41 comments

Comments

@bobbuilder123
Copy link

@bobbuilder123 bobbuilder123 commented Feb 22, 2016

Here is the error:
MacBook-Pro:~ Bob$ proxychains4 nmap -sS 192.168.5.1
[proxychains] config file found: /usr/local/Cellar/proxychains-ng/4.11/etc/proxychains.conf
[proxychains] preloading /usr/local/Cellar/proxychains-ng/4.11/lib/libproxychains4.dylib
dyld: could not load inserted library '/usr/local/Cellar/proxychains-ng/4.11/lib/libproxychains4.dylib' because no suitable image found. Did find:
/usr/local/Cellar/proxychains-ng/4.11/lib/libproxychains4.dylib: mach-o, but wrong architecture
Any idea what to do? Here is my question asked on superuser: https://superuser.com/questions/1029102/how-to-install-proxychains-for-mac-os/1044016

@rofl0r
Copy link
Owner

@rofl0r rofl0r commented Feb 22, 2016

try to run configure with --fat-binary i.e. ./configure --fat-binary ...
you may have to change that in the homebrew recipe.

@bobbuilder123
Copy link
Author

@bobbuilder123 bobbuilder123 commented Feb 23, 2016

I installed it and it now seems to work but when I run: proxychains4 open -a /Applications/Firefox.app http://whatsmyip.org, it would print my real ip. Would you have an idea why?

@bobbuilder123
Copy link
Author

@bobbuilder123 bobbuilder123 commented Feb 23, 2016

I have a question I must ask: when performing a syn scan on https://www.google.ca, I can see that the destination is indeed 184.150.182.231 (google's ip) and not my tor's proxy. Would you know why? Is it something I did not understand about networking or would it be a normal behavior?

@rofl0r
Copy link
Owner

@rofl0r rofl0r commented Feb 23, 2016

it's normal behaviour that google has google's ip.
however whatsmyip should print the ip of the proxy. it probably works if you run the firefox binary directly i.e. proxychains4 /Applications/Firefox.app/name_of_binary_here or if you just change the proxy settings directly in firefox (i.e. without using proxychains).

@rofl0r rofl0r closed this Feb 23, 2016
@leebaird
Copy link

@leebaird leebaird commented Sep 1, 2016

Still having the same issue with v4.11

@XasaKura
Copy link

@XasaKura XasaKura commented Sep 16, 2016

I have use brew install proxychains-ng --universal but still have the same issue with v4.11

PS:
output:

==> ./configure --prefix=/usr/local/Cellar/proxychains-ng/4.11 --sysconfdir=/usr/local/Cellar/proxychains-ng/4.11/etc --fat-binary
checking whether netinet/in.h defines s6_addr16 ... no
checking whether netinet/in.h defines __u6_addr.__u6_addr16 ... yes
checking whether $CC defines __OpenBSD__ ... no
Configuring a fat binary for i386 and x86_64
Done, now run make && make install

AND SIP:

csrutil status
System Integrity Protection status: disabled.

homebrew config:
https://github.com/Homebrew/homebrew-core/blob/master/Formula/proxychains-ng.rb

@rofl0r
Copy link
Owner

@rofl0r rofl0r commented Sep 16, 2016

@XasaKura your PS output above seems to miss the output of make (compiler invocations etc). did you leave that away intentionally ?

@XasaKura
Copy link

@XasaKura XasaKura commented Sep 17, 2016

@rofl0r I only copy the part of configure

@rofl0r
Copy link
Owner

@rofl0r rofl0r commented Sep 17, 2016

well, in that case it is weird. maybe pastebin the entire output of running the brew install command to give us more clues what went wrong. i'm reopening this until we can rule out that there's something wrong on our side.

@rofl0r rofl0r reopened this Sep 17, 2016
@awar
Copy link

@awar awar commented Oct 26, 2016

@bobbuilder123 This can resolve your problem.
uninstalling your proxychain on brew with rmtree and install again this way brew install proxychains-ng --universal

@yangvz
Copy link

@yangvz yangvz commented Oct 26, 2016

same problem here.
first, installed with brew without --universal. works but not with system bins.
then disabled SIP. works for a few minutes after startup. but then quite suddenly this error shows up.
brew remove and brew install --universal, but still doesn't work.
cloned and ./configure --fat-binary. still doesn't work.

I will reenable SIP to see if this is fixed.

@yangvz
Copy link

@yangvz yangvz commented Oct 26, 2016

./configure --fat-binary

checking whether netinet/in.h defines s6_addr16 ... no
checking whether netinet/in.h defines u6_addr.__u6_addr16 ... yes
checking whether $CC defines __OpenBSD
... no
Configuring a fat binary for i386 and x86_64
Done, now run make && make install

make

cc -DSUPER_SECURE -Ds6_addr16=__u6_addr.__u6_addr16 -Ds6_addr32=__u6_addr.__u6_addr32 -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DIS_MAC=1 -arch i386 -arch x86_64 -DLIB_DIR="/usr/local/lib" -DSYSCONFDIR="/usr/local/etc" -DDLL_NAME="libproxychains4.dylib" -fPIC -c -o src/nameinfo.o src/nameinfo.c
printf '#define VERSION "%s"\n' "$(sh tools/version.sh)" > src/version.h
cc -DSUPER_SECURE -Ds6_addr16=__u6_addr.__u6_addr16 -Ds6_addr32=__u6_addr.__u6_addr32 -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DIS_MAC=1 -arch i386 -arch x86_64 -DLIB_DIR="/usr/local/lib" -DSYSCONFDIR="/usr/local/etc" -DDLL_NAME="libproxychains4.dylib" -fPIC -c -o src/version.o src/version.c
cc -DSUPER_SECURE -Ds6_addr16=__u6_addr.__u6_addr16 -Ds6_addr32=__u6_addr.__u6_addr32 -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DIS_MAC=1 -arch i386 -arch x86_64 -DLIB_DIR="/usr/local/lib" -DSYSCONFDIR="/usr/local/etc" -DDLL_NAME="libproxychains4.dylib" -fPIC -c -o src/core.o src/core.c
cc -DSUPER_SECURE -Ds6_addr16=__u6_addr.__u6_addr16 -Ds6_addr32=__u6_addr.__u6_addr32 -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DIS_MAC=1 -arch i386 -arch x86_64 -DLIB_DIR="/usr/local/lib" -DSYSCONFDIR="/usr/local/etc" -DDLL_NAME="libproxychains4.dylib" -fPIC -c -o src/common.o src/common.c
cc -DSUPER_SECURE -Ds6_addr16=__u6_addr.__u6_addr16 -Ds6_addr32=__u6_addr.__u6_addr32 -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DIS_MAC=1 -arch i386 -arch x86_64 -DLIB_DIR="/usr/local/lib" -DSYSCONFDIR="/usr/local/etc" -DDLL_NAME="libproxychains4.dylib" -fPIC -c -o src/libproxychains.o src/libproxychains.c
cc -DSUPER_SECURE -Ds6_addr16=__u6_addr.__u6_addr16 -Ds6_addr32=__u6_addr.__u6_addr32 -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DIS_MAC=1 -arch i386 -arch x86_64 -DLIB_DIR="/usr/local/lib" -DSYSCONFDIR="/usr/local/etc" -DDLL_NAME="libproxychains4.dylib" -fPIC -c -o src/allocator_thread.o src/allocator_thread.c
cc -DSUPER_SECURE -Ds6_addr16=__u6_addr.__u6_addr16 -Ds6_addr32=__u6_addr.__u6_addr32 -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DIS_MAC=1 -arch i386 -arch x86_64 -DLIB_DIR="/usr/local/lib" -DSYSCONFDIR="/usr/local/etc" -DDLL_NAME="libproxychains4.dylib" -fPIC -c -o src/ip_type.o src/ip_type.c
cc -DSUPER_SECURE -Ds6_addr16=__u6_addr.__u6_addr16 -Ds6_addr32=__u6_addr.__u6_addr32 -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DIS_MAC=1 -arch i386 -arch x86_64 -DLIB_DIR="/usr/local/lib" -DSYSCONFDIR="/usr/local/etc" -DDLL_NAME="libproxychains4.dylib" -fPIC -c -o src/hostsreader.o src/hostsreader.c
cc -DSUPER_SECURE -Ds6_addr16=__u6_addr.__u6_addr16 -Ds6_addr32=__u6_addr.__u6_addr32 -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DIS_MAC=1 -arch i386 -arch x86_64 -DLIB_DIR="/usr/local/lib" -DSYSCONFDIR="/usr/local/etc" -DDLL_NAME="libproxychains4.dylib" -fPIC -c -o src/hash.o src/hash.c
cc -DSUPER_SECURE -Ds6_addr16=__u6_addr.__u6_addr16 -Ds6_addr32=__u6_addr.__u6_addr32 -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DIS_MAC=1 -arch i386 -arch x86_64 -DLIB_DIR="/usr/local/lib" -DSYSCONFDIR="/usr/local/etc" -DDLL_NAME="libproxychains4.dylib" -fPIC -c -o src/debug.o src/debug.c
cc -fPIC -ldl -lpthread -arch i386 -arch x86_64 -Wl,-install_name,libproxychains4.dylib
-shared -o libproxychains4.dylib src/nameinfo.o src/version.o src/core.o src/common.o src/libproxychains.o src/allocator_thread.o src/ip_type.o src/hostsreader.o src/hash.o src/debug.o
cc -DSUPER_SECURE -Ds6_addr16=__u6_addr.__u6_addr16 -Ds6_addr32=__u6_addr.__u6_addr32 -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe -DIS_MAC=1 -arch i386 -arch x86_64 -DLIB_DIR="/usr/local/lib" -DSYSCONFDIR="/usr/local/etc" -DDLL_NAME="libproxychains4.dylib" -fPIC -c -o src/main.o src/main.c
cc src/main.o src/common.o -o proxychains4

csrutil status

System Integrity Protection status: disabled.

./proxychains4 brew update

[proxychains] config file found: /Users/Yang/.proxychains/proxychains.conf
[proxychains] preloading ./libproxychains4.dylib
dyld: warning: could not load inserted library './libproxychains4.dylib' into library validated process because no suitable image found. Did find:
./libproxychains4.dylib: code signing blocked mmap() of './libproxychains4.dylib'
dyld: warning: could not load inserted library './libproxychains4.dylib' into library validated process because no suitable image found. Did find:
./libproxychains4.dylib: code signing blocked mmap() of './libproxychains4.dylib'
dyld: warning: could not load inserted library './libproxychains4.dylib' into library validated process because no suitable image found. Did find:
./libproxychains4.dylib: code signing blocked mmap() of './libproxychains4.dylib'
^C

@awar
Copy link

@awar awar commented Oct 26, 2016

@yangnw have you uninstalled with rmtree brew rmtree proxychains-ng if you haven't rmtree package you can install it whit brew tap beeftornado/rmtree && brew install brew-rmtree and next install brew install proxychains-ng --universal. I have osx yosemite and work correctly

@yangvz
Copy link

@yangvz yangvz commented Oct 26, 2016

re-enabled SIP and restarted, now works again.
but system binaries do not work now, as before I disabled SIP.

@awar it's probably due to macOS Sierra messing with SIP or something.

@codinghunter
Copy link

@codinghunter codinghunter commented Nov 15, 2016

@yangnw I have same problem, does brew update work correctly now?

@lucklove
Copy link

@lucklove lucklove commented Nov 16, 2016

The same with me.

@yangvz
Copy link

@yangvz yangvz commented Nov 18, 2016

@HTNecro @lucklove I've enabled SIP, and now it works with the brew build of proxychains.

The downside is that you can't proxy-chain a binary in /usr/bin and other system paths, etc. curl. to use it, move the binary away or use proxychains4 wget -O - $url.

Same behavior regardless built from source or homebrew build. This should have nothing to do with homebrew. Try enabling SIP if you have disabled it before.

@yangvz
Copy link

@yangvz yangvz commented Nov 27, 2016

@HTNecro update: brew seems to use to the system curl regardless of the path, so I have to run etc. ALL_PROXY=socks5://127.0.0.1:1080 brew upgrade to get it working.

@crapthings
Copy link

@crapthings crapthings commented Jan 12, 2017

open terminal with osx recovery mode

csrutil disable
reboot
brew tap beeftornado/rmtree && brew install brew-rmtree
brew install proxychains-ng

~/.proxychains/proxychains.conf

strict_chain
proxy_dns
remote_dns_subnet 224
tcp_read_time_out 15000
tcp_connect_time_out 8000
localnet 127.0.0.0/255.0.0.0
quiet_mode

[ProxyList]
socks5  127.0.0.1 1080
csrutil enable
@motecshine
Copy link

@motecshine motecshine commented Jan 12, 2017

@crapthings its work for me

@jinfagang
Copy link

@jinfagang jinfagang commented Mar 22, 2017

same issue, I think I am going f**ked up by this anoying problem. Any one occured this on macOS sierra?

@louisabraham
Copy link

@louisabraham louisabraham commented Apr 3, 2017

@jinfagang I had no problem two months ago, but now have the same issue…

@rofl0r
Copy link
Owner

@rofl0r rofl0r commented Apr 3, 2017

please report homebrew issues to the homebrew issue tracker, thanks!

@louisabraham
Copy link

@louisabraham louisabraham commented Apr 3, 2017

Actually, I solved this problem by building from source.

EDIT: (my bad, I forgot between yesterday, I edit to make it clear to everyone)

On OS X you just have to run

git clone https://github.com/rofl0r/proxychains-ng
cd proxychains-ng
./configure --prefix=/usr/local --bindir=/usr/local/bin --libdir=/usr/local/lib --fat-binary
make
make install
@rofl0r
Copy link
Owner

@rofl0r rofl0r commented Apr 3, 2017

running configure will overwrite config.mak, so it was probably the other way round.
also you can pass bindir and libdir as parameters to configure, so you dont have to edit at all:

./configure --prefix=/usr/local --bindir=/usr/local/bin --libdir=/usr/local/lib --fat-binary
@gregakinman
Copy link

@gregakinman gregakinman commented Apr 6, 2017

The above steps did not work for me on OS X 10.11.6...

@louisabraham
Copy link

@louisabraham louisabraham commented Apr 6, 2017

@gregakinman what is your error message?

@gregakinman
Copy link

@gregakinman gregakinman commented Apr 6, 2017

@louisabraham

$ proxychains4 ./gradlew idea --no-daemon
[proxychains] config file found: /usr/local/etc/proxychains.conf
[proxychains] preloading proxychains-ng/libproxychains4.dylib
proxychains can't load process....: Permission denied
@louisabraham
Copy link

@louisabraham louisabraham commented Apr 6, 2017

@gregakinman That's absolutely not the same problem! Use sudo

@iFurySt
Copy link

@iFurySt iFurySt commented Apr 10, 2017

brew install proxychains-ng --universal
it work for me (macOS Sierra 10.12.3)

@gregakinman
Copy link

@gregakinman gregakinman commented Apr 10, 2017

$ brew install proxychains-ng --universal
Warning: proxychains-ng: this formula has no --universal option so it will be ignored!

$ brew --version
Homebrew 1.1.12
Homebrew/homebrew-core (git revision 600f; last commit 2017-04-10)

But I'm still on OSX 10.11.6 so if this is an El Cap vs. Sierra thing then I'll see myself out.

@cnlonlyrain
Copy link

@cnlonlyrain cnlonlyrain commented Apr 22, 2017

@louisabraham It work for me thanks!

@geekwutom
Copy link

@geekwutom geekwutom commented Jul 5, 2017

The above steps did not work for me on OS X 10.12.5..

@rofl0r
Copy link
Owner

@rofl0r rofl0r commented Jul 6, 2017

The above steps did not work for me on OS X 10.12.5..

that's pretty vague. post more details, including brew output and error messages you get when using it. someone using mac may be able to figure out what's wrong, @geekwutom

@yuseferi
Copy link

@yuseferi yuseferi commented Sep 25, 2017

I've tried all solutions in MAC OS but no one works for me and still facing with

proxychains4 curl twitter.com
[proxychains] config file found: /usr/local/etc/proxychains.conf
[proxychains] preloading /usr/local/Cellar/proxychains-ng/4.12_1/lib/libproxychains4.dylib

@rofl0r
Copy link
Owner

@rofl0r rofl0r commented Sep 25, 2017

@zhilevan i can't see anything wrong in the output you posted

@0x706a79
Copy link

@0x706a79 0x706a79 commented Apr 22, 2018

i am same

proxychains4 git --version
[proxychains] config file found: /usr/local/etc/proxychains.conf
[proxychains] preloading /usr/local/lib/libproxychains4.dylib
[proxychains] DLL init: proxychains-ng 4.12-git-15-gbb30d86
dyld: warning: could not load inserted library '/usr/local/lib/libproxychains4.dylib' into library validated process because no suitable image found.  Did find:
	/usr/local/lib/libproxychains4.dylib: code signing blocked mmap() of '/usr/local/lib/libproxychains4.dylib'
	/usr/local/lib/libproxychains4.dylib: stat() failed with errno=1
git version 2.15.1 (Apple Git-101)

macOS 10.13.4
Homebrew 1.6.1
System Integrity Protection status: disabled.

Use curl can work,
but i run git,error

@rofl0r
Copy link
Owner

@rofl0r rofl0r commented Apr 22, 2018

the relevant part is this

	/usr/local/lib/libproxychains4.dylib: code signing blocked mmap() of '/usr/local/lib/libproxychains4.dylib'

there is some code signing restriction active that prevents the dylib from getting loaded

maybe google around how that code signing can be deactivated, and let us know if you find anything. thanks.

@rofl0r
Copy link
Owner

@rofl0r rofl0r commented Jul 13, 2018

closing as duplicate of #78

@NightMachinary
Copy link

@NightMachinary NightMachinary commented Jun 20, 2019

[proxychains] config file found: /Users/evar/.proxychains/proxychains.conf
[proxychains] preloading /usr/local/Cellar/proxychains-ng/4.14/lib/libproxychains4.dylib
dyld: warning: could not load inserted library '/usr/local/Cellar/proxychains-ng/4.14/lib/libproxychains4.dylib' into hardened process because no suitable image found.  Did find:
	/usr/local/Cellar/proxychains-ng/4.14/lib/libproxychains4.dylib: code signature in (/usr/local/Cellar/proxychains-ng/4.14/lib/libproxychains4.dylib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
	/usr/local/Cellar/proxychains-ng/4.14/lib/libproxychains4.dylib: stat() failed with errno=1
@rofl0r
Copy link
Owner

@rofl0r rofl0r commented Jun 20, 2019

could people please stop to resurrect 3 year old zombie issues ? and then posting no useful information at all at that ?

Repository owner locked as spam and limited conversation to collaborators Jun 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
You can’t perform that action at this time.