Skip to content

Commit b478e36

Browse files
committed
Review
2 parents 24c352a + f891f6a commit b478e36

17 files changed

+632
-245
lines changed

.classpath

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<classpath>
3-
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
4-
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
5-
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
6-
<classpathentry kind="src" path="src"/>
7-
<classpathentry kind="src" path="gen"/>
8-
<classpathentry kind="output" path="bin/classes"/>
9-
</classpath>
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
4+
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
5+
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
6+
<classpathentry kind="src" path="src"/>
7+
<classpathentry kind="src" path="gen"/>
8+
<classpathentry kind="output" path="bin/classes"/>
9+
</classpath>

AndroidManifest.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
<category android:name="android.intent.category.LAUNCHER" />
3838
</intent-filter>
3939
</activity>
40+
<activity android:name="com.oinux.lanmitm.ui.HttpClone" />
4041
<activity android:name="com.oinux.lanmitm.ui.HostsActivity" />
4142
<activity android:name="com.oinux.lanmitm.ui.SniffActivity" />
4243
<activity android:name="com.oinux.lanmitm.ui.HijackActivity" />
@@ -65,4 +66,4 @@
6566
<uses-library android:name="android.test.runner" />
6667
</application>
6768

68-
</manifest>
69+
</manifest>

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ Lanmitm — Android中间人攻击测试工具
99

1010
更新历史
1111
-------------------
12+
####v1.2.1版本说明 (2014-12-15)
13+
14+
1、修复bug
15+
1216
####v1.2版本说明 (2014-12-12)
1317

1418
1、添加禁止上网功能

res/drawable-hdpi/btn_check_off.png

366 Bytes
Loading

res/drawable-hdpi/btn_check_on.png

430 Bytes
Loading

res/drawable/btn_check.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<selector xmlns:android="http://schemas.android.com/apk/res/android">
3+
4+
<item android:drawable="@drawable/btn_check_on" android:state_checked="true"></item>
5+
<item android:drawable="@drawable/btn_check_on" android:state_selected="true"></item>
6+
<item android:drawable="@drawable/btn_check_on" android:state_pressed="true"></item>
7+
<item android:drawable="@drawable/btn_check_off"></item>
8+
9+
</selector>

res/layout/http_clone.xml

