Monday, September 27, 2010

Institute of political Leadership

Hi

This post is just to remember that there is institute for political leadership. :)

cool isn't it.

http://www.iplindia.in/

Sunday, September 12, 2010

Lives we are making Simple / Complicated

I have to go to office in morning and i am writing this post as i am not able to sleep :(


Have you ever thought that why we work.......other than Salary .. What value we are adding to this world by working. May be are trying to make things better and simpler, and in order to do that in most efficient (in term of cost\time ) we are making things more complex.

I am a System Admin, right now handling a Application support.  Application which supports developers to manage there code and help project manager to plan for projects.

These developers are writing code for their clients may be banking , telecom , those companies are again working to provide me better services and see what, indirectly am doing all for my comfort.

This circle made me understand a lot of things that if i will not give good service i am not going to get good service. 


But am i really in comfort am i actually enjoying life, am i really earn to live, seems like i am living to earn.
Life seems to be like an race, we humans are again living like animals prisoners to our schedule.

Some time i really think about life in past, we have been trying to make out lives better, are we successful enough to do this, are we living a better life, writing this blog sitting on my laptop gives me feel definitely things have changed and are much better from past, than why it happens that feeling of fulfillment is not there, there are something missing, something incomplete.

If only i was again a 6 Year old child and make excuse of stomach ace for not going to school. :(

Wednesday, September 8, 2010

Start a Political party

Here are the things which can be implemented to start a political party. I am writing this because of my low memory. Idea's flash in my mind and than they disappear as they were never there.  I as such don't have intention of starting a political party but i think things mentioned over here are surly going to work to win you at least one election later on all depends upon the work you do.

=> People are fed of system and 50% of India doesn't VOTE. NEVER ASK THEM TO VOTE FOR YOU rather ask them to just VOTE. Start a campaign in which ask people to VOTE, ask them to join you in movement to choose a right candidate and there should be a option of choosing NO candidate. Change and reforms in Elections is 1st thing, bring this in front of people. In your campaign publish 49-O as much as possible.

try to convince people not to give vote in influence of liquor or money offered.
=> Never made any promises, people don't have faith in promises.
=>Stand against reservation this will bring a big vote bank. tell them you will not give them bread but skills by which they can earn bread.
=>Publish bio-data of your candidates not the pictures, tell them how successful they already are in there lives, you need to convey that they are not in politics for money and power. Publish there wealth assets on your website.

=>ask for donation and funds to make them believe that you don't have corporate support with you.
=> Pitch for change in there social life conditions.
=> Bring issue that how politicians make rules and laws for common men which do not implement on them. Bring example of BRT corridor. Tell them your party workers will move in same lanes in which they are moving.
=> Justice delayed is Justice denied - tell them you are going to bring reforms in our courts. (THIS IS THE BIGGEST POINT TO CASH ON)
=>RTI will be available over phone.
=> your local constituency expenses made available to all in a form of news paper to all once in 6 months.
=>MCD complaints will handled over phone, all pit holes to filled in 48 hrs of reporting.
=> bring as much as local issues to pictures which effect the common men directly.
=>Common men (Middle class) people are the key to WIN elections.
=> Just don't tell what are you going to do tell people how you are going to do that. (People don;t believe un-realistic promises)

* You need to find people who can fund you for TV advertisement.
* You need to find people you will stand with you fight elections with you.

Thursday, September 2, 2010

Monday, August 23, 2010

blocking telnet on active port

 Telnet can connect to any server that utilizes TCP on any port by simply specifying the desired port after the address.  This can be quite useful for troubleshooting, as you can see the raw reply (or lack of connection) without the interpretation of the typical client.

The short answer is no, it is not possible to DIRECTLY block this type of connection.  It is possible to block some types of traffic based upon the IP protocol being used.  A common example is to block ping requests by refusing ICMP traffic.  In this case, ICMP is the protocol used over IP.  The IP header has a flag that indicates the traffic is ICMP and the type of ICMP request.  Either or both of these can be examined by a
firewall to determine what action should be taken, so it is a very simply matter to drop or refuse all ICMP traffic or just ping requests.

Telnet and HTTP both use TCP protocol over IP (as well as many other services).  There is nothing in a telnet header that distinguishes it from a HTTP header or any other TCP traffic.  You must either allow TCP traffic to a port or deny it.  With this in mind, if you want to allow HTTP traffic on port 80, you must accept all TCP connections on that port.

Once the connection is made, there are some things in the actual data that would indicate that the connection is coming from a telnet client instead of a http client.  Most notably, the initial data from a telnet client will be sent one character per packet, maybe two if you type really fast.  In contrast, a traditional http client will sent complete http request in one or two packets starting with the third packet of the connection.  

It would be fairly simple to detect the small packets with some firewalls and kill the connection.  This is not really blocking the connection, as you would have to allow the initial connection to get at the subsequent data, but it would have the effect of disallowing connections from a telnet client.  Another method would be to filter the first few packets and kill connections that do not have some of the key elements of a proper http request.

A better method would be to configure the http server to refuse connections from clients that do not provide a proper http header.  It certainly is possible to send a reasonable header from telnet, but it would involve a bit of very accurate typing.  Cumbersome at the very least.  In this case, as with the other method the TCP connection is technically allowed, but nothing in the way of meaningful data is passed.

I don't really see much point in blocking this type of traffic.  Telnet to a non-telnet server can be a useful diagnostic tool, not much use for anything else as the connection is closed after each exchange.





_______________________________________


"Hi, is it possible to block telnet access to a port that is eg listening on port 80."

No---telnet access exists on any port---you would have to block access to that specific port (acl).

"If a service is listening on a port will you always be able to telnet to it?"

Not necessarily "listening" on it, per se, but simply if the port is open and/or enabled, then yes---telnet ability always exists. To separate confusion...

Telnetting into a device on its native port (23) allows a remote console session.

Telnetting into a device by redirecting the port to a different port verifies layers 1-7 connectivity---telnet in general tests all 7 layers of the OSI model.

Thursday, August 19, 2010

SVN Pre -commit script example. Deny commit if no comment or it is less than 10 caracters

This script will deny commit if there is no comment or comment is less than 10 characters.




########################################
REPOS="$1"
TXN="$2"
min=10






comment_entered=`svnlook log -t $TXN $REPOS`




comment_lenght=`echo $comment_entered  | wc -c | tr -d ' '`


if [ "$comment_lenght" -lt "$min" ]; then
 echo "" 1>&2
  echo "*** Your commit has been blocked because you did not give any log message or your log message was less than 10 caracters." 1>&2
  echo "Please write a log message describing the purpose of your changes and then try committing again." 1>&2
  exit 1
else
  exit 0
fi

##################################


You can copy paste above content in /svnroot/yourepo/hook/pre-commit . Good thing is that you don;t even need to make any changes in this script. 

Enjoy 

Amit ......


Wednesday, August 18, 2010

SVN post commit Hook script to send mail when there is a commit.

*********
-> Go to repository hook directory like /svn/yourepo/hook
-> now copy post-commit.tmpl to post-commit
-> Now edit post-commit to call another script which will executed after every commit.
 Enter these lines in post-commit file
REPOS="$1"

REV="$2"

nohup /svn/yourrepo/hooks/script.sh $REPOS $REV >> logfile &

Save this file and make a new file with name script.sh

**************************
Now content of this file will be.

********************************************
#!/bin/sh




REPOS="$1"

REV="$2"



echo >/svn/yourrepo/hooks/mailcontent.txt



REPO_URL_TO_MATCH1="path of branch"



AUTHOR=`svnlook -r $REV author $REPOS`

RESULT1=`svnlook dirs-changed "$REPOS" -r $REV
grep -e "$REPO_URL_TO_MATCH1"`;

echo "Result1 is : $RESULT1";



DATE=`date`;



for pattern in $RESULT1

do

if [ ! -z "$pattern" ];

then

echo "Revision $REV committed on $REPOS" > /svn/yourrepo/hooks/mailcontent.txt

echo "Date: $DATE" >> /svn/yourrepo/hooks/mailcontent.txt

echo "Committer: $AUTHOR" >> /svn/yourrepo/hooks/mailcontent.txt

echo "Repository: $REPOS" >> /svn/yourrepo/hooks/mailcontent.txt

echo "COMMIT MESSAGE:" >> /svn/yourrepo/hooks/mailcontent.txt

echo "----------------" >> /svn/yourrepo/hooks/mailcontent.txt

svnlook log -r $REV $REPOS >> /svn/yourrepo/hooks/mailcontent.txt

echo "CHANGED FILES:" >> /svn/yourrepo/hooks/mailcontent.txt

echo "$pattern" >> /svn/yourrepo/hooks/mailcontent.txt

svnlook changed -r $REV $REPOS >> /svn/yourrepo/hooks/mailcontent.txt

mail -s "New Commit - $REPOS" mail_id@example.com -- -rsendermailid@example.com < /svn/yourrepo/hooks/mailcontent.txt

#rm -rf $MSG

fi

done

*******************************************
TAG
 
Example Hook script
 
-> Hook script to send mail on commit
-> SVN commit hook