"Confidence, without a doubt. However, don't confuse cockiness with confidence. I, unfortunately, have been sometimes been attracted to cocky guys who I thought were just extremely confident. However, shy guys do have an advantage; they are not big flirts and are more serious and mature in nature."
Wow... I agree with EVERY WORD that you said. I'm also going to add that there's a difference (sometimes) between shy guys and guys with low self-esteem. Some guys are simply quiet and less likely to expose their real selves... but are completely comfortable with who they are. They're confident, but just don't open themselves up. On the other hand, there are some very outgoing/"cocky" guys who are, in reality, completely insecure. They use their "cockiness" to mask their true insecurities.