Skip to content

Commit

Permalink
Initial import of lorcon-old,
Browse files Browse the repository at this point in the history
Sent to me by @linkin8834 2015-07-15
  • Loading branch information
dhalperi committed Jul 16, 2015
0 parents commit 0825ec0
Show file tree
Hide file tree
Showing 106 changed files with 63,975 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .depend
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@

ifcontrol_linux.o: ifcontrol_linux.c config.h ifcontrol_linux.h tx80211.h \
tx80211_packet.h tx80211_errno.h
iwcontrol.o: iwcontrol.c config.h iwcontrol.h tx80211.h tx80211_packet.h \
tx80211_errno.h
madwifing_control.o: madwifing_control.c config.h madwifing_control.h \
tx80211.h tx80211_packet.h tx80211_errno.h ifcontrol_linux.h
nl80211_control.o: nl80211_control.c config.h tx80211.h tx80211_packet.h \
tx80211_errno.h
wtinject.o: wtinject.c config.h wtinject.h iwcontrol.h tx80211.h \
tx80211_packet.h tx80211_errno.h tx80211_errno.h ifcontrol_linux.h
mwoldinject.o: mwoldinject.c config.h mwoldinject.h wtinject.h \
iwcontrol.h tx80211.h tx80211_packet.h tx80211_errno.h
mwnginject.o: mwnginject.c config.h mwnginject.h wtinject.h iwcontrol.h \
tx80211.h tx80211_packet.h tx80211_errno.h ifcontrol_linux.h \
madwifing_control.h tx80211_errno.h
ajinject.o: ajinject.c config.h ajinject.h tx80211.h tx80211_packet.h \
tx80211_errno.h tx80211_packet.h
p54inject.o: p54inject.c config.h p54inject.h wtinject.h iwcontrol.h \
tx80211.h tx80211_packet.h tx80211_errno.h
wginject.o: wginject.c config.h wginject.h tx80211.h tx80211_packet.h \
tx80211_errno.h
hapinject.o: hapinject.c config.h hapinject.h wtinject.h iwcontrol.h \
tx80211.h tx80211_packet.h tx80211_errno.h
rt2500inject.o: rt2500inject.c config.h rt2500inject.h wtinject.h \
iwcontrol.h tx80211.h tx80211_packet.h tx80211_errno.h
rtlinject.o: rtlinject.c config.h rtlinject.h wtinject.h iwcontrol.h \
tx80211.h tx80211_packet.h tx80211_errno.h
rt2570inject.o: rt2570inject.c config.h rt2570inject.h wtinject.h \
iwcontrol.h tx80211.h tx80211_packet.h tx80211_errno.h
airpinject.o: airpinject.c config.h
rt73inject.o: rt73inject.c config.h rt73inject.h wtinject.h iwcontrol.h \
tx80211.h tx80211_packet.h tx80211_errno.h
rt61inject.o: rt61inject.c config.h rt61inject.h wtinject.h iwcontrol.h \
tx80211.h tx80211_packet.h tx80211_errno.h
zd1211rwinject.o: zd1211rwinject.c config.h zd1211rwinject.h wtinject.h \
iwcontrol.h tx80211.h tx80211_packet.h tx80211_errno.h
mac80211inject.o: mac80211inject.c config.h mac80211inject.h wtinject.h \
iwcontrol.h tx80211.h tx80211_packet.h tx80211_errno.h
bcm43xxinject.o: bcm43xxinject.c config.h bcm43xxinject.h wtinject.h \
iwcontrol.h tx80211.h tx80211_packet.h tx80211_errno.h
tx80211.o: tx80211.c config.h tx80211.h tx80211_packet.h tx80211_errno.h \
tx80211_errno.h ifcontrol_linux.h
lorcon_decode.o: lorcon_decode.c config.h tx80211.h tx80211_packet.h \
tx80211_errno.h
lorcon_packasm.o: lorcon_packasm.c config.h lorcon_packasm.h \
tx80211_packet.h
lorcon_forge.o: lorcon_forge.c config.h tx80211.h tx80211_packet.h \
tx80211_errno.h lorcon_packasm.h tx80211_packet.h lorcon_forge.h \
ieee80211.h
31 changes: 31 additions & 0 deletions BUGS
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
24-JUL-2005 - JWRIGHT
wlan-ng and other drivers based on Prism2 chipsets (AirJack, Hostap) firmware
will reverse the supplied order of DA and SA addresses when the FromDS bit is
set. Need to decide if this should be handled with a capabilities flag, or if
the injection code for these drivers should check for the presence of FromDS
and switch the address order automatically.