Lines changed: 206 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,206 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:layout_width="match_parent"
4+
android:layout_height="match_parent"
5+
android:background="#ff171c20"
6+
android:orientation="vertical" >
7+
8+
<RelativeLayout
9+
android:layout_width="match_parent"
10+
android:layout_height="56dp"
11+
android:background="@drawable/topbar_bg" >
12+
13+
<ImageView
14+
android:id="@+id/actionbar_logo"
15+
android:layout_width="30dp"
16+
android:layout_height="30dp"
17+
android:layout_alignParentLeft="true"
18+
android:layout_centerVertical="true"
19+
android:layout_marginLeft="5dp"
20+
android:layout_marginRight="5dp"
21+
android:src="@drawable/ic_launch" />
22+
23+
<TextView
24+
android:id="@+id/actionbar_logo_text"
25+
android:layout_width="wrap_content"
26+
android:layout_height="wrap_content"
27+
android:layout_centerVertical="true"
28+
android:layout_toRightOf="@id/actionbar_logo"
29+
android:text="@string/app_name"
30+
android:textColor="#ffffffff"
31+
android:textSize="22sp" />
32+
</RelativeLayout>
33+
34+
<RelativeLayout
35+
android:id="@+id/header_view"
36+
android:layout_width="match_parent"
37+
android:layout_height="wrap_content"
38+
android:visibility="gone" >
39+
40+
<ProgressBar
41+
android:id="@+id/header_progress"
42+
style="@style/Widget.Sherlock.ProgressBar"
43+
android:layout_width="24dp"
44+
android:layout_height="24dp"
45+
android:layout_centerVertical="true"
46+
android:layout_marginLeft="15dp"
47+
android:visibility="visible" />
48+
49+
<TextView
50+
android:id="@+id/header_text"
51+
android:layout_width="wrap_content"
52+
android:layout_height="wrap_content"
53+
android:layout_centerInParent="true"
54+
android:padding="9.0dip"
55+
android:paddingBottom="8.0dip"
56+
android:paddingLeft="8.0dip"
57+
android:text="正在执行代码注入"
58+
android:textColor="#ffffff"
59+
android:textSize="15.0sp" />
60+
</RelativeLayout>
61+
62+
<ScrollView
63+
android:id="@+id/inject_scroll"
64+
android:layout_width="match_parent"
65+
android:layout_height="wrap_content"
66+
android:fadeScrollbars="false"
67+
android:scrollbars="vertical" >
68+
69+
<LinearLayout
70+
android:layout_width="match_parent"
71+
android:layout_height="wrap_content"
72+
android:focusable="true"
73+
android:focusableInTouchMode="true"
74+
android:orientation="vertical" >
75+
76+
<TextView
77+
android:layout_width="match_parent"
78+
android:layout_height="wrap_content"
79+
android:background="@android:color/transparent"
80+
android:paddingBottom="5dp"
81+
android:paddingLeft="10dp"
82+
android:paddingRight="10dp"
83+
android:paddingTop="10dp"
84+
android:text="请输入需要克隆的网页地址"
85+
android:textColor="#FFFFCC"
86+
android:textSize="15sp" />
87+
88+
<EditText
89+
android:id="@+id/clone_url"
90+
android:layout_width="match_parent"
91+
android:layout_height="40dp"
92+
android:layout_margin="10dp"
93+
android:background="@drawable/edit_text_bg"
94+
android:gravity="center_vertical|left"
95+
android:hint="http://www.oinux.com"
96+
android:padding="6dp"
97+
android:singleLine="true" />
98+
99+
<LinearLayout
100+
android:layout_width="match_parent"
101+
android:layout_height="wrap_content"
102+
android:layout_marginLeft="10.0dip"
103+
android:layout_marginRight="10.0dip"
104+
android:orientation="vertical" >
105+
106+
<LinearLayout
107+
android:layout_width="match_parent"
108+
android:layout_height="wrap_content"
109+
android:orientation="horizontal" >
110+
111+
<CheckBox
112+
android:id="@+id/css_check"
113+
android:layout_width="0dp"
114+
android:layout_height="wrap_content"
115+
android:layout_weight="1"
116+
android:button="@drawable/btn_check"
117+
android:checked="true"
118+
android:paddingLeft="5dp"
119+
android:text="*.css"
120+
android:textColor="#ffffff"
121+
android:textSize="15sp" />
122+
123+
<CheckBox
124+
android:id="@+id/js_check"
125+
android:layout_width="0dp"
126+
android:layout_height="wrap_content"
127+
android:layout_weight="1"
128+
android:button="@drawable/btn_check"
129+
android:checked="true"
130+
android:paddingLeft="5dp"
131+
android:text="*.js"
132+
android:textColor="#ffffff"
133+
android:textSize="15sp" />
134+
135+
<CheckBox
136+
android:id="@+id/png_check"
137+
android:layout_width="0dp"
138+
android:layout_height="wrap_content"
139+
android:layout_weight="1"
140+
android:button="@drawable/btn_check"
141+
android:checked="true"
142+
android:paddingLeft="5dp"
143+
android:text="*.png"
144+
android:textColor="#ffffff"
145+
android:textSize="15sp" />
146+
147+
<CheckBox
148+
android:id="@+id/gif_check"
149+
android:layout_width="0dp"
150+
android:layout_height="wrap_content"
151+
android:layout_weight="1"
152+
android:button="@drawable/btn_check"
153+
android:checked="true"
154+
android:paddingLeft="5dp"
155+
android:text="*.gif"
156+
android:textColor="#ffffff"
157+
android:textSize="15sp" />
158+
</LinearLayout>
159+
160+
<LinearLayout
161+
android:layout_width="match_parent"
162+
android:layout_height="wrap_content"
163+
android:layout_marginTop="10dp"
164+
android:orientation="horizontal" >
165+
166+
<CheckBox
167+
android:id="@+id/jpg_check"
168+
android:layout_width="wrap_content"
169+
android:layout_height="wrap_content"
170+
android:button="@drawable/btn_check"
171+
android:checked="true"
172+
android:paddingLeft="5dp"
173+
android:text="*.jpg"
174+
android:textColor="#ffffff"
175+
android:textSize="15sp" />
176+
</LinearLayout>
177+
</LinearLayout>
178+
179+
<Button
180+
android:id="@+id/clone_btn"
181+
android:layout_width="match_parent"
182+
android:layout_height="wrap_content"
183+
android:layout_marginBottom="20dp"
184+
android:layout_marginLeft="10.0dip"
185+
android:layout_marginRight="10.0dip"
186+
android:layout_marginTop="18.0dip"
187+
android:background="@drawable/button"
188+
android:gravity="center"
189+
android:padding="14.0dip"
190+
android:text="开始克隆"
191+
android:textColor="#ffffffff"
192+
android:textSize="20sp"
193+
android:textStyle="bold" />
194+
195+
<TextView
196+
android:id="@+id/http_clone_log"
197+
android:layout_width="match_parent"
198+
android:layout_height="wrap_content"
199+
android:background="@android:color/transparent"
200+
android:padding="10dp"
201+
android:text=""
202+
android:textSize="15sp" />
203+
</LinearLayout>
204+
</ScrollView>
205+
206+
</LinearLayout>

