Coder Social home page Coder Social logo

Comments (19)

colinmo avatar colinmo commented on July 17, 2024 27

I found installing hping on OS X via brew required making some changes, due to brew installing tcl-tk in a non standard location.

==> Caveats
tcl-tk is keg-only, which means it was not symlinked into /usr/local,
because tk installs some X11 headers and macOS provides an (older) Tcl/Tk.

If you need to have tcl-tk first in your PATH run:
  echo 'export PATH="/usr/local/opt/tcl-tk/bin:$PATH"' >> ~/.bash_profile

For compilers to find tcl-tk you may need to set:
  export LDFLAGS="-L/usr/local/opt/tcl-tk/lib"
  export CPPFLAGS="-I/usr/local/opt/tcl-tk/include"

For pkg-config to find tcl-tk you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/tcl-tk/lib/pkgconfig"

So I had to make the following adjustments to the configure file before I ran the ./configure step:

  1. Line 64, add "/usr/local/opt/tcl-tk/bin/" to the end so the script can find the right tcl binary
  2. Line 66, add "8.6" to the end so the script can get the version of tcl-tk brew downloaded (check in /usr/local/opt/tcl-tk/bin for a file starting with tclsh8.? to get the correct version number.)
  3. Line 84, replace the line with the following, so it can get the right include location
  if [ -e /usr/local/opt/tcl-tk/lib/tcl${TCL_VER} ]
  then
      TCL_INC="-I/usr/local/opt/tcl-tk/lib/tcl${TCL_VER}"
  elif [ -e /usr/include/tcl${TCL_VER} ]

Then in the Makefile change all references to /usr/sbin to /usr/local/bin, because on OS X we don't have any rights to write there even as sudo.

After this I could resume the instructions from ./configure. If you've tried this before and failed, be sure and run make clean to remove any artifacts from previous attempts.

from hping.

 avatar commented on July 17, 2024 10

do this in terminal:
brew uninstall hping
cd ~
mkdir hping
cd hping
git clone https://github.com/antirez/hping.git
brew install tcl-tk
brew install libpcap
./configure
make
sudo make install
hping

from hping.

thepoppingone avatar thepoppingone commented on July 17, 2024 7

@shelbiedatta Yes it works but @47k also mentioned the install error.
From El Capitan onwards you can no longer install or copy flles into /usr/sbin due to SIP (System Integrity Protection) - refer to this post

To fix this, take a look at Makefile in the source, add a local in front of all the sbin and after that make sure your usr/local/sbin is in your $PATH.

cp -f hping3 /usr/local/sbin/
	chmod 755 /usr/local/sbin/hping3
	ln -s /usr/local/sbin/hping3 /usr/local/sbin/hping
	ln -s /usr/local/sbin/hping3 /usr/local/sbin/hping2

Then, run sudo make install again, that should work.

from hping.

caspertsui avatar caspertsui commented on July 17, 2024 6

brew install hping is still not working.
With Homebrew 2.1.2-64-gbcc5f04 and hping: stable 3.20051105 (bottled).
Thanks for your kind help and attention.

from hping.

petekowalsky avatar petekowalsky commented on July 17, 2024 1

@colinmo Hey I know this was a while back, but I'm on my new work laptop (fresh install) and I could not for the life of me remember how I did this before, so THANKS very much for your explanatory post. Very helpful.

I have another issue now (though the binary seems to work), in that I have no man page for hping/2/3 being created so I guess I have to work that out. With so many command line options, a locally-available man page would be super-useful. (edit: 'hping -help' will do it but it's not the same LOL)

Cheers!

from hping.

max-reznichenko avatar max-reznichenko commented on July 17, 2024

i am getting the same error even after manual installation

# hping3
Sorry, this hping binary was compiled without TCL scripting support

hping3 -v is showing the explicit message that there is no TCP support

# ./hping3 -v
hping version 3.0.0-alpha-1 ($Id: release.h,v 1.4 2004/04/09 23:38:56 antirez Exp $)
NO TCL scripting support compiled in  ##<<<< look here

from hping.

47k avatar 47k commented on July 17, 2024

@fugiefire

user@device:~/hping/hping$ sudo make install
cp -f hping3 /usr/sbin/
cp: /usr/sbin/hping3: Operation not permitted
make: *** [install] Error 1

from hping.

shelbiedatta avatar shelbiedatta commented on July 17, 2024

Did fugiefire solution work?

from hping.

N0ooooone avatar N0ooooone commented on July 17, 2024

image
bros, it also can't work...

from hping.

N0ooooone avatar N0ooooone commented on July 17, 2024

image
if I run "sudo", it will work, but I don't wanna sudo all the time..., any ideas? bros

from hping.

N0ooooone avatar N0ooooone commented on July 17, 2024

@fugiefire

user@device:~/hping/hping$ sudo make install
cp -f hping3 /usr/sbin/
cp: /usr/sbin/hping3: Operation not permitted
make: *** [install] Error 1

bro of second floor, if I do the same command, I can't find ./configure file to run this cmd

from hping.

thepoppingone avatar thepoppingone commented on July 17, 2024

@Vs0sV I mentioned the SIP issue above, have you tried that?

from hping.

kekulyh avatar kekulyh commented on July 17, 2024

Tried with all above, still cannot work.

from hping.

N0ooooone avatar N0ooooone commented on July 17, 2024

from hping.

sudosean avatar sudosean commented on July 17, 2024

+1

from hping.

aleixsr avatar aleixsr commented on July 17, 2024

Any way to solve it?
UPDATE: it is working fine, just run a command like "sudo /usr/local/sbin/hping3 -h" and it works.

from hping.

TheSneakySniper avatar TheSneakySniper commented on July 17, 2024

Note; even if the program says that it was built without scripting, it was not if you followed the steps correctly.

This was the case for me.

from hping.

aJesus37 avatar aJesus37 commented on July 17, 2024

do this in terminal:
brew uninstall hping
cd ~
mkdir hping
cd hping
git clone https://github.com/antirez/hping.git
brew install tcl-tk
brew install libpcap
./configure
make
sudo make install
hping

This solution worked for me on Manjaro Linux.

from hping.

 avatar commented on July 17, 2024

Any patch for Arch linux?

from hping.

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.