23-APR-2006 - JWRIGHT
HostAP drivers are in Prism_AVS mode by default for monitor, need to change
to DLT_IEEE802_11 before packet injection

6-JAN-2007 - JWRIGHT
Error on "make install" if $PREFIX/include doesn't exist.

25-FEB-2007 - JWRIGHT
selfack() function not working at this time.

8-MAR-2007 - JWRIGHT
When dependencies are in directories with spaces in them (on Windows), libtool gets all confused, generating this error:

libtool: link: cannot find the library `' or unhandled argument `and'
make: *** [liborcon.la] Error 1

Solution: don't put dependencies in directory paths that include spaces. I use C:\DEV, you should too.

13-MAR-2007 - JWRIGHT
Formerly, you could say tx80211_init, tx80211_setchannel, tx80211_open,
tx80211_txpacket, tx80211_close. With the changes to the madwifing handling
code however, we create a new VAP during tx80211_open which changes the
interface name. As such, it is mandatory to call tx80211_init followed by
tx80211_open BEFORE tx80211_setfuncmode or tx80211_setchannel.
340 changes: 340 additions & 0 deletions COPYING

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions Lindent
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
indent -kr -i8 -ts8 -sob -l80 -ss -ncs "$@"
118 changes: 118 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@

VERSION = 20081101

MAJOR = 1
MINOR = 0
TINY = 0

HOME = .
top_builddir = $(HOME)

prefix = /usr/local
exec_prefix = ${prefix}
ETC = ${DESTDIR}${prefix}/etc
BIN = ${DESTDIR}${exec_prefix}/bin
SHARE = ${DESTDIR}${prefix}/share/lorcon/
MAN = ${DESTDIR}${prefix}/share/man
LIB = ${DESTDIR}${exec_prefix}/lib
INCLUDE = ${DESTDIR}${prefix}/include

CC = gcc
LDFLAGS =
LIBS = -lm
CFLAGS = -I./ -DHAVE_CONFIG_H -g -O2 -DTX80211_VERSION=$(VERSION)
LIBTOOL = $(SHELL) $(top_builddir)/libtool
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(CFLAGS)

DEPEND = .depend

LIBOBJ = ifcontrol_linux.lo iwcontrol.lo madwifing_control.lo nl80211_control.lo \
wtinject.lo mwoldinject.lo mwnginject.lo \
ajinject.lo p54inject.lo wginject.lo \
hapinject.lo rt2500inject.lo rtlinject.lo \
rt2570inject.lo airpinject.lo rt73inject.lo \
rt61inject.lo zd1211rwinject.lo mac80211inject.lo \
bcm43xxinject.lo tx80211.lo \
lorcon_decode.lo lorcon_packasm.lo lorcon_forge.lo
LIBOUT = liborcon.la

TXTESTOBJ = tx.o
TXTESTOUT = tx

TXTUNOBJ = tuntx.o
TXTUNOUT = tuntx

L2PINGOBJ = l2ping80211.o
L2PINGOUT = l2ping80211

all: $(DEPEND) $(LIBOUT)

$(LIBOUT): $(LIBOBJ)
$(LIBTOOL) --mode=link $(CC) $(LDFLAGS) $(LIBS) -o $(LIBOUT) $(LIBOBJ) \
-rpath $(LIB) -release $(MAJOR).$(MINOR).$(TINY)

$(TXTESTOUT): $(TXTESTOBJ)
$(CC) $(CFLAGS) $(LDFLAGS) -o $(TXTESTOUT) $(TXTESTOBJ) $(LIBS) -lorcon