res/layout/mitm_select.xml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,5 +136,40 @@
136136
android:textColor="#ffffffff"
137137
android:textSize="14.0dip" />
138138
</RelativeLayout>
139+
140+
<View
141+
android:layout_width="match_parent"
142+
android:layout_height="1dp"
143+
android:background="#000000" />
144+
145+
<RelativeLayout
146+
android:id="@+id/mitm_select_monitor"
147+
android:layout_width="match_parent"
148+
android:layout_height="wrap_content"
149+
android:background="#ff171c20"
150+
android:gravity="left"
151+
android:visibility="gone"
152+
android:orientation="horizontal"
153+
android:padding="10.0dip" >
154+
155+
<TextView
156+
android:id="@+id/mitm_select_monitor_head"
157+
android:layout_width="match_parent"
158+
android:layout_height="wrap_content"
159+
android:gravity="left"
160+
android:paddingTop="4.0dip"
161+
android:text="上网监控"
162+
android:textColor="#ffffffcc"
163+
android:textSize="20sp" />
164+
165+
<TextView
166+
android:layout_width="match_parent"
167+
android:layout_height="wrap_content"
168+
android:layout_below="@id/mitm_select_monitor_head"
169+
android:gravity="bottom|left|center"
170+
android:text="监控目标主机上网,跟踪浏览器"
171+
android:textColor="#ffffffff"
172+
android:textSize="14.0dip" />
173+
</RelativeLayout>
139174

140175
</LinearLayout>

res/values/color.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<color name="log_info">#FFFFCC</color>
4+
<color name="log_warn">#CC9966</color>
5+
<color name="log_error">#FF6666</color>
6+
</resources>

src/com/oinux/lanmitm/HostAdapter.java renamed to src/com/oinux/lanmitm/adapter/HostAdapter.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.oinux.lanmitm;
1+
package com.oinux.lanmitm.adapter;
22

33
import java.util.List;
44

@@ -8,6 +8,9 @@
88
import android.widget.BaseAdapter;
99
import android.widget.TextView;
1010

11+
import com.oinux.lanmitm.R;
12+
import com.oinux.lanmitm.R.id;
13+
import com.oinux.lanmitm.R.layout;
1114
import com.oinux.lanmitm.entity.LanHost;
1215

1316
public class HostAdapter extends BaseAdapter {

0 commit comments

Comments
 (0)