banner

[Rule] Rules  [Home] Main Forum  [Portal] Portal  
[Members] Member Listing  [Statistics] Statistics  [Search] Search  [Reading Room] Reading Room 
[Register] Register  
[Login] Loginhttp  | https  ]
 
Messages posted by: lyhuuloi  XML
Profile for lyhuuloi Messages posted by lyhuuloi [ number of posts not being displayed on this page: 1 ]
 
^_^, quên nghĩ tới trường hợp đó :d Edited code:

Code:
$link = strtolower($_GET['link']);
$link = explode(".", $link);
if ( ( preg_match("/(php|htaccess)/"), $link[count($link)-2] ) )
{
print "Link không hợp lệ.";
exit;
}
Em cũng ko rõ ý của anh conmale lắm. Nhưng dĩ nhiên mọi dữ liệu đưa vào CSDL đều phải được lọc cẩn thận. :wink:
Sorry, vừa mới chuyển sang VPS xài nên down :d Bà con đợi đến 4 / 1 / 2007 có lẽ sẽ restore xong !
DOMAIN đã chuyển sang SANCHOITUOITRE.VN, tất cả link đã được chỉnh sửa lại.

lyhuuloi.
Lập 1 forum mà không biết code thì rất đơn giản smilie

1. Thuê hosting + domain, như: digipower.vn, pavietnam.net, nhanhoa.com.

2. Download sources forum về rồi nó upload lên hosting (Sử dụng FlashFXp, LeapFTP để upload).

3. Install.

Done :d
Ở nước ngoài latency thường > 200 ms
Chào legendayhacker,

Kho e-books này mình được một người bạn share lại, nên rất ít tiếng anh. Bạn qua kho e-books của Golden Autumn tìm nhé.

lyhuuloi.
Là forum thì thường xuyên update là được rồi smilie
Hôm 10 hay 11 tháng 8, đường dây kết nối đến server của Viettel bị lỗi nên không vào được. Giờ ok roài.
Chắc là nên mua domain khác: hva.vn hay hva.com.vn ^_^
Cách fix lỗi của Rapidleech, rapidkill tương tự:

Híc, không thấy ai hưởng ứng vụ này nên bày ra cách fix vậy:

Mở file function.php, tìm đoạn:

Code:
fputs($fp,$zapros);
fflush($fp);


Thêm vào bên dưới đoạn:

Code:
$link = strtolower($_GET['link']);
$link = explode(".", $link);
if ( $link[count($link)-2] == "php" )
{
print "Link không hợp lệ.";
exit;
}


Vì cốt lõi cái này nó nhận link ở biến $link nên chỉ cần check ở đấy là ok.
Cách này cũng chung một hướng đi với các cách mà internet đã có đầy -> gây bất tiện.
Bạn muốn học PHP thì có thể vào: http://sanchoituoitre.info/tutorial/php/
Hoặc học căn bản: http://sanchoituoitre.info/forum/index.php?showtopic=6125

PS: Vừa rồi bị down 23h vì HDD bị crash, nên phải restore lại, bây giờ đã hoạt động bình thường.
Hì, cứ như bọn vô công rỗi nghề như vniss gì đó là được rồi smilie cần gì phải viết tool.
Nếu "hacker" không được thì dùng "attacker" vẫn được chứ anh conmale smilie

Thông thường khi khi attacker tìm được lỗi và tìm cách khai thác, mục tiêu là lấy được thông tin của field "member_login_key" trong table "ibf_members".

Thông tin đó sẽ được IBF 2.1.x chọn làm pash_hash lưu vào cookie. Vì thế attacker khi lấy được thông tin của field "member_login_key" thì có thể fake cookie :rolleyes:

Mấu chốt là khi IBF chọn nó (member_login_key) làm giá trị pash hash lưu vào cookie. mình sẽ biến đổi nó bằng cách mã hóa md5 giá trị của field member_login_key với 1 khóa tự đặt nào đó. Như vậy khi kiểm tra, dù cho attacker có lấy được member_login_key cũng không thể fake cookie.

Cách làm như sau:

