Re: [dev] simple portscanner

From: v4hn <me_AT_v4hn.de>
Date: Sat, 2 Jan 2010 22:00:42 +0100

On Sat, Jan 02, 2010 at 09:38:36PM +0300, anonymous wrote:
> > --- makefile 2010-01-02 18:56:40.000000000 +0100
> > +++ makefile.patched 2010-01-02 18:58:08.000000000 +0100
> > @@ -13 +13 @@
> > - $(CC) $(LDFLAGS) $(OBJS) -o $(PROG)
> > + $(CC) $(OBJS) -o $(PROG) $(LDFLAGS)
>
> Will it work with this?
> $(CC) $(LDFLAGS) -o $(PROG) $(OBJS)
> Or with this:
> $(CC) -o $(PROG) $(LDFLAGS) $(OBJS)

neither nor.
wierd:

This produces undefined references
> icc -o portscan -lpcap network.o column.o common.o hosts.o parse.o ports.o portscan.o scan.o -lpthread

while this works:
> icc -o portscan network.o -lpcap column.o common.o hosts.o parse.o ports.o portscan.o scan.o -lpthread

It seems like -lpcap has to be behind network.o
Why the hack?

v4hn

Received on Sat Jan 02 2010 - 21:00:42 UTC

This archive was generated by hypermail 2.2.0 : Sat Jan 02 2010 - 21:12:02 UTC