Lưu trữ

Archive for the ‘Uncategorized’ Category

dotProject error: query failed about username

Tháng Mười Một 12, 2009 vuau Phản hồi đã bị khóa

http://forums.dotproject.net/showthread.php?t=9290

 

EDIT: Fixed in stable_2 as of revision 5798.

When users try to reply to a forum post the system throws an SQL error.

It is happening because a user_id is not being delimited with quotes.

Here is the message we see…

Quote:
ERROR: /home/mysite/public_html/zzzproj/classes/query.class.php(623): query failed(SELECT contact_first_name, contact_last_name FROM ( `users` ) LEFT JOIN `contacts` AS con ON contact_id = user_contact WHERE user_username LIKE ‘tofjohn’ OR user_id = tofjohn) – error was: Unknown column ‘tofjohn’ in ‘where clause’

My Analysis: WHERE user_username LIKE ‘tofjohn’ OR user_id = tofjohn) – error was: Unknown column ‘tofjohn’ in ‘where clause’
should have parameter for user_id quoted as in… OR user_id = ‘tofjohn’)

Quote:
Backtrace:
0 /home/mysite/public_html/zzzproj/classes/query.class.php:623 dprint(‘/home/mysite/public_html/zzzproj/classes/query.class.php’,623,0,’query failed(SELECT contact_first_name, contact_last_name FROM ( `users` ) LEFT JOIN `contacts` AS con ON contact_id = user_contact WHERE user_username LIKE \’tofjohn\’ OR user_id = tofjohn) – error was: Unknown column \’tofjohn\’ in \’where clause\”)
1 /home/mysite/public_html/zzzproj/classes/query.class.php:645 exec(2)
2 /home/mysite/public_html/zzzproj/includes/main_functions.php:193 loadList()
3 /home/mysite/public_html/zzzproj/modules/forums/post_message.php:139 dPgetUsername(‘tofjohn’)
4 /home/mysite/public_html/zzzproj/modules/forums/viewer.php:83 include(‘/home/mysite/public_html/zzzproj/modules/forums/post_message.php’)
5 /home/mysite/public_html/zzzproj/index.php:299 require(‘/home/mysite/public_html/zzzproj/modules/forums/viewer.php’)
<\pre>

I tried to find a fix by looking at query.class.php and found the make_where_clause function, but looks like the problem comes somewhere before that. Will keep looking thru more source…

Current versions of system are in my sig.

 

fix:

/* $q->addWhere(“user_username LIKE ‘$user’ OR user_id = ” . $user); */
$q->addWhere(‘user_username LIKE \”.$user.”‘”);

Categories: Uncategorized Thẻ:

Học tiếng anh qua Video với podEnglish on Youtube

Tháng Mười 16, 2009 vuau Phản hồi đã bị khóa

http://www.youtube.com/user/podEnglish

Categories: Uncategorized Thẻ:

Phần mềm: Vertrigo – Lỗi không khởi động được Mysql vì cổng 3306 đã được dùng

Tháng tám 29, 2009 vuau Phản hồi đã bị khóa

If you are using Windows Vista, right click your Vertrigo shortcut and select “Run as Administrator.”

Categories: kinh nghiệm, mạng

trang web Học tiếng anh bằng hình ảnh và video

Tháng Bảy 21, 2009 vuau Phản hồi đã bị khóa

http://www.learnenglish.de
http://engleo.com/

Categories: Uncategorized Thẻ:

tu dien wordnet tren linux

Tháng Sáu 27, 2009 vuau Phản hồi đã bị khóa

from: http://forum.vnoss.org/topic5597.html