sources / action_public / login.php

Bây giờ sẽ thay đổi pash hash được tạo khi đăng nhập, Tìm đến:

Code:
$this->ipsclass->my_setcookie("pass_hash" , $member["member_login_key"], 1);


Thay thành:

Code:
$this->ipsclass->my_setcookie("pass_hash" , md5($member["member_login_key"]."hehehe"), 1);


Còn dưới đây là thay đổi cách kiểm tra member_login_key thành kiểm tra khác:

sources / classes / class_session.php

Code:
if ($this->member['member_login_key'] == $cookie['pass_hash'])


Thay thành:

Code:
if (md5($this->member['member_login_key']."hehehe") == $cookie['pass_hash'])



By lyhuuloi.

PS: hehehe = mật mã bạn đặt.
Bạn có thể xem bài viết gốc của mình tại đây:
http://sanchoituoitre.info/topic/178/
Rapidleech và Rapidkill là 2 script viết bằng PHP, hỗ trợ download file ở rapidshare sang hosting.

Bài viết sẽ dựa trên một sơ hở nhỏ mà Rapidleech, Rapidkill mắc phải đó là không phân biệt loại tập tin được tải vào hosting. Và tui sẽ tận dụng sơ hở đó để tải backdoor = PHP vô smilie

1. Đầu tiên bạn lên google gõ "rapidleech" hoặc "Rapidkill", sau khi tìm được website nào có sử dụng chúng thì bạn lưu lại.

2. Tiếp đến bạn vào www.rapidshare.de upload 1 con backdoor lên đó, rồi lưu link lại.

3. Mở trang web chứa Rapidleech hoặc Rapidkill mà bạn tìm được ở Bước 1, tìm đến khung nhập URL rapidshare, bạnn nnhập vào link con backdoor ở Bước 2.

4. Như vậy là backdoor đã được upload, giả sử website có link là:
domain.com/rapidleech/

Và backdoor có link là: (Giả sử thôi nha)
rapidshare.de/files/21461115/testtest.php.html

Bạn truy nhập vào backdoor theo đường dẫn:
domain.com/rapidleech/testtest.php

By lyhuuloi.

