Giter VIP home page Giter VIP logo

dsniff's People

Contributors

ggreer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dsniff's Issues

berkeley DB incompatibility issue

Following the README install steps, compilation fails in record.c because #include finds /usr/local/include/db.h instead of /usr/include/db.h and the berkeley-db 6.2.23 installed is missing various #define fields such as R_NOOVERWRITE.

Using brew unlink berkeley-db (and doing ./configure again for safety) was enough to get a passing build where the one command I cared about (tcpkill) works, no idea if the DB-impacted tools have problems.

configure: error: pcap.h

./configure: line 410: test: pcap-bpf.h: integer expression expected
configure: error: pcap.h
./configure: line 299: return: pcap-bpf.h: numeric argument required
./configure: line 309: exit: pcap-bpf.h: numeric argument required

How to configure? How to compile?

Hi there
Sorry for the question, but I am struggling with getting this to work.

I got the brew installation but from there I'm stuck.
This has mainly to do with the next step:

2. Configure with correct paths:

./configure \
  --with-libpcap=/usr/local/opt/libpcap \
  --with-openssl=/usr/local/opt/openssl \
  --with-libnet=/usr/local/opt/libnet \
  --with-libnids=/usr/local/opt/libnids \
  --without-x

3. Compile:

make

4. Install:

make install

What do I want to configure and how do I do that?
Do I have to set the PATH of my shell?
I would not know any other than that.

Also the next steps don't really make sense to me. If I just type $ make I just get make: *** No targets specified and no makefile found. Stop.
I guess that the $ make command is to compile my application, but where is that makefile?

Sorry for the noobish questions, but maybe you could enlighten me a bit and maybe some other people having the same trouble could profit as well... ๐Ÿคทโ€โ™‚๏ธ

Thanks

Problem compiling dsniff

When I move on to the step "make" it turned out that:

./ssh.c:398:26: error: incomplete definition of type 'struct rsa_st'
get_bn(ssh->ctx->hostkey->e, &p, &i);
~~~~~~~~~~~~~~~~~^
/usr/local/opt/openssl/include/openssl/ossl_typ.h:110:16: note: forward
declaration of 'struct rsa_st'
typedef struct rsa_st RSA;

And this error happens many times

What's wrong?

plz, reply soon.

errors compiling

./configure: line 410: test: pcap-bpf.h: integer expression expected
configure: error: pcap.h
./configure: line 299: return: pcap-bpf.h: numeric argument required
./configure: line 309: exit: pcap-bpf.h: numeric argument required

seems like i get this issue too. when i try to brew libpcap it states that it's already included with OSX:

Error: No available formula for libpcap
Apple distributes libpcap with OS X, you can find it in /usr/lib.

if I compile with the /usr/lib directory, i get the error above. has anyone seen this happen on their platform as well? what's the best work around for this issue (i have tried compiling with Xcode's libpcap as well, with same issue)...

Can't compile MacOS 10.15.4

  1. Repository cloned

  2. brew deps installed

  3. ./configure command executed

  4. make command stdout/stderr merged output:

gcc -g -O2 -D_BSD_SOURCE -DHAVE_SOCKADDR_SA_LEN -DLIBNET_BSD_BYTE_SWAP -DDSNIFF_LIBDIR=\"/usr/local/share/dsniff/\" -I.  -I./missing -I/usr/local/opt/libpcap/include -I/usr/local/opt/libnet/include -I/usr/local/opt/libnids/include -I/usr/local/opt/openssl/include -I/usr/local/include -c ./ssh.c
./ssh.c:249:26: error: incomplete definition of type 'struct rsa_st'
        put_bn(ssh->ctx->servkey->e, &p);               /* servkey exponent */
               ~~~~~~~~~~~~~~~~~^
/usr/local/opt/openssl/include/openssl/ossl_typ.h:110:16: note: forward declaration of 'struct rsa_st'
typedef struct rsa_st RSA;
               ^
./ssh.c:250:26: error: incomplete definition of type 'struct rsa_st'
        put_bn(ssh->ctx->servkey->n, &p);               /* servkey modulus */
               ~~~~~~~~~~~~~~~~~^
/usr/local/opt/openssl/include/openssl/ossl_typ.h:110:16: note: forward declaration of 'struct rsa_st'
typedef struct rsa_st RSA;
               ^
./ssh.c:252:26: error: incomplete definition of type 'struct rsa_st'
        put_bn(ssh->ctx->hostkey->e, &p);               /* hostkey exponent */
               ~~~~~~~~~~~~~~~~~^
/usr/local/opt/openssl/include/openssl/ossl_typ.h:110:16: note: forward declaration of 'struct rsa_st'
typedef struct rsa_st RSA;
               ^