Trên WinXP, Stardict được tích hợp sẵn bộ từ điển Wordnet của Princeton University. khi tra một từ, nó hiển thị nghĩa theo kiểu đồ hoạ chuyển động trông rất bắt mắt. Nhưng trên Linux thì không có. Các bác nếu ai chưa có thì download WordNet-3.0.0 tại [erl=http://prdownloads.sourceforge.net/stardict/stardict-wordnet-3.0.0.tar.bz2?download]đây[/erl] và dùng lệnh :

tar -xjvf stardict-wordnet-3.0.0.tar.bz2
mv stardict-wordnet-3.0.0 /usr/share/stardict/dict

khởi động lại Stardict là dùng được.

Categories: Uncategorized

Các trang học liệu mở ở Việt Nam

Tháng Ba 1, 2009 vuau Phản hồi đã bị khóa
Categories: Uncategorized

gian nan câu chuyện reset modem viettel

Tháng tám 16, 2008 vuau Phản hồi đã bị khóa

Quên mất password admin của cái modem Data Router của mấy chú lính Vịt teo . Đành phải reset thôi. Dùng “Nhất tăm chỉ” chọt đít modem, giữ cả 1 phút mà nó hok tắt đèn. Quái lạ…Bóp bụng mà  Call cho mấy em ở bên hỗ trợ kĩ thuật của vịt teo hỏi thử. Hai lần đầu gặp 2 em giọng dễ xương: “anh lấy cây tăm chọt vô cái lỗ ở sau modem ấy ạ”, “phải chọt hai lần mới đc ạ”, “chắc anh chọt không đúng lỗ rồi :D “…”sao anh lại đổi pass mặc định của modem làm gì, có thể bị hư modem đó” ..Lạy trời, còn dọa khách hàng nữa cơ đấy ^^. Cuối cùng thì một anh kĩ thuật chính hiệu ra tiếp chuyện: ” cái loại này anh phải ấn cây tăm vô cái lỗ đó, bấm nút tắt nguồn trong khi vẫn giữ cây tăm, sau đó bật lại nguồn cho tới khi đèn sáng hết mới bỏ cây tăm ra…” Hic, lần này thì làm đc rồi. Ai ngờ cái modem vịt teo lại rắc rối đến thế. Đúng là hàng của bộ đội cụ hồ có khác…^^

Categories: Uncategorized

Thực hành SQL injection trên localhost

Tháng Sáu 13, 2008 vuau 1 comment

Mọi người Download file này về và chạy trên localhost (nếu sợ có mã độc thì có thể xem mã nguôn trước).

Hướng dẫn bypass và lấy user+pass của members trong CSDL của trang mắc lỗi:

Để có thể hiểu được nội dung của bài thực hành này. Bạn cần có hiểu biết chút ít về câu lệnh SQL và một đầu óc biết duy luận.
Bạn mở IE (hoặc FF – FireFox) lên gõ vào địa chỉ: http://localhost/login.php?install=1 để cài đặt CSDL. Read more…

Categories: Uncategorized

Hải âu

Tháng Sáu 12, 2008 vuau Phản hồi đã bị khóa

Cô gái đã ngồi hàng giờ trên cát trắng. Trời xanh mênh mông, in trên mặt biển một màu nước biếc. Những cánh chim hải âu sải cánh chao nghiêng. Một vài con đậu xuống trên mặt cát, ngay sát cạnh chân cô. Lũ chim không lạ người, chúng mổ cái gì đó trên cát, và rồi lại vỗ cánh bay lên. Read more…

Categories: Uncategorized

HBH Basic Web 5: Beat Asterix-Protect

Tháng Ba 12, 2008 vuau Phản hồi đã bị khóa

In basic web mission 5 on Hellbound Hackers, a (fictional) new project, called Asterix-Protect, is implemented: [sic]

Welcome to Asterix-Protect

Asterix-Protect is an email search system that uses this new type of Asterix database to match your search and uses the same type of form like a login. And Asterix-Protect its a login system which also uses this advanced type Asterix database to match your username:password, this is a project that just started… If something is wrong or you have found a bug in our product, please contact us at problems@Asterix-Protect.org.

This means that you will have to find out someone’s username and password and log in. From the mission text, you see that the username is the email adress, and the username and password are separated with a colon (:). As always, begin with checking the source code. You will discover a very revealing comment:

<!--attention admin: * is a wildcard -->

The asterisk (*) can be used as a wildcard. Hackers have always been fond of puns, and that’s probably what the Asterix-Protect system got its name from. Try logging in with an auto-matched email-adress and an automatically matched password using the asterisk wildcards:

*@*:*

Mission accomplished.

Categories: Uncategorized