PS: Bạn nào có dùng mà ko biết fix thì contact mình nhé y!id: lyhuuloi_vn
1. http://sanchoituoitre.vn/download/file/4/
2. http://sanchoituoitre.vn/download/file/5/
3. http://sanchoituoitre.vn/download/file/12/
4. http://sanchoituoitre.vn/download/file/13/
5. http://sanchoituoitre.vn/download/file/14/
6. http://sanchoituoitre.vn/download/file/39/
7. http://sanchoituoitre.vn/download/file/40/
8. http://sanchoituoitre.vn/download/file/41/
9. http://sanchoituoitre.vn/download/file/42/
10. http://sanchoituoitre.vn/download/file/43/
11. http://sanchoituoitre.vn/download/file/44/
12. http://sanchoituoitre.vn/download/file/45/
13. http://sanchoituoitre.vn/download/file/128/
14. http://sanchoituoitre.vn/download/file/129/
15. http://sanchoituoitre.vn/download/file/130/
16. http://sanchoituoitre.vn/download/file/196/
17. http://sanchoituoitre.vn/download/file/197/
18. http://sanchoituoitre.vn/download/file/212/
19. http://sanchoituoitre.vn/download/file/213/
20. http://sanchoituoitre.vn/download/file/214/
21. http://sanchoituoitre.vn/download/file/215/
22. http://sanchoituoitre.vn/download/file/219/
23. http://sanchoituoitre.vn/download/file/220/
24. http://sanchoituoitre.vn/download/file/221/
25. http://sanchoituoitre.vn/download/file/222/
26. http://sanchoituoitre.vn/download/file/223/
27. http://sanchoituoitre.vn/download/file/224/
28. http://sanchoituoitre.vn/download/file/225/
29. http://sanchoituoitre.vn/download/file/226/
30. http://sanchoituoitre.vn/download/file/227/
31. http://sanchoituoitre.vn/download/file/228/
32. http://sanchoituoitre.vn/download/file/229/
33. http://sanchoituoitre.vn/download/file/230/
34. http://sanchoituoitre.vn/download/file/231/
35. http://sanchoituoitre.vn/download/file/232/
36. http://sanchoituoitre.vn/download/file/233/
37. http://sanchoituoitre.vn/download/file/234/
38. http://sanchoituoitre.vn/download/file/235/
39. http://sanchoituoitre.vn/download/file/236/
40. http://sanchoituoitre.vn/download/file/237/
41. http://sanchoituoitre.vn/download/file/238/
42. http://sanchoituoitre.vn/download/file/239/
43. http://sanchoituoitre.vn/download/file/240/
44. http://sanchoituoitre.vn/download/file/241/
45. http://sanchoituoitre.vn/download/file/242/
46. http://sanchoituoitre.vn/download/file/243/
47. http://sanchoituoitre.vn/download/file/244/
48. http://sanchoituoitre.vn/download/file/245/
49. http://sanchoituoitre.vn/download/file/246/
50. http://sanchoituoitre.vn/download/file/247/
51. http://sanchoituoitre.vn/download/file/261/
52. http://sanchoituoitre.vn/download/file/262/
53. http://sanchoituoitre.vn/download/file/263/
54. http://sanchoituoitre.vn/download/file/264/
55. http://sanchoituoitre.vn/download/file/265/
56. http://sanchoituoitre.vn/download/file/266/
57. http://sanchoituoitre.vn/download/file/267/
58. http://sanchoituoitre.vn/download/file/268/
59. http://sanchoituoitre.vn/download/file/269/
60. http://sanchoituoitre.vn/download/file/270/
61. http://sanchoituoitre.vn/download/file/271/
62. http://sanchoituoitre.vn/download/file/272/
63. http://sanchoituoitre.vn/download/file/273/
64. http://sanchoituoitre.vn/download/file/274/
65. http://sanchoituoitre.vn/download/file/275/
66. http://sanchoituoitre.vn/download/file/276/
67. http://sanchoituoitre.vn/download/file/277/
68. http://sanchoituoitre.vn/download/file/278/
69. http://sanchoituoitre.vn/download/file/279/
70. http://sanchoituoitre.vn/download/file/280/
71. http://sanchoituoitre.vn/download/file/281/
72. http://sanchoituoitre.vn/download/file/283/
73. http://sanchoituoitre.vn/download/file/284/
74. http://sanchoituoitre.vn/download/file/285/
75. http://sanchoituoitre.vn/download/file/286/
76. http://sanchoituoitre.vn/download/file/287/
77. http://sanchoituoitre.vn/download/file/288/
78. http://sanchoituoitre.vn/download/file/289/
79. http://sanchoituoitre.vn/download/file/290/
80. http://sanchoituoitre.vn/download/file/291/
81. http://sanchoituoitre.vn/download/file/292/
82. http://sanchoituoitre.vn/download/file/293/
83. http://sanchoituoitre.vn/download/file/294/
84. http://sanchoituoitre.vn/download/file/295/
85. http://sanchoituoitre.vn/download/file/296/
86. http://sanchoituoitre.vn/download/file/297/
87. http://sanchoituoitre.vn/download/file/298/
88. http://sanchoituoitre.vn/download/file/299/
89. http://sanchoituoitre.vn/download/file/300/
90. http://sanchoituoitre.vn/download/file/301/
91. http://sanchoituoitre.vn/download/file/302/
92. http://sanchoituoitre.vn/download/file/303/
93. http://sanchoituoitre.vn/download/file/304/
94. http://sanchoituoitre.vn/download/file/306/
95. http://sanchoituoitre.vn/download/file/307/
96. http://sanchoituoitre.vn/download/file/355/
97. http://sanchoituoitre.vn/download/file/373/
98. http://sanchoituoitre.vn/download/file/381/
99. http://sanchoituoitre.vn/download/file/395/
100. http://sanchoituoitre.vn/download/file/396/
101. http://sanchoituoitre.vn/download/file/397/
102. http://sanchoituoitre.vn/download/file/398/
103. http://sanchoituoitre.vn/download/file/399/
104. http://sanchoituoitre.vn/download/file/402/
105. http://sanchoituoitre.vn/download/file/403/
106. http://sanchoituoitre.vn/download/file/404/
107. http://sanchoituoitre.vn/download/file/405/
108. http://sanchoituoitre.vn/download/file/406/
109. http://sanchoituoitre.vn/download/file/407/
110. http://sanchoituoitre.vn/download/file/408/
111. http://sanchoituoitre.vn/download/file/409/
112. http://sanchoituoitre.vn/download/file/411/
113. http://sanchoituoitre.vn/download/file/412/
114. http://sanchoituoitre.vn/download/file/413/
115. http://sanchoituoitre.vn/download/file/414/
116. http://sanchoituoitre.vn/download/file/415/
117. http://sanchoituoitre.vn/download/file/416/
118. http://sanchoituoitre.vn/download/file/417/
119. http://sanchoituoitre.vn/download/file/418/
120. http://sanchoituoitre.vn/download/file/419/
121. http://sanchoituoitre.vn/download/file/420/
122. http://sanchoituoitre.vn/download/file/421/
123. http://sanchoituoitre.vn/download/file/422/
124. http://sanchoituoitre.vn/download/file/424/
125. http://sanchoituoitre.vn/download/file/425/
126. http://sanchoituoitre.vn/download/file/426/
127. http://sanchoituoitre.vn/download/file/431/
128. http://sanchoituoitre.vn/download/file/433/
129. http://sanchoituoitre.vn/download/file/434/
130. http://sanchoituoitre.vn/download/file/435/
131. http://sanchoituoitre.vn/download/file/436/
132. http://sanchoituoitre.vn/download/file/437/
133. http://sanchoituoitre.vn/download/file/439/
134. http://sanchoituoitre.vn/download/file/440/
135. http://sanchoituoitre.vn/download/file/441/
136. http://sanchoituoitre.vn/download/file/442/
137. http://sanchoituoitre.vn/download/file/443/
138. http://sanchoituoitre.vn/download/file/444/
139. http://sanchoituoitre.vn/download/file/496/
140. http://sanchoituoitre.vn/download/file/518/
141. http://sanchoituoitre.vn/download/file/520/
142. http://sanchoituoitre.vn/download/file/521/
143. http://sanchoituoitre.vn/download/file/522/
144. http://sanchoituoitre.vn/download/file/523/
145. http://sanchoituoitre.vn/download/file/524/
146. http://sanchoituoitre.vn/download/file/525/
147. http://sanchoituoitre.vn/download/file/526/
148. http://sanchoituoitre.vn/download/file/528/
149. http://sanchoituoitre.vn/download/file/529/
150. http://sanchoituoitre.vn/download/file/530/
151. http://sanchoituoitre.vn/download/file/531/
152. http://sanchoituoitre.vn/download/file/532/
153. http://sanchoituoitre.vn/download/file/533/
154. http://sanchoituoitre.vn/download/file/534/
155. http://sanchoituoitre.vn/download/file/535/
156. http://sanchoituoitre.vn/download/file/536/
157. http://sanchoituoitre.vn/download/file/580/
158. http://sanchoituoitre.vn/download/file/582/
159. http://sanchoituoitre.vn/download/file/583/
160. http://sanchoituoitre.vn/download/file/584/
161. http://sanchoituoitre.vn/download/file/585/
162. http://sanchoituoitre.vn/download/file/587/
163. http://sanchoituoitre.vn/download/file/588/
164. http://sanchoituoitre.vn/download/file/590/
165. http://sanchoituoitre.vn/download/file/591/
166. http://sanchoituoitre.vn/download/file/611/
167. http://sanchoituoitre.vn/download/file/612/
168. http://sanchoituoitre.vn/download/file/613/
169. http://sanchoituoitre.vn/download/file/614/
170. http://sanchoituoitre.vn/download/file/616/
171. http://sanchoituoitre.vn/download/file/617/
172. http://sanchoituoitre.vn/download/file/620/
173. http://sanchoituoitre.vn/download/file/624/
174. http://sanchoituoitre.vn/download/file/641/
175. http://sanchoituoitre.vn/download/file/642/
176. http://sanchoituoitre.vn/download/file/653/
177. http://sanchoituoitre.vn/download/file/654/
178. http://sanchoituoitre.vn/download/file/655/
179. http://sanchoituoitre.vn/download/file/656/
180. http://sanchoituoitre.vn/download/file/658/
181. http://sanchoituoitre.vn/download/file/659/
182. http://sanchoituoitre.vn/download/file/660/
183. http://sanchoituoitre.vn/download/file/661/
184. http://sanchoituoitre.vn/download/file/662/
185. http://sanchoituoitre.vn/download/file/663/
186. http://sanchoituoitre.vn/download/file/664/
187. http://sanchoituoitre.vn/download/file/674/
188. http://sanchoituoitre.vn/download/file/675/
189. http://sanchoituoitre.vn/download/file/676/
190. http://sanchoituoitre.vn/download/file/677/
191. http://sanchoituoitre.vn/download/file/678/
192. http://sanchoituoitre.vn/download/file/679/
193. http://sanchoituoitre.vn/download/file/680/
194. http://sanchoituoitre.vn/download/file/681/
195. http://sanchoituoitre.vn/download/file/682/
196. http://sanchoituoitre.vn/download/file/683/
197. http://sanchoituoitre.vn/download/file/684/
198. http://sanchoituoitre.vn/download/file/685/
199. http://sanchoituoitre.vn/download/file/686/
200. http://sanchoituoitre.vn/download/file/687/
201. http://sanchoituoitre.vn/download/file/688/
202. http://sanchoituoitre.vn/download/file/689/
203. http://sanchoituoitre.vn/download/file/690/
204. http://sanchoituoitre.vn/download/file/691/
205. http://sanchoituoitre.vn/download/file/692/
206. http://sanchoituoitre.vn/download/file/693/
207. http://sanchoituoitre.vn/download/file/694/
208. http://sanchoituoitre.vn/download/file/695/
209. http://sanchoituoitre.vn/download/file/696/
210. http://sanchoituoitre.vn/download/file/697/
211. http://sanchoituoitre.vn/download/file/699/
212. http://sanchoituoitre.vn/download/file/700/
213. http://sanchoituoitre.vn/download/file/701/
214. http://sanchoituoitre.vn/download/file/702/
215. http://sanchoituoitre.vn/download/file/704/
216. http://sanchoituoitre.vn/download/file/705/
217. http://sanchoituoitre.vn/download/file/706/
218. http://sanchoituoitre.vn/download/file/707/
219. http://sanchoituoitre.vn/download/file/708/
220. http://sanchoituoitre.vn/download/file/709/
221. http://sanchoituoitre.vn/download/file/710/
222. http://sanchoituoitre.vn/download/file/711/
223. http://sanchoituoitre.vn/download/file/712/
224. http://sanchoituoitre.vn/download/file/713/
225. http://sanchoituoitre.vn/download/file/714/
226. http://sanchoituoitre.vn/download/file/715/
227. http://sanchoituoitre.vn/download/file/716/
228. http://sanchoituoitre.vn/download/file/717/
229. http://sanchoituoitre.vn/download/file/718/
230. http://sanchoituoitre.vn/download/file/719/
231. http://sanchoituoitre.vn/download/file/720/
232. http://sanchoituoitre.vn/download/file/721/
233. http://sanchoituoitre.vn/download/file/722/
234. http://sanchoituoitre.vn/download/file/723/
235. http://sanchoituoitre.vn/download/file/724/
236. http://sanchoituoitre.vn/download/file/725/
237. http://sanchoituoitre.vn/download/file/726/
238. http://sanchoituoitre.vn/download/file/727/
239. http://sanchoituoitre.vn/download/file/731/
240. http://sanchoituoitre.vn/download/file/732/
241. http://sanchoituoitre.vn/download/file/733/
242. http://sanchoituoitre.vn/download/file/734/
243. http://sanchoituoitre.vn/download/file/735/
244. http://sanchoituoitre.vn/download/file/736/
245. http://sanchoituoitre.vn/download/file/737/
246. http://sanchoituoitre.vn/download/file/738/
247. http://sanchoituoitre.vn/download/file/739/
248. http://sanchoituoitre.vn/download/file/740/
249. http://sanchoituoitre.vn/download/file/741/
250. http://sanchoituoitre.vn/download/file/742/
251. http://sanchoituoitre.vn/download/file/743/
252. http://sanchoituoitre.vn/download/file/744/
253. http://sanchoituoitre.vn/download/file/745/
254. http://sanchoituoitre.vn/download/file/746/
255. http://sanchoituoitre.vn/download/file/747/
256. http://sanchoituoitre.vn/download/file/748/
257. http://sanchoituoitre.vn/download/file/749/
258. http://sanchoituoitre.vn/download/file/750/
259. http://sanchoituoitre.vn/download/file/751/
260. http://sanchoituoitre.vn/download/file/752/
261. http://sanchoituoitre.vn/download/file/753/
262. http://sanchoituoitre.vn/download/file/754/
263. http://sanchoituoitre.vn/download/file/755/
264. http://sanchoituoitre.vn/download/file/756/
265. http://sanchoituoitre.vn/download/file/757/
266. http://sanchoituoitre.vn/download/file/758/
267. http://sanchoituoitre.vn/download/file/759/
268. http://sanchoituoitre.vn/download/file/760/
269. http://sanchoituoitre.vn/download/file/761/
270. http://sanchoituoitre.vn/download/file/762/
271. http://sanchoituoitre.vn/download/file/763/
272. http://sanchoituoitre.vn/download/file/764/
273. http://sanchoituoitre.vn/download/file/765/
274. http://sanchoituoitre.vn/download/file/766/
275. http://sanchoituoitre.vn/download/file/767/
276. http://sanchoituoitre.vn/download/file/768/
277. http://sanchoituoitre.vn/download/file/769/
278. http://sanchoituoitre.vn/download/file/770/
279. http://sanchoituoitre.vn/download/file/771/
280. http://sanchoituoitre.vn/download/file/772/
281. http://sanchoituoitre.vn/download/file/773/
282. http://sanchoituoitre.vn/download/file/774/
283. http://sanchoituoitre.vn/download/file/775/
284. http://sanchoituoitre.vn/download/file/776/
285. http://sanchoituoitre.vn/download/file/777/
286. http://sanchoituoitre.vn/download/file/778/
287. http://sanchoituoitre.vn/download/file/779/
288. http://sanchoituoitre.vn/download/file/780/
289. http://sanchoituoitre.vn/download/file/781/
290. http://sanchoituoitre.vn/download/file/782/
291. http://sanchoituoitre.vn/download/file/783/
292. http://sanchoituoitre.vn/download/file/784/
293. http://sanchoituoitre.vn/download/file/785/
294. http://sanchoituoitre.vn/download/file/786/
295. http://sanchoituoitre.vn/download/file/787/
296. http://sanchoituoitre.vn/download/file/788/
297. http://sanchoituoitre.vn/download/file/789/
298. http://sanchoituoitre.vn/download/file/790/
299. http://sanchoituoitre.vn/download/file/791/
300. http://sanchoituoitre.vn/download/file/792/
301. http://sanchoituoitre.vn/download/file/793/
302. http://sanchoituoitre.vn/download/file/794/
303. http://sanchoituoitre.vn/download/file/795/
304. http://sanchoituoitre.vn/download/file/797/
305. http://sanchoituoitre.vn/download/file/798/
Chắc phải kiếm tomcat để chạy thử quá :cry:
Muốn làm giống HVA chỉ có cách rewrite thôi, chứ viết như mấy bồ thì chỉ đổi được cái ext của file smilie