$(TXTUNOUT): $(TXTUNOBJ)
$(CC) $(LDFLAGS) -o $(TXTUNOUT) $(TXTUNOBJ) $(LIBS) -lorcon -lpcap

$(L2PINGOUT): $(L2PINGOBJ)
$(CC) $(LDFLAGS) -o $(L2PINGOUT) $(L2PINGOBJ) $(LIBS) -lorcon -lpcap

install: $(LIBOUT)
install -d -m 755 $(LIB)
$(LIBTOOL) --mode=install install -c $(LIBOUT) $(LIB)/$(LIBOUT)
install -d -m 755 $(INCLUDE)
install -m 644 tx80211.h $(INCLUDE)/tx80211.h
install -m 644 tx80211_packet.h $(INCLUDE)/tx80211_packet.h
install -m 644 tx80211_errno.h $(INCLUDE)/tx80211_errno.h
install -m 644 lorcon_packasm.h $(INCLUDE)/lorcon_packasm.h
install -m 644 lorcon_forge.h $(INCLUDE)/lorcon_forge.h
install -m 644 ieee80211.h $(INCLUDE)/lorcon_ieee80211.h
install -d -m 755 $(MAN)/man3
install -o root -m 644 lorcon.3 $(MAN)/man3/lorcon.3

$(LDCONFIG)

clean:
@-rm -f *.o
@-rm -f *.lo
@-rm -f *.la
@-rm -rf .libs
@-rm -f $(TXTESTOUT)

distclean:
@-$(MAKE) clean
@-rm -f *~
@-rm cscope.out
@-rm -f $(DEPEND)
@-rm -f config.status
@-rm -f config.h
@-rm -f config.log
@-rm -f Makefile

dep:
@$(MAKE) depend

depend:
@$(MAKE) $(DEPEND)

$(DEPEND):
@-rm -f $(DEPEND)
@echo "Generating dependencies... "
@echo > $(DEPEND)
@$(CC) $(CFLAGS) -MM \
`echo $(LIBOBJ) | sed -e "s/\.lo/\.c/g"` >> $(DEPEND)

include $(DEPEND)

.c.o: $(DEPEND)
$(CC) $(CFLAGS) -c $*.c -o $@

.c.lo: $(DEPEND)
$(LTCOMPILE) -c $*.c -o $@

.SUFFIXES: .c .o .lo


118 changes: 118 additions & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@

VERSION = 20081101

MAJOR = 1
MINOR = 0
TINY = 0

HOME = @srcdir@
top_builddir = $(HOME)

prefix = @prefix@
exec_prefix = @exec_prefix@
ETC = ${DESTDIR}@sysconfdir@
BIN = ${DESTDIR}@bindir@
SHARE = ${DESTDIR}@datadir@/lorcon/
MAN = ${DESTDIR}@mandir@
LIB = ${DESTDIR}@libdir@
INCLUDE = ${DESTDIR}@includedir@

CC = @CC@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
CFLAGS = -I./ @CPPFLAGS@ @CFLAGS@ -DTX80211_VERSION=$(VERSION)
LIBTOOL = @LIBTOOL@
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(CFLAGS)

DEPEND = .depend

LIBOBJ = ifcontrol_linux.lo iwcontrol.lo madwifing_control.lo nl80211_control.lo \
wtinject.lo mwoldinject.lo mwnginject.lo \
ajinject.lo p54inject.lo wginject.lo \
hapinject.lo rt2500inject.lo rtlinject.lo \
rt2570inject.lo airpinject.lo rt73inject.lo \
rt61inject.lo zd1211rwinject.lo mac80211inject.lo \
bcm43xxinject.lo tx80211.lo \
lorcon_decode.lo lorcon_packasm.lo lorcon_forge.lo
LIBOUT = liborcon.la

TXTESTOBJ = tx.o
TXTESTOUT = tx

TXTUNOBJ = tuntx.o
TXTUNOUT = tuntx

L2PINGOBJ = l2ping80211.o
L2PINGOUT = l2ping80211

all: $(DEPEND) $(LIBOUT)

