Posts

Showing posts from November, 2011

Using sed to remove empty lines

sed '/^$/d' myFile > tt  mv tt myFile ref: http://soft.zoneo.net/Linux/remove_empty_lines.php //alak

Fatal error: Cannot access empty property in /var/www/html//regForm_process.php on line 9

This is te code: $i = 1; foreach($_GET as $name->$value) {     echo 'GET '.$i.': '.$name.' and VALUE = '.$value.' ';     $i+=1; } Basically i wanted to get all the variables,a nd assign them as a var to be fed to a mysql insert query. But the code above is jusr P0C. When called/runned, get this error" Fatal error : Cannot access empty property in  /var/www/html/regForm_process.php  on line  9 The fix? easy. change the ' -> ' to become ' => ' As easy as that -______-" Hope this helps someone. /alak

BackTrack 4 sources.list - BT5

For anyone still stuck at BT4 and can't update their apps, use this sources: deb http://all.repository.backtrack-linux.org revolution main microverse non-free testing deb http://32.repository.backtrack-linux.org revolution main microverse non-free testing deb http://source.repository.backtrack-linux.org revolution main microverse non-free testing ref: http://vishnuvalentino.com/computer/10-steps-to-set-up-armitage-in-backtrack-for-penetration-test/ /alak

Python: thread.error: can't start new thread

So the case is this: i have a python script that listens on certain port for a connection, and when a client connects, it acts as a tcp forwarder, forwarding connections accordingly. somehow, the server.py script throws exception after few client.py connection: Unhandled exception in thread started by Traceback (most recent call last):   File "server.py", line 55, in server_thread     thread.start_new_thread(forward_client, (client_socket, server_socket)) thread.error: can't start new thread Damn it! so i do what all people been doing, i Google. From below two URL, i was able to understand the situation and came up with the solution: - http://blog.tsunanet.net/2010/10/threaderror-cant-start-new-thread.html - http://adywicaksono.wordpress.com/2007/07/10/i-can-not-create-more-than-255-threads-on-linux-what-is-the-solutions/ Tsunanet states that memory allocation might be the issue. Sort of like where my RAM is not enough for all the threading happening