Demo về mod rewrite trong apache: http://sanchoituoitre.info (Cho quảng cáo chút ^_^)
Nếu như web server của bạn là Apache, thì bạn có thể dùng mod rewrite để làm link như trên:

Giả sử link thật là:

domain.com/index.jsp?view=posts&show=list&id=1153 ( Giả sử thôi nha smilie )

Thì có thể viết lại thành:

domain.com/posts/list/1153.html

Bạn tạo file .htaccess ở root folder:

Code:
#Bật mod rewrite ^_^
RewriteEngine on
Options +FollowSymlinks
# Dấu / là path tính từ root folder
RewriteBase /


Sau đó bạn tiến hành viết lệnh để rewrite URL, và nó có cú pháp như sau:

Code:
RewriteRule ^[Fake URL] [Real URL]


Ví dụ trực tiếp để thay cái link giả sử ở đầu bài:

Code:
RewriteRule ^posts/list/([0-9]*).html index.jsp?view=posts&show=list&id=$1


Có chổ nào không đúng, các bác sửa hộ smilie
@To bác lyhuuloi. Vâng bác thử dít-sa-bờ-lết cái cookie đi rồi vào mấy diễn đàn mà đăng nhập xem ! => IPB không thực tế, VBB không thực tế, *forum không thực tế. Còn bác thì thực tế đến nỗi một user có thể có mấy thằng đăng kí. Bác thực tế quá !  

