cooljiansir / osniffer Goto Github PK
View Code? Open in Web Editor NEWsniffer run on openwrt
sniffer run on openwrt
git config --global user.name xxxxx #your name
git config --global user.email [email protected] #your email
cd /home/workplace/ #/home/workplace is the directory you choose
git init #initialize
git remote add origin https://github.com/cooljiansir/osniffer.git
git fetch origin doc #doc is the document branch,
git checkout doc #doc is the document branch
ls #now you can see these documents!
cd /home/workplace #the directory you choose
git status #see uncommited changes
git add * #if needed add some new files to git
git commit -am "some comment..." #commit your changes
git push origin doc #push your commit to the remote server
the document branch
the html\css\js.... codes
the cgi\server c code
cd /home/workplace/
tar -xf dl_for_WRTnodeSDK140824.tar
tar -xf WRTnodeSDK140824.tar.bz2
mv dl WRTnodeSDK140824/
mv feeds.conf.default WRTnodeSDK140824/
cd WRTnodeSDK140824
make menuconfig
#select(y) [*] Build the OpenWrt SDK
make #wait about 1hour
cd bin/ramips/
cp OpenWrt-SDK-ramips-*.tar.bz2 /home/workplace/ #It's the sdk!
cd /home/workplace
tar -xf OpenWrt-SDK-ramips-*.tar.bz2
cd /home/workplace/OpenWrt-SDK-ramips-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2/
cd package
tar -xf helloworld.tar.bz2
cd ../
make
cd bin/ramips/packages/
ls #here is helloworld_1_ramips_24kec.ipk
scp helloworld_1_ramips_24kec.ipk [email protected]:/usr/bin/
ssh [email protected]
root@OpenWrt:~# cd /usr/bin
root@OpenWrt:/usr/bin# ls
root@OpenWrt:/usr/bin# opkg install helloworld_1_ramips_24kec.ipk
root@OpenWrt:/usr/bin# helloworld
a hellowrold ipk for openwrt !!!
visit http://192.168.8.1:81/cgi-bin/OpenWrtSniffer?action=inter_list ,and you can see the json data
As the example above,osniffer use ajax
to get data from our cgi program:
html(js) uhttpd OpenWrtSniffer snifferd
|| || ||
||---http request -->|| ||
|| ||------ cgi ----> || ||
|| || ||-----FIFO pipe----> ||
|| || ||<----FIFO pipe----- ||
|| ||<--- printf ---- || ||
||<--- json data --- || ||
|| || ||
make menuconfig
Q:Build dependency: Please install ncurses. (Missing libncurses.so or ncurses.h)
A:sudo apt-get install libncurses5-dev
Q:Build dependency: Please install GNU awk.
A:sudo apt-get install gawk
Q:Build dependency: Please install the subversion client.
A:sudo apt-get install subversion
Q: scripts/config/mconf:命令未找到
make
checking for mipsel-openwrt-linux-gpg-error-config... /home/inu1255/桌面/WRTnodeSDK141114/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/usr/bin/gpg-error-config
checking for GPG Error - version >= 1.8... ./configure: line 13829: /home/inu1255/桌面/WRTnodeSDK141114/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/usr/bin/gpg-error-config: No such file or directory
./configure: line 13834: test: : integer expression expected
./configure: line 13837: test: : integer expression expected
no
configure: error: libgpg-error is needed.
See ftp://ftp.gnupg.org/gcrypt/libgpg-error/ .
make[3]: *** [/home/inu1255/桌面/WRTnodeSDK141114/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/libgcrypt-1.5.3/.configured_] Error 1
make[3]: Leaving directory `/home/inu1255/桌面/WRTnodeSDK141114/package/feeds/oldpackages/libgcrypt'
make[2]: *** [package/feeds/oldpackages/libgcrypt/compile] Error 2
make[2]: Leaving directory `/home/inu1255/桌面/WRTnodeSDK141114'
make[1]: *** [/home/inu1255/桌面/WRTnodeSDK141114/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/stamp/.package_compile] Error 2
make[1]: Leaving directory `/home/inu1255/桌面/WRTnodeSDK141114'
make: *** [world] 错误 2
see http://blog.csdn.net/wqvbjhc/article/details/27349209
12345678
with empty password
System
-> Administration
and set the new password
ssh [email protected]
cd /etc/config/
vi uhttpd
add these lines to the rear
config uhttpd web
list listen_http 0.0.0.0:81
option home /webroot/
then
cd /
mkdir webroot
cd webroot
echo 'hello openwrt world!'> index.html
reboot
You must finish the No.2 and No.3 issue first
cd /home/workplace/OpenWrt-SDK-ramips-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2
cd package/helloworld/src/
vi helloworld.c #content as follow
#include <stdio.h>
#include <stdio.h> //getenv
int main(void){
printf("Content-Type: text/html\n\n");
printf("GET:%s\n",getenv("QUERY_STRING"));
return 0;
}
cd ../../../
make
cd bin/ramips/packages/
scp helloworld_1_ramips_24kec.ipk [email protected]:/usr/bin
ssh [email protected]
cd /usr/bin
opkg install helloworld_1_ramips_24kec.ipk
cd /webroot/
mkdir cgi-bin
cd cgi-bin
cp /bin/helloworld ./
visit
http://192.168.8.1:81/cgi-bin/helloworld?helloworld=cgi
#5--Installing osniffer!
NOT
libcapcd /home/workplace/
cd WRTnodeSDK140824/
make menuconfig
#[*] Build the OpenWrt SDK
# Libraries ---> <*> libpcap............ Low-level packet capture library --->
make
cd /workplace/WRTnodeSDK140824/bin/ramips/
tar -xf OpenWrt-SDK-ramips-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2.tar.bz2
cd OpenWrt-SDK-ramips-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2/package
git clone -b master --single-branch https://github.com/cooljiansir/osniffer.git
cd ..
make
cd bin/ramips/packages
scp OpenWrtSniffer_1_ramips_24kec.ipk [email protected]:/usr/bin/
ssh [email protected]
cd /usr/bin
opkg install OpenWrtSniffer_1_ramips_24kec.ipk
git clone -b web2 --single-branch https://github.com/cooljiansir/osniffer.git
cd osniffer
scp -r * [email protected]:/webroot/
ssh [email protected]
vi /etc/config/uhttpd
#check if there are lines:,if not add them
config uhttpd web
list listen_http 0.0.0.0:81
option home /webroot/
/etc/init.d/uhttpd restart
any
there is a blank after arp
set
start
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.