$(LIBOUT): $(LIBOBJ)
$(LIBTOOL) --mode=link $(CC) $(LDFLAGS) $(LIBS) -o $(LIBOUT) $(LIBOBJ) \
-rpath $(LIB) -release $(MAJOR).$(MINOR).$(TINY)

$(TXTESTOUT): $(TXTESTOBJ)
$(CC) $(CFLAGS) $(LDFLAGS) -o $(TXTESTOUT) $(TXTESTOBJ) $(LIBS) -lorcon

$(TXTUNOUT): $(TXTUNOBJ)
$(CC) $(LDFLAGS) -o $(TXTUNOUT) $(TXTUNOBJ) $(LIBS) -lorcon -lpcap

$(L2PINGOUT): $(L2PINGOBJ)
$(CC) $(LDFLAGS) -o $(L2PINGOUT) $(L2PINGOBJ) $(LIBS) -lorcon -lpcap

install: $(LIBOUT)
install -d -m 755 $(LIB)
$(LIBTOOL) --mode=install install -c $(LIBOUT) $(LIB)/$(LIBOUT)
install -d -m 755 $(INCLUDE)
install -m 644 tx80211.h $(INCLUDE)/tx80211.h
install -m 644 tx80211_packet.h $(INCLUDE)/tx80211_packet.h
install -m 644 tx80211_errno.h $(INCLUDE)/tx80211_errno.h
install -m 644 lorcon_packasm.h $(INCLUDE)/lorcon_packasm.h
install -m 644 lorcon_forge.h $(INCLUDE)/lorcon_forge.h
install -m 644 ieee80211.h $(INCLUDE)/lorcon_ieee80211.h
install -d -m 755 $(MAN)/man3
install -o root -m 644 lorcon.3 $(MAN)/man3/lorcon.3

$(LDCONFIG)

clean:
@-rm -f *.o
@-rm -f *.lo
@-rm -f *.la
@-rm -rf .libs
@-rm -f $(TXTESTOUT)

distclean:
@-$(MAKE) clean
@-rm -f *~
@-rm cscope.out
@-rm -f $(DEPEND)
@-rm -f config.status
@-rm -f config.h
@-rm -f config.log
@-rm -f Makefile

dep:
@$(MAKE) depend

depend:
@$(MAKE) $(DEPEND)

$(DEPEND):
@-rm -f $(DEPEND)
@echo "Generating dependencies... "
@echo > $(DEPEND)
@$(CC) $(CFLAGS) -MM \
`echo $(LIBOBJ) | sed -e "s/\.lo/\.c/g"` >> $(DEPEND)

include $(DEPEND)

.c.o: $(DEPEND)
$(CC) $(CFLAGS) -c $*.c -o $@

.c.lo: $(DEPEND)
$(LTCOMPILE) -c $*.c -o $@

.SUFFIXES: .c .o .lo


18 changes: 18 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
lorcon - Loss Of Radio CONnectivity

Copyright (c) 2005 - Joshua Wright <[email protected]>
dragorn <[email protected]>

Project goals:
Create what libradiate could have been: A generic library for injecting
802.11 frames, capable of injection via multiple driver frameworks, without
forcing modification of the application code.

Tools:
tx - A super-basic demo of the library capabilities that writes static
packets to the interface

tuntx - A more useful demo of the library capabilities, tuntx binds a
tuntap virtual interface to a card via LORCON. Write 802.11 frames to
the tuntap virtual interface, they get transmitted out the card.

5 changes: 5 additions & 0 deletions THANKS
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Credit-where-credit-is-due:

Special thanks to KoreK for the wlan-ng patch
Special thanks to devine for the MADWIFI, HostAP, RTL8180 and RT2500 patches.
You rock devine!
4 changes: 4 additions & 0 deletions TODO
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
+ Figure out how to register STA MAC with Atheros cards to accommodate ACK'ing
while in monitor mode.
- prism54, set_mac_address function, "mgt_update_addr"
+ Disable backoff or CCA to enable instant TX
Loading

0 comments on commit 0825ec0

Please sign in to comment.