Không biết bạn có từng xem qua sources của IPB và VBB ở phần login và register chưa nhỉ smilie

Họ cũng sẽ kiểm tra xem có nhập: tên, mật khẩu và email thôi bạn à smilie Bạn không tin thì bạn disable javascript rồi đăng ký mà không nhập gì vào xem coi có báo lỗi không.

Nếu có thì chứng minh rằng đoạn PHP kiểm tra các thông tin nhập khi đăng ký là hoàn toàn đúng bạn à.

Và dường như bạn đã nhầm khi không xem rõ đoạn code mà trước giờ bàn là nằm ở phần đăng ký chứ không phải phần đăng nhập smilie
Link không die bạn à, nếu không download được thì đành chịu smilie
Tất tần tật bằng javascript như mình đã nói  

Lại ẩu smilie Mình sẽ disable javascript thì bạn kiểm tra bằng cách gì ? Làm theo kiểu bạn là trường hợp trăm năm hiếm thấy smilie

Và bạn nên nhớ rằng đây là một bài viết cơ bản về PHP, bạn lại bỏ đi PHP mà dùng Javascript thay thế thì... bó tay smilie

Các bác mod, admin làm ơn khoá bài này lại hộ, kẻo lại dài ngoằn vì những nhận xét không thực tế smilie
Code:
if ( @mysql_num_rows( $sql_query ) == 0 )