./ssh.c:253:26: error: incomplete definition of type 'struct rsa_st'
        put_bn(ssh->ctx->hostkey->n, &p);               /* hostkey modulus */
               ~~~~~~~~~~~~~~~~~^
/usr/local/opt/openssl/include/openssl/ossl_typ.h:110:16: note: forward declaration of 'struct rsa_st'
typedef struct rsa_st RSA;
               ^
./ssh.c:304:30: error: incomplete definition of type 'struct rsa_st'
        if (BN_cmp(ssh->ctx->servkey->n, ssh->ctx->hostkey->n) > 0) {
                   ~~~~~~~~~~~~~~~~~^
/usr/local/opt/openssl/include/openssl/ossl_typ.h:110:16: note: forward declaration of 'struct rsa_st'
typedef struct rsa_st RSA;
               ^
./ssh.c:304:52: error: incomplete definition of type 'struct rsa_st'
        if (BN_cmp(ssh->ctx->servkey->n, ssh->ctx->hostkey->n) > 0) {
                                         ~~~~~~~~~~~~~~~~~^
/usr/local/opt/openssl/include/openssl/ossl_typ.h:110:16: note: forward declaration of 'struct rsa_st'
typedef struct rsa_st RSA;
               ^
./ssh.c:324:51: error: incomplete definition of type 'struct rsa_st'
        if ((p = ssh_session_id(cookie, ssh->ctx->hostkey->n,
                                        ~~~~~~~~~~~~~~~~~^
/usr/local/opt/openssl/include/openssl/ossl_typ.h:110:16: note: forward declaration of 'struct rsa_st'
typedef struct rsa_st RSA;
               ^
./ssh.c:325:22: error: incomplete definition of type 'struct rsa_st'
                                ssh->ctx->servkey->n)) == NULL) {
                                ~~~~~~~~~~~~~~~~~^
/usr/local/opt/openssl/include/openssl/ossl_typ.h:110:16: note: forward declaration of 'struct rsa_st'
typedef struct rsa_st RSA;
               ^
./ssh.c:385:19: error: incomplete definition of type 'struct rsa_st'
        ssh->ctx->servkey->n = BN_new();
        ~~~~~~~~~~~~~~~~~^
/usr/local/opt/openssl/include/openssl/ossl_typ.h:110:16: note: forward declaration of 'struct rsa_st'
typedef struct rsa_st RSA;
               ^
./ssh.c:386:19: error: incomplete definition of type 'struct rsa_st'
        ssh->ctx->servkey->e = BN_new();
        ~~~~~~~~~~~~~~~~~^
/usr/local/opt/openssl/include/openssl/ossl_typ.h:110:16: note: forward declaration of 'struct rsa_st'
typedef struct rsa_st RSA;
               ^
./ssh.c:389:26: error: incomplete definition of type 'struct rsa_st'
        get_bn(ssh->ctx->servkey->e, &p, &i);
               ~~~~~~~~~~~~~~~~~^
/usr/local/opt/openssl/include/openssl/ossl_typ.h:110:16: note: forward declaration of 'struct rsa_st'
typedef struct rsa_st RSA;
               ^
./ssh.c:390:26: error: incomplete definition of type 'struct rsa_st'
        get_bn(ssh->ctx->servkey->n, &p, &i);
               ~~~~~~~~~~~~~~~~~^
/usr/local/opt/openssl/include/openssl/ossl_typ.h:110:16: note: forward declaration of 'struct rsa_st'
typedef struct rsa_st RSA;
               ^
./ssh.c:394:19: error: incomplete definition of type 'struct rsa_st'
        ssh->ctx->hostkey->n = BN_new();
        ~~~~~~~~~~~~~~~~~^
/usr/local/opt/openssl/include/openssl/ossl_typ.h:110:16: note: forward declaration of 'struct rsa_st'
typedef struct rsa_st RSA;
               ^
./ssh.c:395:19: error: incomplete definition of type 'struct rsa_st'
        ssh->ctx->hostkey->e = BN_new();
        ~~~~~~~~~~~~~~~~~^
/usr/local/opt/openssl/include/openssl/ossl_typ.h:110:16: note: forward declaration of 'struct rsa_st'
typedef struct rsa_st RSA;
               ^
./ssh.c:398:26: error: incomplete definition of type 'struct rsa_st'
        get_bn(ssh->ctx->hostkey->e, &p, &i);
               ~~~~~~~~~~~~~~~~~^
/usr/local/opt/openssl/include/openssl/ossl_typ.h:110:16: note: forward declaration of 'struct rsa_st'
typedef struct rsa_st RSA;
               ^
./ssh.c:399:26: error: incomplete definition of type 'struct rsa_st'
        get_bn(ssh->ctx->hostkey->n, &p, &i);
               ~~~~~~~~~~~~~~~~~^
/usr/local/opt/openssl/include/openssl/ossl_typ.h:110:16: note: forward declaration of 'struct rsa_st'
typedef struct rsa_st RSA;
               ^
./ssh.c:411:51: error: incomplete definition of type 'struct rsa_st'
        if ((p = ssh_session_id(cookie, ssh->ctx->hostkey->n,
                                        ~~~~~~~~~~~~~~~~~^
/usr/local/opt/openssl/include/openssl/ossl_typ.h:110:16: note: forward declaration of 'struct rsa_st'
typedef struct rsa_st RSA;
               ^
./ssh.c:412:22: error: incomplete definition of type 'struct rsa_st'
                                ssh->ctx->servkey->n)) == NULL) {
                                ~~~~~~~~~~~~~~~~~^
/usr/local/opt/openssl/include/openssl/ossl_typ.h:110:16: note: forward declaration of 'struct rsa_st'
typedef struct rsa_st RSA;
               ^
./ssh.c:428:30: error: incomplete definition of type 'struct rsa_st'
        if (BN_cmp(ssh->ctx->servkey->n, ssh->ctx->hostkey->n) < 0) {
                   ~~~~~~~~~~~~~~~~~^
/usr/local/opt/openssl/include/openssl/ossl_typ.h:110:16: note: forward declaration of 'struct rsa_st'
typedef struct rsa_st RSA;
               ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [ssh.o] Error 1

Could not use tcpkill

./tcpkill -9 port 5555
tcpkill: couldn't initialize sending

The error above occur when i use tcpkill, how to fix it?

Problems while "make"

gcc -g -O2 -D_BSD_SOURCE -DHAVE_SOCKADDR_SA_LEN -DLIBNET_BSD_BYTE_SWAP -DDSNIFF_LIBDIR=\"/usr/local/share/dsniff/\" -I. -I./missing -I/usr/local/opt/libpcap/include -I/usr/local/opt/libnet/include -I/usr/local/opt/libnids/include -I/usr/local/opt/openssl/include -I/usr/local/include -c ./ssh.c gcc -g -O2 -D_BSD_SOURCE -DHAVE_SOCKADDR_SA_LEN -DLIBNET_BSD_BYTE_SWAP -DDSNIFF_LIBDIR=\"/usr/local/share/dsniff/\" -I. -I./missing -I/usr/local/opt/libpcap/include -I/usr/local/opt/libnet/include -I/usr/local/opt/libnids/include -I/usr/local/opt/openssl/include -I/usr/local/include -c ./sshcrypto.c gcc -lglib-2.0 -lgthread-2.0 -o sshmitm sshmitm.o buf.o hex.o record.o ssh.o sshcrypto.o -lresolv -L. -lmissing -L/usr/local/opt/libnet/lib -lnet -L/usr/local/lib -ldb -L/usr/local/opt/openssl/lib -lssl -lcrypto Undefined symbols for architecture x86_64: "_ERR_load_crypto_strings", referenced from: _SSH_init in ssh.o "_SSL_library_init", referenced from: _SSH_init in ssh.o "_SSL_load_error_strings", referenced from: _SSH_init in ssh.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [sshmitm] Error 1

Will not build on osx 10.10

I followed all instructions. Macports and Homebrew are both installed. Macbook pro, 13 inch late 2010. Core 2 duo.

Output of ./configure

./configure \

--with-libpcap=/usr/local/opt/libpcap
--with-openssl=/usr/local/opt/openssl
--with-libnet=/usr/local/opt/libnet
--with-libnids=/usr/local/opt/libnids
--without-x
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for a BSD-compatible install... /usr/bin/install -c
checking for ranlib... ranlib
checking how to run the C preprocessor... gcc -E
checking for X... disabled
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking err.h usability... yes
checking err.h presence... yes
checking for err.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/queue.h usability... yes
checking sys/queue.h presence... yes
checking for sys/queue.h... yes
checking for unistd.h... (cached) yes
checking libgen.h usability... yes
checking libgen.h presence... yes
checking for libgen.h... yes
checking net/if_tun.h usability... no
checking net/if_tun.h presence... no
checking for net/if_tun.h... no
checking for MIN and MAX in sys/param.h... yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for u_int32_t... yes
checking for u_int64_t... yes
checking for in_addr_t... yes
checking whether gcc needs -traditional... no
checking for working memcmp... yes
checking return type of signal handlers... void
checking for strftime... yes
checking for gethostname... yes
checking for socket... yes
checking for strdup... yes
checking for strstr... yes
checking for ether_ntoa... yes
checking for xdr_fhstatus in -lrpcsvc... no
checking for socket in -lsocket... no
checking for gethostbyname in -lnsl... no
checking for dn_expand in -lresolv... yes
checking for __dn_expand in -lresolv... no
checking for dirname... yes
checking for strlcpy... yes
checking for strlcat... yes
checking for strsep... yes
checking for MD5Update... no
checking for warnx... yes
checking for ether_ntoa... (cached) yes
checking for Berkeley DB with 1.85 compatibility... yes
checking for libpcap... /usr/local/opt/libpcap
./configure: line 410: test: pcap-bpf.h: integer expression expected
configure: error: pcap.h
./configure: line 299: return: pcap-bpf.h: numeric argument required
./configure: line 309: exit: pcap-bpf.h: numeric argument required

when make is executed....

make: *** No targets specified and no makefile found. Stop.

configure: error: pcap.h

mac@root Homebrew#brew install rae/dsniff/dsniff
==> Installing dsniff from rae/dsniff
==> Installing dependencies for rae/dsniff/dsniff: libpcap
==> Installing rae/dsniff/dsniff dependency: libpcap
==> Downloading https://homebrew.bintray.com/bottles/libpcap-1.8.1.high_sierra.bottle.tar.gz
Already downloaded: /var/root/Library/Caches/Homebrew/libpcap-1.8.1.high_sierra.bottle.tar.gz
==> Pouring libpcap-1.8.1.high_sierra.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.

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

For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/libpcap/lib
CPPFLAGS: -I/usr/local/opt/libpcap/include

==> Summary
๐Ÿบ /usr/local/Cellar/libpcap/1.8.1: 102 files, 807.2KB
==> Installing rae/dsniff/dsniff
dsniff: This software can fail to compile when Berkeley-DB 5.x is installed.
You may need to try:
brew unlink berkeley-db
brew install dsniff
brew link berkeley-db
==> Downloading http://monkey.org/~dugsong/dsniff/beta/dsniff-2.4b1.tar.gz
Already downloaded: /var/root/Library/Caches/Homebrew/dsniff-2.4b1.tar.gz
==> ./configure --with-db=/usr/local/opt/berkeley-db --with-libpcap=/usr/local/ --prefix=/usr/local/Cellar/dsniff/2.4b1 --mandir=/usr/local/Cellar/dsniff/2.4b1/share/man --with-l
Last 15 lines from /var/root/Library/Logs/Homebrew/dsniff/01.configure:
checking for strstr... yes
checking for xdr_fhstatus in -lrpcsvc... no
checking for socket in -lsocket... no
checking for gethostbyname in -lnsl... no
checking for dn_expand in -lresolv... yes
checking for dirname... yes
checking for strlcpy... yes
checking for strlcat... yes
checking for strsep... yes
checking for MD5Update... no
checking for warnx... yes
checking for ether_ntoa... yes
checking for Berkeley DB with 1.85 compatibility... /usr/local/opt/berkeley-db
checking for libpcap... /usr/local/
configure: error: pcap.h

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/rae/homebrew-dsniff/issues

Can't compile under MacOSX 10.13

:dsniff eduardo$ make
gcc -o dsniff asn1.o base64.o buf.o hex.o magic.o mount.o pcaputil.o rpc.o tcp_raw.o trigger.o record.o dsniff.o decode.o decode_aim.o decode_citrix.o decode_cvs.o decode_ftp.o decode_hex.o decode_http.o decode_icq.o decode_imap.o decode_irc.o decode_ldap.o decode_mmxp.o decode_mountd.o decode_napster.o decode_nntp.o decode_oracle.o decode_ospf.o decode_pcanywhere.o decode_pop.o decode_portmap.o decode_postgresql.o decode_pptp.o decode_rip.o decode_rlogin.o decode_smb.o decode_smtp.o decode_sniffer.o decode_snmp.o decode_socks.o decode_tds.o decode_telnet.o decode_vrrp.o decode_yp.o decode_x11.o -lresolv -L. -lmissing -L/usr/local/opt/libnids/lib -lnids -L/usr/local/opt/libpcap/lib -lpcap -L/usr/local/opt/libnet/lib -lnet -L/usr/local/lib -ldb -L/usr/local/opt/openssl/lib -lssl -lcrypto
ld: warning: ignoring file ./libmissing.a, file was built for archive which is not the architecture being linked (x86_64): ./libmissing.a
Undefined symbols for architecture x86_64:
"_MD5Init", referenced from:
_record in record.o
"_MD5Update", referenced from:
_record in record.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [dsniff] Error 1

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.