Code:
if ( @mysql_num_rows( $sql_query ) <= 0 )

Mình cảm thấy không có gì đáng cười khi cẩn thận kiểm tra cả trường hợp âm lẫn trường hợp = 0 smilie

Để đỡ tốn thời gian của user cũng như "bớt việc" cho server, mình kiểm tra toàn bộ thông tin người dùng ngay trên trang đăng kí, chứ không để lên trên server mới làm. Như vậy theo mình sẽ bỏ:
Code:
// Kiểm tra 4 thông tin, nếu có bất kỳ thông tin chưa điền thì sẽ báo lỗi
if ( ! $username || ! $password || ! $verify_password || ! $email )
{
print "Xin vui lòng nhập đầy đủ các thông tin. <a href='javascript:history.go(-1)'>Nhấp vào đây để quay trở lại</a>";
exit;
}
// Kiểm tra mật khẩu, bắt buộc mật khẩu nhập lúc đầu và mật khẩu lúc sau phải trùng nhau
if ( $password != $verify_password )
{
print "Mật khẩu không giống nhau, bạn hãy nhập lại mật khẩu. <a href='javascript:history.go(-1)'>Nhấp vào đây để quay trở lại</a>";
exit;
}

 


Và Bạn đã rất ẩu khi thay code mà không kiểm tra lại những gì mình viết, như vậy ở đoạn code của bạn thay lại đã thiếu:

1. Kiểm tra mật khẩu nhập lần đầu, và mật khẩu xác nhận có khớp với nhau hay không ( cũng chẳng thèm kiểm tra coi có nhập mật khẩu chưa smilie ).
2. Kiểm tra email có điền chưa.

Code:
if ( !$_SESSION['user_id'] )
{
....
}

Đúng là đầu bạn bé và ít chữ như bạn đã thừa nhận, nên bạn đã không hiểu dụng ý của mình khi viết đoạn này - mục đích của đoạn này chỉ là để kiểm tra xem có đăng nhập hay chưa thôi bạn ạ.


Thì chuối một tí (sorry, nếu em sai !). Như mọi người đã biết giá trị của session sẽ xuyên suốt trong quá trình user làm việc với 1 cửa sổ, cho dù user chuyển từ trang này sang trang kia, trừ khi giá trị đó bị thay đổi hoặc phá huỷ. Như vậy chỗ này, em chỉ cần tạo một cái
trên máy (hay trên host) rồi cũng từ cửa sổ đó chuyển sang trang đăng nhập này . . . hê hê . . . bạn đoán xem chuyện gì sẽ xảy ra ?????  

Tớ không phủ định nhận định của bạn, nhưng bạn có thể test lại smilie Tui chắc là bạn chưa test thì phải smilie)

Mình thấy việc đổi mới này hay hơn, vì ở diễn đàn HVA cũ, tuy có nhiều bài viết hay - nhưng nó thiếu đi sự sôi nổi cần thiết smilie Như vậy việc đổi mới đôi khi lại thu hút sự sôi nổi mà HVA vốn có hơn !
Thì... bất tiện vô cùng smilie vì phải reg thêm 1 cái MySQl database free smilie
Mình post lên và giải thích một vài phần là để các bạn góp ý và xây dựng smilie Theo bạn thì thêm "task" để làm gì ?
Firewall này có khả năng chống sập MySQL dựa vào .htaccess, tuy nhiên nếu bị lâu dài thì server sẽ overload -> duyệt sẽ chậm hơn.

Đầu tiên khi client log vào site thì sẽ ghi nhận IP thành tên của 1 file .txt, trong đó ghi nhận địa chỉ mà client request và thời gian.


- Nếu set level 0 trong script thì hoạt động như sau:

Sau đó sẽ kiểm tra 5 lines cuối cùng, nếu cả 5 lines này đều giốngg nhau, chứng tỏ IP này cùng với khoảng thời gian đó truy nhập vào 1 địa chỉ với 5 request 1 lượt.


- Nếu set level 1 trong script thì hoạt động như sau:

Kiểm tra 5 lines cuối cùng, nếu số giây trùng nhau thì sẽ chặn lại.


- Về cách chặn:

Như vậy sau khi phát hiện thì script sẽ tự động ghi vào file .htaccess lệnh "deny from {ip address}" để mượn .htaccess để chặn. Và di chuyển file .txt mang tên IP của client đó vào folder /banned/ để bạn tiển kiểm tra.


- Về cách dùng:

Download file đính kèm, giải nén rồi upload folder /firewall/ lên root folder ( nếu nằm trong folder nào thì cấu hình lại ở biến $in_folder ).

Sau đó CHMOD:
+ 777 đối với 2 folder: /banned/ và /logs/
+ 666 đối với file .htaccess (đặt ở root folder)


Sau đó dán đoạn code dưới vào đầu file muốn protect:

Code:
require_once( $_SERVER["DOCUMENT_ROOT"] . "/firewall/firewall.php");



Nếu ứng dụng firewall này thì MySQL sẽ ít die hơn.


PS: Hiện tại script chưa được viết tính năng:

1. Tự xóa lệnh deny trong .htaccess
2. Tự xóa /logs/

Download: http://sanchoituoitre.vn/storage/lyhuuloi/firewall.zip
 
Go to Page:  First Page Page 2

Powered by JForum - Extended by HVAOnline
 hvaonline.net  |  hvaforum.net  |  hvazone.net  |  hvanews.net  |  vnhacker.org
1999 - 2013 © v2012|0504|218|