Quali porte o servizi sono in ascolto

Se avete un dubbio su quali porte siano in ascolto sulla vostra macchina, server o workstation che, sia ecco qua come fare.
Ricorriamo all’utilizzo di un tool chiamato Nmap, scaricabile sul sito http://nmap.org/. Questo tool è multipiattaforma quindi se volete potete utilizzarlo anche su sistemi Win32.
Nel nostro ambiente Linux Debian procediamo all’installazione di Nmap, nel caso non sia già presente.
Per installarlo utilizziamo il gestore di pacchetti nel nostro caso apt come segue:

apt-get install nmap

Eseguiamo tale Nmap come segue

nmap localhost

Come vedete basta specificare su quale host deve essere effettuata la scansione delle porte. Di conseguenza potete anche capire quali porte sono aperte, e quindi quali servizi sono in ascolto, su una macchina remota.

Eseguendo Nmap senza parametri

nmap

verrà mostrato l’help, con la specifica di tutti i paramentri, attraverso i quali potete specificare la tecnica di scansione, porte specifiche, scanning sul del sistema operativo, il timing e le perfomance della scansione.

Spero di essere stato utile e come al solito scrivetemi per dubbi chiarimenti o correzioni!

, , , , ,

2 Comments

Tabella dei caratteri paricolari nelle pagine html

Se anche voi non vi ricordate mai i codici o i nomi dei caratteri complessi, quando dovete utilizzare tali caratteri in una pagina HTML, ecco a voi la lista completa fornita dal W3C.

Io solitamente utilizzo questa modalità di utilizzo

&[Name];

Esempio

€
è
Name Character Unicode code point Standard DTD Old ISO subset Description
quot U+0022 (34) HTML 2.0 HTMLspecial ISOnum quotation mark (= APL quote)
amp & U+0026 (38) HTML 2.0 HTMLspecial ISOnum ampersand
apos U+0027 (39) XHTML 1.0 HTMLspecial ISOnum apostrophe (= apostrophe-quote); see below
lt < U+003C (60) HTML 2.0 HTMLspecial ISOnum less-than sign
gt > U+003E (62) HTML 2.0 HTMLspecial ISOnum greater-than sign
nbsp U+00A0 (160) HTML 3.2 HTMLlat1 ISOnum no-break space (= non-breaking space)[4]
iexcl ¡ U+00A1 (161) HTML 3.2 HTMLlat1 ISOnum inverted exclamation mark
cent ¢ U+00A2 (162) HTML 3.2 HTMLlat1 ISOnum cent sign
pound £ U+00A3 (163) HTML 3.2 HTMLlat1 ISOnum pound sign
curren ¤ U+00A4 (164) HTML 3.2 HTMLlat1 ISOnum currency sign
yen ¥ U+00A5 (165) HTML 3.2 HTMLlat1 ISOnum yen sign (= yuan sign)
brvbar ¦ U+00A6 (166) HTML 3.2 HTMLlat1 ISOnum broken bar (= broken vertical bar)
sect § U+00A7 (167) HTML 3.2 HTMLlat1 ISOnum section sign
uml ¨ U+00A8 (168) HTML 3.2 HTMLlat1 ISOdia diaeresis (= spacing diaeresis); see German umlaut
copy © U+00A9 (169) HTML 3.2 HTMLlat1 ISOnum copyright sign
ordf ª U+00AA (170) HTML 3.2 HTMLlat1 ISOnum feminine ordinal indicator
laquo « U+00AB (171) HTML 3.2 HTMLlat1 ISOnum left-pointing double angle quotation mark (= left pointing guillemet)
not ¬ U+00AC (172) HTML 3.2 HTMLlat1 ISOnum not sign
shy U+00AD (173) HTML 3.2 HTMLlat1 ISOnum soft hyphen (= discretionary hyphen)
reg ® U+00AE (174) HTML 3.2 HTMLlat1 ISOnum registered sign ( = registered trade mark sign)
macr ¯ U+00AF (175) HTML 3.2 HTMLlat1 ISOdia macron (= spacing macron = overline = APL overbar)
deg ° U+00B0 (176) HTML 3.2 HTMLlat1 ISOnum degree sign
plusmn ± U+00B1 (177) HTML 3.2 HTMLlat1 ISOnum plus-minus sign (= plus-or-minus sign)
sup2 ² U+00B2 (178) HTML 3.2 HTMLlat1 ISOnum superscript two (= superscript digit two = squared)
sup3 ³ U+00B3 (179) HTML 3.2 HTMLlat1 ISOnum superscript three (= superscript digit three = cubed)
acute ´ U+00B4 (180) HTML 3.2 HTMLlat1 ISOdia acute accent (= spacing acute)
micro µ U+00B5 (181) HTML 3.2 HTMLlat1 ISOnum micro sign
para U+00B6 (182) HTML 3.2 HTMLlat1 ISOnum pilcrow sign ( = paragraph sign)
middot · U+00B7 (183) HTML 3.2 HTMLlat1 ISOnum middle dot (= Georgian comma = Greek middle dot)
cedil ¸ U+00B8 (184) HTML 3.2 HTMLlat1 ISOdia cedilla (= spacing cedilla)
sup1 ¹ U+00B9 (185) HTML 3.2 HTMLlat1 ISOnum superscript one (= superscript digit one)
ordm º U+00BA (186) HTML 3.2 HTMLlat1 ISOnum masculine ordinal indicator
raquo » U+00BB (187) HTML 3.2 HTMLlat1 ISOnum right-pointing double angle quotation mark (= right pointing guillemet)
frac14 ¼ U+00BC (188) HTML 3.2 HTMLlat1 ISOnum vulgar fraction one quarter (= fraction one quarter)
frac12 ½ U+00BD (189) HTML 3.2 HTMLlat1 ISOnum vulgar fraction one half (= fraction one half)
frac34 ¾ U+00BE (190) HTML 3.2 HTMLlat1 ISOnum vulgar fraction three quarters (= fraction three quarters)
iquest ¿ U+00BF (191) HTML 3.2 HTMLlat1 ISOnum inverted question mark (= turned question mark)
Agrave À U+00C0 (192) HTML 2.0 HTMLlat1 ISOlat1 Latin capital letter A with grave (= Latin capital letter A grave)
Aacute Á U+00C1 (193) HTML 2.0 HTMLlat1 ISOlat1 Latin capital letter A with acute
Acirc  U+00C2 (194) HTML 2.0 HTMLlat1 ISOlat1 Latin capital letter A with circumflex
Atilde à U+00C3 (195) HTML 2.0 HTMLlat1 ISOlat1 Latin capital letter A with tilde
Auml Ä U+00C4 (196) HTML 2.0 HTMLlat1 ISOlat1 Latin capital letter A with diaeresis
Aring Å U+00C5 (197) HTML 2.0 HTMLlat1 ISOlat1 Latin capital letter A with ring above (= Latin capital letter A ring)
AElig Æ U+00C6 (198) HTML 2.0 HTMLlat1 ISOlat1 Latin capital letter AE (= Latin capital ligature AE)
Ccedil Ç U+00C7 (199) HTML 2.0 HTMLlat1 ISOlat1 Latin capital letter C with cedilla
Egrave È U+00C8 (200) HTML 2.0 HTMLlat1 ISOlat1 Latin capital letter E with grave
Eacute É U+00C9 (201) HTML 2.0 HTMLlat1 ISOlat1 Latin capital letter E with acute
Ecirc Ê U+00CA (202) HTML 2.0 HTMLlat1 ISOlat1 Latin capital letter E with circumflex
Euml Ë U+00CB (203) HTML 2.0 HTMLlat1 ISOlat1 Latin capital letter E with diaeresis
Igrave Ì U+00CC (204) HTML 2.0 HTMLlat1 ISOlat1 Latin capital letter I with grave
Iacute Í U+00CD (205) HTML 2.0 HTMLlat1 ISOlat1 Latin capital letter I with acute
Icirc Î U+00CE (206) HTML 2.0 HTMLlat1 ISOlat1 Latin capital letter I with circumflex
Iuml Ï U+00CF (207) HTML 2.0 HTMLlat1 ISOlat1 Latin capital letter I with diaeresis
ETH Ð U+00D0 (208) HTML 2.0 HTMLlat1 ISOlat1 Latin capital letter ETH
Ntilde Ñ U+00D1 (209) HTML 2.0 HTMLlat1 ISOlat1 Latin capital letter N with tilde
Ograve Ò U+00D2 (210) HTML 2.0 HTMLlat1 ISOlat1 Latin capital letter O with grave
Oacute Ó U+00D3 (211) HTML 2.0 HTMLlat1 ISOlat1 Latin capital letter O with acute
Ocirc Ô U+00D4 (212) HTML 2.0 HTMLlat1 ISOlat1 Latin capital letter O with circumflex
Otilde Õ U+00D5 (213) HTML 2.0 HTMLlat1 ISOlat1 Latin capital letter O with tilde
Ouml Ö U+00D6 (214) HTML 2.0 HTMLlat1 ISOlat1 Latin capital letter O with diaeresis
times × U+00D7 (215) HTML 3.2 HTMLlat1 ISOnum multiplication sign
Oslash Ø U+00D8 (216) HTML 2.0 HTMLlat1 ISOlat1 Latin capital letter O with stroke (= Latin capital letter O slash)
Ugrave Ù U+00D9 (217) HTML 2.0 HTMLlat1 ISOlat1 Latin capital letter U with grave
Uacute Ú U+00DA (218) HTML 2.0 HTMLlat1 ISOlat1 Latin capital letter U with acute
Ucirc Û U+00DB (219) HTML 2.0 HTMLlat1 ISOlat1 Latin capital letter U with circumflex
Uuml Ü U+00DC (220) HTML 2.0 HTMLlat1 ISOlat1 Latin capital letter U with diaeresis
Yacute Ý U+00DD (221) HTML 2.0 HTMLlat1 ISOlat1 Latin capital letter Y with acute
THORN Þ U+00DE (222) HTML 2.0 HTMLlat1 ISOlat1 Latin capital letter THORN
szlig ß U+00DF (223) HTML 2.0 HTMLlat1 ISOlat1 Latin small letter sharp s (= ess-zed); see German Eszett
agrave à U+00E0 (224) HTML 2.0 HTMLlat1 ISOlat1 Latin small letter a with grave
aacute á U+00E1 (225) HTML 2.0 HTMLlat1 ISOlat1 Latin small letter a with acute
acirc â U+00E2 (226) HTML 2.0 HTMLlat1 ISOlat1 Latin small letter a with circumflex
atilde ã U+00E3 (227) HTML 2.0 HTMLlat1 ISOlat1 Latin small letter a with tilde
auml ä U+00E4 (228) HTML 2.0 HTMLlat1 ISOlat1 Latin small letter a with diaeresis
aring å U+00E5 (229) HTML 2.0 HTMLlat1 ISOlat1 Latin small letter a with ring above
aelig æ U+00E6 (230) HTML 2.0 HTMLlat1 ISOlat1 Latin small letter ae (= Latin small ligature ae)
ccedil ç U+00E7 (231) HTML 2.0 HTMLlat1 ISOlat1 Latin small letter c with cedilla
egrave è U+00E8 (232) HTML 2.0 HTMLlat1 ISOlat1 Latin small letter e with grave
eacute é U+00E9 (233) HTML 2.0 HTMLlat1 ISOlat1 Latin small letter e with acute
ecirc ê U+00EA (234) HTML 2.0 HTMLlat1 ISOlat1 Latin small letter e with circumflex
euml ë U+00EB (235) HTML 2.0 HTMLlat1 ISOlat1 Latin small letter e with diaeresis
igrave ì U+00EC (236) HTML 2.0 HTMLlat1 ISOlat1 Latin small letter i with grave
iacute í U+00ED (237) HTML 2.0 HTMLlat1 ISOlat1 Latin small letter i with acute
icirc î U+00EE (238) HTML 2.0 HTMLlat1 ISOlat1 Latin small letter i with circumflex
iuml ï U+00EF (239) HTML 2.0 HTMLlat1 ISOlat1 Latin small letter i with diaeresis
eth ð U+00F0 (240) HTML 2.0 HTMLlat1 ISOlat1 Latin small letter eth
ntilde ñ U+00F1 (241) HTML 2.0 HTMLlat1 ISOlat1 Latin small letter n with tilde
ograve ò U+00F2 (242) HTML 2.0 HTMLlat1 ISOlat1 Latin small letter o with grave
oacute ó U+00F3 (243) HTML 2.0 HTMLlat1 ISOlat1 Latin small letter o with acute
ocirc ô U+00F4 (244) HTML 2.0 HTMLlat1 ISOlat1 Latin small letter o with circumflex
otilde õ U+00F5 (245) HTML 2.0 HTMLlat1 ISOlat1 Latin small letter o with tilde
ouml ö U+00F6 (246) HTML 2.0 HTMLlat1 ISOlat1 Latin small letter o with diaeresis
divide ÷ U+00F7 (247) HTML 3.2 HTMLlat1 ISOnum division sign
oslash ø U+00F8 (248) HTML 2.0 HTMLlat1 ISOlat1 Latin small letter o with stroke (= Latin small letter o slash)
ugrave ù U+00F9 (249) HTML 2.0 HTMLlat1 ISOlat1 Latin small letter u with grave
uacute ú U+00FA (250) HTML 2.0 HTMLlat1 ISOlat1 Latin small letter u with acute
ucirc û U+00FB (251) HTML 2.0 HTMLlat1 ISOlat1 Latin small letter u with circumflex
uuml ü U+00FC (252) HTML 2.0 HTMLlat1 ISOlat1 Latin small letter u with diaeresis
yacute ý U+00FD (253) HTML 2.0 HTMLlat1 ISOlat1 Latin small letter y with acute
thorn þ U+00FE (254) HTML 2.0 HTMLlat1 ISOlat1 Latin small letter thorn
yuml ÿ U+00FF (255) HTML 2.0 HTMLlat1 ISOlat1 Latin small letter y with diaeresis
OElig Œ U+0152 (338) HTML 4.0 HTMLspecial ISOlat2 Latin capital ligature oe[5]
oelig œ U+0153 (339) HTML 4.0 HTMLspecial ISOlat2 Latin small ligature oe[6]
Scaron Š U+0160 (352) HTML 4.0 HTMLspecial ISOlat2 Latin capital letter s with caron
scaron š U+0161 (353) HTML 4.0 HTMLspecial ISOlat2 Latin small letter s with caron
Yuml Ÿ U+0178 (376) HTML 4.0 HTMLspecial ISOlat2 Latin capital letter y with diaeresis
fnof ƒ U+0192 (402) HTML 4.0 HTMLsymbol ISOtech Latin small letter f with hook (= function = florin)
circ ˆ U+02C6 (710) HTML 4.0 HTMLspecial ISOpub modifier letter circumflex accent
tilde ˜ U+02DC (732) HTML 4.0 HTMLspecial ISOdia small tilde
Alpha Α U+0391 (913) HTML 4.0 HTMLsymbol Greek capital letter Alpha
Beta Β U+0392 (914) HTML 4.0 HTMLsymbol Greek capital letter Beta
Gamma Γ U+0393 (915) HTML 4.0 HTMLsymbol ISOgrk3 Greek capital letter Gamma
Delta Δ U+0394 (916) HTML 4.0 HTMLsymbol ISOgrk3 Greek capital letter Delta
Epsilon Ε U+0395 (917) HTML 4.0 HTMLsymbol Greek capital letter Epsilon
Zeta Ζ U+0396 (918) HTML 4.0 HTMLsymbol Greek capital letter Zeta
Eta Η U+0397 (919) HTML 4.0 HTMLsymbol Greek capital letter Eta
Theta Θ U+0398 (920) HTML 4.0 HTMLsymbol ISOgrk3 Greek capital letter Theta
Iota Ι U+0399 (921) HTML 4.0 HTMLsymbol Greek capital letter Iota
Kappa Κ U+039A (922) HTML 4.0 HTMLsymbol Greek capital letter Kappa
Lambda Λ U+039B (923) HTML 4.0 HTMLsymbol ISOgrk3 Greek capital letter Lambda
Mu Μ U+039C (924) HTML 4.0 HTMLsymbol Greek capital letter Mu
Nu Ν U+039D (925) HTML 4.0 HTMLsymbol Greek capital letter Nu
Xi Ξ U+039E (926) HTML 4.0 HTMLsymbol ISOgrk3 Greek capital letter Xi
Omicron Ο U+039F (927) HTML 4.0 HTMLsymbol Greek capital letter Omicron
Pi Π U+03A0 (928) HTML 4.0 HTMLsymbol Greek capital letter Pi
Rho Ρ U+03A1 (929) HTML 4.0 HTMLsymbol Greek capital letter Rho
Sigma Σ U+03A3 (931) HTML 4.0 HTMLsymbol ISOgrk3 Greek capital letter Sigma
Tau Τ U+03A4 (932) HTML 4.0 HTMLsymbol Greek capital letter Tau
Upsilon Υ U+03A5 (933) HTML 4.0 HTMLsymbol ISOgrk3 Greek capital letter Upsilon
Phi Φ U+03A6 (934) HTML 4.0 HTMLsymbol ISOgrk3 Greek capital letter Phi
Chi Χ U+03A7 (935) HTML 4.0 HTMLsymbol Greek capital letter Chi
Psi Ψ U+03A8 (936) HTML 4.0 HTMLsymbol ISOgrk3 Greek capital letter Psi
Omega Ω U+03A9 (937) HTML 4.0 HTMLsymbol ISOgrk3 Greek capital letter Omega
alpha α U+03B1 (945) HTML 4.0 HTMLsymbol ISOgrk3 Greek small letter alpha
beta β U+03B2 (946) HTML 4.0 HTMLsymbol ISOgrk3 Greek small letter beta
gamma γ U+03B3 (947) HTML 4.0 HTMLsymbol ISOgrk3 Greek small letter gamma
delta δ U+03B4 (948) HTML 4.0 HTMLsymbol ISOgrk3 Greek small letter delta
epsilon ε U+03B5 (949) HTML 4.0 HTMLsymbol ISOgrk3 Greek small letter epsilon
zeta ζ U+03B6 (950) HTML 4.0 HTMLsymbol ISOgrk3 Greek small letter zeta
eta η U+03B7 (951) HTML 4.0 HTMLsymbol ISOgrk3 Greek small letter eta
theta θ U+03B8 (952) HTML 4.0 HTMLsymbol ISOgrk3 Greek small letter theta
iota ι U+03B9 (953) HTML 4.0 HTMLsymbol ISOgrk3 Greek small letter iota
kappa κ U+03BA (954) HTML 4.0 HTMLsymbol ISOgrk3 Greek small letter kappa
lambda λ U+03BB (955) HTML 4.0 HTMLsymbol ISOgrk3 Greek small letter lambda
mu μ U+03BC (956) HTML 4.0 HTMLsymbol ISOgrk3 Greek small letter mu
nu ν U+03BD (957) HTML 4.0 HTMLsymbol ISOgrk3 Greek small letter nu
xi ξ U+03BE (958) HTML 4.0 HTMLsymbol ISOgrk3 Greek small letter xi
omicron ο U+03BF (959) HTML 4.0 HTMLsymbol NEW Greek small letter omicron
pi π U+03C0 (960) HTML 4.0 HTMLsymbol ISOgrk3 Greek small letter pi
rho ρ U+03C1 (961) HTML 4.0 HTMLsymbol ISOgrk3 Greek small letter rho
sigmaf ς U+03C2 (962) HTML 4.0 HTMLsymbol ISOgrk3 Greek small letter final sigma
sigma σ U+03C3 (963) HTML 4.0 HTMLsymbol ISOgrk3 Greek small letter sigma
tau τ U+03C4 (964) HTML 4.0 HTMLsymbol ISOgrk3 Greek small letter tau
upsilon υ U+03C5 (965) HTML 4.0 HTMLsymbol ISOgrk3 Greek small letter upsilon
phi φ U+03C6 (966) HTML 4.0 HTMLsymbol ISOgrk3 Greek small letter phi
chi χ U+03C7 (967) HTML 4.0 HTMLsymbol ISOgrk3 Greek small letter chi
psi ψ U+03C8 (968) HTML 4.0 HTMLsymbol ISOgrk3 Greek small letter psi
omega ω U+03C9 (969) HTML 4.0 HTMLsymbol ISOgrk3 Greek small letter omega
thetasym ϑ U+03D1 (977) HTML 4.0 HTMLsymbol NEW Greek theta symbol
upsih ϒ U+03D2 (978) HTML 4.0 HTMLsymbol NEW Greek Upsilon with hook symbol
piv ϖ U+03D6 (982) HTML 4.0 HTMLsymbol ISOgrk3 Greek pi symbol
ensp U+2002 (8194) HTML 4.0 HTMLspecial ISOpub en space[7]
emsp U+2003 (8195) HTML 4.0 HTMLspecial ISOpub em space[8]
thinsp U+2009 (8201) HTML 4.0 HTMLspecial ISOpub thin space[9]
zwnj U+200C (8204) HTML 4.0 HTMLspecial NEW RFC 2070 zero-width non-joiner
zwj U+200D (8205) HTML 4.0 HTMLspecial NEW RFC 2070 zero-width joiner
lrm U+200E (8206) HTML 4.0 HTMLspecial NEW RFC 2070 left-to-right mark
rlm U+200F (8207) HTML 4.0 HTMLspecial NEW RFC 2070 right-to-left mark
ndash U+2013 (8211) HTML 4.0 HTMLspecial ISOpub en dash
mdash U+2014 (8212) HTML 4.0 HTMLspecial ISOpub em dash
lsquo U+2018 (8216) HTML 4.0 HTMLspecial ISOnum left single quotation mark
rsquo U+2019 (8217) HTML 4.0 HTMLspecial ISOnum right single quotation mark
sbquo U+201A (8218) HTML 4.0 HTMLspecial NEW single low-9 quotation mark
ldquo U+201C (8220) HTML 4.0 HTMLspecial ISOnum left double quotation mark
rdquo U+201D (8221) HTML 4.0 HTMLspecial ISOnum right double quotation mark
bdquo U+201E (8222) HTML 4.0 HTMLspecial NEW double low-9 quotation mark
dagger U+2020 (8224) HTML 4.0 HTMLspecial ISOpub dagger
Dagger U+2021 (8225) HTML 4.0 HTMLspecial ISOpub double dagger
bull U+2022 (8226) HTML 4.0 HTMLspecial ISOpub bullet (= black small circle)[10]
hellip U+2026 (8230) HTML 4.0 HTMLsymbol ISOpub horizontal ellipsis (= three dot leader)
permil U+2030 (8240) HTML 4.0 HTMLspecial ISOtech per mille sign
prime U+2032 (8242) HTML 4.0 HTMLsymbol ISOtech prime (= minutes = feet)
Prime U+2033 (8243) HTML 4.0 HTMLsymbol ISOtech double prime (= seconds = inches)
lsaquo U+2039 (8249) HTML 4.0 HTMLspecial ISO proposed single left-pointing angle quotation mark[11]
rsaquo U+203A (8250) HTML 4.0 HTMLspecial ISO proposed single right-pointing angle quotation mark[12]
oline U+203E (8254) HTML 4.0 HTMLsymbol NEW overline (= spacing overscore)
frasl U+2044 (8260) HTML 4.0 HTMLsymbol NEW fraction slash (= solidus)
euro U+20AC (8364) HTML 4.0 HTMLspecial NEW euro sign
image U+2111 (8465) HTML 4.0 HTMLsymbol ISOamso black-letter capital I (= imaginary part)
weierp U+2118 (8472) HTML 4.0 HTMLsymbol ISOamso script capital P (= power set = Weierstrass p)
real U+211C (8476) HTML 4.0 HTMLsymbol ISOamso black-letter capital R (= real part symbol)
trade U+2122 (8482) HTML 4.0 HTMLsymbol ISOnum trademark sign
alefsym U+2135 (8501) HTML 4.0 HTMLsymbol NEW alef symbol (= first transfinite cardinal)[13]
larr U+2190 (8592) HTML 4.0 HTMLsymbol ISOnum leftwards arrow
uarr U+2191 (8593) HTML 4.0 HTMLsymbol ISOnum upwards arrow
rarr U+2192 (8594) HTML 4.0 HTMLsymbol ISOnum rightwards arrow
darr U+2193 (8595) HTML 4.0 HTMLsymbol ISOnum downwards arrow
harr U+2194 (8596) HTML 4.0 HTMLsymbol ISOamsa left right arrow
crarr U+21B5 (8629) HTML 4.0 HTMLsymbol NEW downwards arrow with corner leftwards (= carriage return)
lArr U+21D0 (8656) HTML 4.0 HTMLsymbol ISOtech leftwards double arrow[14]
uArr U+21D1 (8657) HTML 4.0 HTMLsymbol ISOamsa upwards double arrow
rArr U+21D2 (8658) HTML 4.0 HTMLsymbol ISOnum rightwards double arrow[15]
dArr U+21D3 (8659) HTML 4.0 HTMLsymbol ISOamsa downwards double arrow
hArr U+21D4 (8660) HTML 4.0 HTMLsymbol ISOamsa left right double arrow
forall U+2200 (8704) HTML 4.0 HTMLsymbol ISOtech for all
part U+2202 (8706) HTML 4.0 HTMLsymbol ISOtech partial differential
exist U+2203 (8707) HTML 4.0 HTMLsymbol ISOtech there exists
empty U+2205 (8709) HTML 4.0 HTMLsymbol ISOamso empty set (= null set = diameter)
nabla U+2207 (8711) HTML 4.0 HTMLsymbol ISOtech nabla (= backward difference)
isin U+2208 (8712) HTML 4.0 HTMLsymbol ISOtech element of
notin U+2209 (8713) HTML 4.0 HTMLsymbol ISOtech not an element of
ni U+220B (8715) HTML 4.0 HTMLsymbol ISOtech contains as member
prod U+220F (8719) HTML 4.0 HTMLsymbol ISOamsb n-ary product (= product sign)[16]
sum U+2211 (8721) HTML 4.0 HTMLsymbol ISOasmb n-ary summation[17]
minus U+2212 (8722) HTML 4.0 HTMLsymbol ISOtech minus sign
lowast U+2217 (8727) HTML 4.0 HTMLsymbol ISOtech asterisk operator
radic U+221A (8730) HTML 4.0 HTMLsymbol ISOtech square root (= radical sign)
prop U+221D (8733) HTML 4.0 HTMLsymbol ISOtech proportional to
infin U+221E (8734) HTML 4.0 HTMLsymbol ISOtech infinity
ang U+2220 (8736) HTML 4.0 HTMLsymbol ISOamso angle
and U+2227 (8743) HTML 4.0 HTMLsymbol ISOtech logical and (= wedge)
or U+2228 (8744) HTML 4.0 HTMLsymbol ISOtech logical or (= vee)
cap U+2229 (8745) HTML 4.0 HTMLsymbol ISOtech intersection (= cap)
cup U+222A (8746) HTML 4.0 HTMLsymbol ISOtech union (= cup)
int U+222B (8747) HTML 4.0 HTMLsymbol ISOtech integral
there4 U+2234 (8756) HTML 4.0 HTMLsymbol ISOtech therefore
sim U+223C (8764) HTML 4.0 HTMLsymbol ISOtech tilde operator (= varies with = similar to)[18]
cong U+2245 (8773) HTML 4.0 HTMLsymbol ISOtech congruent to
asymp U+2248 (8776) HTML 4.0 HTMLsymbol ISOamsr almost equal to (= asymptotic to)
ne U+2260 (8800) HTML 4.0 HTMLsymbol ISOtech not equal to
equiv U+2261 (8801) HTML 4.0 HTMLsymbol ISOtech identical to; sometimes used for ‘equivalent to’
le U+2264 (8804) HTML 4.0 HTMLsymbol ISOtech less-than or equal to
ge U+2265 (8805) HTML 4.0 HTMLsymbol ISOtech greater-than or equal to
sub U+2282 (8834) HTML 4.0 HTMLsymbol ISOtech subset of
sup U+2283 (8835) HTML 4.0 HTMLsymbol ISOtech superset of[19]
nsub U+2284 (8836) HTML 4.0 HTMLsymbol ISOamsn not a subset of
sube U+2286 (8838) HTML 4.0 HTMLsymbol ISOtech subset of or equal to
supe U+2287 (8839) HTML 4.0 HTMLsymbol ISOtech superset of or equal to
oplus U+2295 (8853) HTML 4.0 HTMLsymbol ISOamsb circled plus (= direct sum)
otimes U+2297 (8855) HTML 4.0 HTMLsymbol ISOamsb circled times (= vector product)
perp U+22A5 (8869) HTML 4.0 HTMLsymbol ISOtech up tack (= orthogonal to = perpendicular)
sdot U+22C5 (8901) HTML 4.0 HTMLsymbol ISOamsb dot operator[20]
lceil U+2308 (8968) HTML 4.0 HTMLsymbol ISOamsc left ceiling (= APL upstile)
rceil U+2309 (8969) HTML 4.0 HTMLsymbol ISOamsc right ceiling
lfloor U+230A (8970) HTML 4.0 HTMLsymbol ISOamsc left floor (= APL downstile)
rfloor U+230B (8971) HTML 4.0 HTMLsymbol ISOamsc right floor
lang U+2329 (9001) HTML 4.0 HTMLsymbol ISOtech left-pointing angle bracket (= bra)[21]
rang U+232A (9002) HTML 4.0 HTMLsymbol ISOtech right-pointing angle bracket (= ket)[22]
loz U+25CA (9674) HTML 4.0 HTMLsymbol ISOpub lozenge
spades U+2660 (9824) HTML 4.0 HTMLsymbol ISOpub black spade suit[23]
clubs U+2663 (9827) HTML 4.0 HTMLsymbol ISOpub black club suit (= shamrock)[24]
hearts U+2665 (9829) HTML 4.0 HTMLsymbol ISOpub black heart suit (= valentine)[25]
diams U+2666 (9830) HTML 4.0 HTMLsymbol ISOpub black diamond suit[26]

, , , , , , , ,

No Comments

Problema con locate in Linux : can not open `/var/lib/mlocate/mlocate.db’: No such file or directory

Avete provato ad usare il comando locate in linux per cercare un file o una directory ma il risultato è stato il seguente errore?


#locate tomcat
locate: can not open `/var/lib/mlocate/mlocate.db’: No such file or directory

Bene, il problema è che il file mlocate.db non esiste… Fantastico :)
Non vi preoccupate basta semplicemente lanciare il comando per aggiornare, o creare se non esiste, tale file.
Il file mlocate.db contiene i dati relativi alla struttura di file e directory per velocizzare la ricerca rispetto al comando find.
#updatedb

Ora possiamo usare il nostro locate!.

Una piccola dritta, utilizzate locate in insieme a al comando grep e troverete tutto quello che serve.

#locate tomcat
/usr/local/tomcat5
/usr/local/tomcat6


#locate tomcat | grep 5
/usr/local/tomcat5

, , , , , ,

No Comments

Usare Enum in C#

Vediamo come creare e usare il costrutto Enum in C#.
Il costrutto Enum viene usato per creare una tipologia di dati con un dominio definito. Esempio classico i giorni della settimana. L’Enum di solito ha un tipo base (numeratore), e un valore descrittivo.
Il numeratore di default è intero e progressivo da 0 per ogni elemento dell’enum. Questo però può essere specificato per ogni singola voce dell’enum
Vediamo come si dichiara in C#

Con numeratore implicito (da 0 in avanti)

private enum Volume
{
Basso,
Medio,
Alto
}

Con numeratore esplicito (1,2,3)

private enum Volume
{
Basso = 1,
Medio = 2,
Alto = 3
}

La dichiarazione molto semplice. Vediamo ora come usarle. Faremo riferimento alla seconda, quella con il numeratore specificato esplicitamente.

private void usaEnum()
{
string output;
Volume volume= Volume.Basso;
output = Enum.GetName(typeof(Volume), volume) + ", " + volume.ToString() + ", " + (volume==Volume.Basso).ToString();

volume = (Volume)Enum.Parse(typeof(Volume), "Medio");
output += "rn" + Enum.GetName(typeof(Volume), volume) + ", " + volume.ToString() + ", " + (volume == Volume.Medio).ToString();

volume = (Volume)Enum.Parse(typeof(Volume), "alTo", true);
output += "rn" + Enum.GetName(typeof(Volume), volume) + ", " + volume.ToString() + ", " + (volume == Volume.Alto).ToString();

Console.out(output);
}

L’output a video e il seguente


Basso, Basso, True
Medio, Medio, True
Alto, Alto, True

Tutto molto facile vero?
Se avete dubbi chiedete pure!

, , , , , ,

No Comments

Gestire le connection string in ASP.NET 2.0

ASP.NET 2.0 ha introdotto un’importante novità nella modalità di gestione delle connection string su web.config.
Al contario si ASP.NET 1.1, dove le connection string erano gestite come normali chiavi di application setting, in ASP.NET 2.0, è presente una nuova sezione (section) connectionStrings.
Dentro questa sezione e possibili aggiungere le connection string che ci interessano.
Vediamo un esempio:

<connectionStrings>
<remove name=”LocalSqlServer” />
<add name=”LocalSqlServer” connectionString=”Data Source=myDBServer;database=myDB;Integrated Security=True;” providerName=”System.Data.SqlClient”/>
</connectionStrings>

I parametri che ci interessano sono:

  • name: specifica il nome della nostra connection string, e lo andremo ad utilizzare nel momento in cui dobbiamo reperirla
  • connectionString: specifiva il valore vero e proprio della stringa di connessione.

Una volta specifica la nostra connection string nel file web.config, andarla a leggere è molto semplice. Basta utilizzare la classe ConfigurationManager come segue:
string strConnString = ConfigurationManager.ConnectionStrings["LocalSqlServer"].ConnectionString;

Niente di più facile vero?

, , ,

No Comments

Configurare mod_jk per apache tomcat

Il nostro obbiettivo e fare comunicare Apache2 e Tomcat, in modo che il container non sia esposto direttamente sul web, ma tutto venga filtrato attraverso il web server (Apache2 in questo caso). Oltre a motivi legati alla sicurezza, in questo modo possiamo far servire i contenuti statici (html, immagini, css, js) al web server invece che al container, riducendo su di esso un carico inutile.

Per prima cosa dobbiamo installare in mod_jk nel caso non sia già stato installato
apt-get install libapache2-mod-jk

E attiviamolo
a2enmod jk

Ora creiamo il file /etc/apache2/workers.properties, nel quale andiamo a specificare i nostri worker (nella nostra configurazione uno solo).
Questa e la definizione nel nostro worker. Ho evidenziato due valori, worker.worker1.host e worker.worker1.port. Questi due valori devono essere compilati rispettivamente con l’host dell’installazione di Tomcat e la porta sulla quale il connector AJP di Tomcat è in ascolto. Se Tomcat è installato sulla stessa macchina e non è stato variata la configurazione di default del connector AJP, lasciate i valori da me impostati.
Per quanto riguarda gli altri parametri vi rimando alla guida ufficiale del workers.properties.

[shm]
file=/var/log/apache2/shm.file
size=1048576
# tomcat 5.5
worker.list=worker1
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8109
worker.worker1.lbfactor=50
worker.worker1.cachesize=10
worker.worker1.cache_timeout=600
worker.worker1.socket_keepalive=1
worker.worker1.reclycle_timeout=300

Read the rest of this entry »

, , , , , , ,

3 Comments

Abilitare il modulo SSL su Apache2

Una volta installato apache, argomento gia trattato nel precedente post Installare apache 2 su Debian2
vediamo come installare e configurare il modulo SSL per gestire il protocollo HTTPS.

Per prima cosa dobbiamo installare openssl nel caso non fosse gia presente nella nostra installazione di Apache2.
apt-get install openssl ssl-cert

Ora generiamo, nel caso non l’avessimo, un certificato. Non essendo un ente autorizzato possiamo generare solo certifica self-signed i quali funzionano correttamente, ma generarno dei warning che verranno mostrati nel browser. Nel caso volessimo utilizzare un certifivato trusted dobbiamo rivolgerci ad una certification authority come (Es. Thawte).
Per generarlo, lanciamo il seguente comando e compiliamo i dati richiesti, annotando la password.
apache2-ssl-certificate

Nel caso in cui il comando precedente non fosse disponibile dobbiamo utilizzare il seguente
openssl req $@ -new -x509 -days 365 -nodes -out /etc/apache2/apache.pem -keyout /etc/apache2/apache.pem

Read the rest of this entry »

, , , , , , , , ,

3 Comments

Installare apache 2 su Debian

Dove installare e configurare apache2 si linux Debian? Non preoccupatevi, non è cosi difficile! Vediamo in pochi e semplici passi come fare.

Per prima cosa Debian mette a disposizione apt (Advanced Package Tool), come gestore di pacchetti, il quale semplifica la di molto la vita quando dobbiamo installare, disinstallare o aggiurnare pacchetti sulla nostra installazione Debian. Tramite apt andiamo ad installare apache2

apt-get install apache2

Nel caso vogliate utilizzare la modalità preforking utilizzata in apache 1.3 (piu stabile ma meno prestante rispetto al modello a thread della versione 2), installate anche il seguente pacchetto

apt-get install apache2-mpm-prefork

L’installazione base è completata. Ora passiamo a qualche semplice configurazione.
Vediamo la struttura base di un file di configurazione di un VirtualHost.
Creamo un file di nome /etc/apache2/sites-available/test e compiagli dentro il seguente contenuto.
Vediamo di capire le direttive base
VirtualHost è la direttiva che indica un nuovo VirtualHost, al suo interno sono presenti tutte le direttive ad esso relative. Qui al posto di [IP] [PORT] impostiamo l’indirizzo e la porta sulla quale il nostro VirtualHost accetta richieste.
ServerAdmin indica l’indirizzo email dell’amministratore del server.
DocumentRoot è il path alla cartella dei file del nostro sito.
ServerName è il nome del dominio sulle quali il nostro VirtualHost accetta richieste.
ServerAlias è il nome di ulteriori domini sulle quali il nostro VirtualHost accetta richieste.
ErrorLog è il nome del file dove vengono loggati errori relatvi a questo VirtualHost.
CustomLog è il nome del file dove vengono loggati gli accessi al VirtualHost.


<VirtualHost [IP]:[PORT]>
ServerAdmin support@easymarketcrs.it
DocumentRoot /www/sito-test
ServerName nostrosito.com
ServerAlias www.nostrosito.com alias1.nostrosito.com alias2.nostrosito.com
ErrorLog /var/log/apache2/vh/test/revolution/error.log
CustomLog /var/log/apache2/vh/test/access.log combined
</VirtualHost>

Ora possiamo provare il nostro virual host impostando il file di host del nostro client come segue (IP è lo stesso ip impostato nel file precedente)
[IP] www.nostrosito.com

Apriamo un browser e andando alla url www.nostrosito.com vediamo la nostra ultima creazione.

Questo è solo l’inizio con Apache2. Lascio ai prossimi ulteriori configurazioni.
Accetto come sempre correzzione, domande e suggerimenti, quindi non esitate a commentare!

, , , , , , ,

No Comments

Accedere a MySql server dall’esterno

Avete appena installato MySql da una macchina remota e non riuscite ad effettuare l’accesso con il vostro client?

Non vi preoccupate, è normale. La configurazione di default di MySQL non permette l’accesso dall’esterno. Chiaramente non per complicarvi la vita, ma per motivi di sicurezza, visto che un servizio aperto sull’esterno, non configurato come di deve, è sempre un ottimo inizio per fare breccia… Quindi attezione…

Morale a parte vediamo come procedere per abilitare l’accesso dall’esterno:

Per prima cosa dobbiamo modificare il file di configurazione /etc/my.cnf in modo che il server MySql sia in ascolto sull’IP esterno, quindi,  assicuriamo che la linea skip-networking sia commentata o non presente. Dopo di che modifichiamo (o inseriamo se non esiste) la linea bind-address come segue :

bind-address=[IP-SERVER]

Salviamo e riavviamo MySql

/etc/init.d/mysqld restart

Una volta che MySql è in ascolto sull’interfaccia esterna dobbiamo impostare le grant sugli utenti che possono accedere dall’esterno. Quindi accediamo al server in locale e lanciamo il seguente comando.

mysql> GRANT ALL ON foo.* TO bar@'202.54.10.20' IDENTIFIED BY 'PASSWORD';

Vediamo ci capire cosa si puo fare con il seguente comando;  diamo grant complete sul database foo, su tutte le tabelle [*], all’utente bar che si connette dall’IP 202.54.10.20 che ha come password PASSWORD.
In questo modo possiamo collegarci solo se il nostro client ha come IP 202.54.10.20. Nel caso l’ip non sia sempre lo stesso, possiamo utilizzare il carattere jolly % come con l’operatore like, visto che l’ip del client viene messo in like con quello specificato nella grant.
Esempio TO bar@’%’ vuol dire  “all’utente bar che si collega da ogni IP”.

Anche questa volta tutto molto semplice no? Se avete problemi, o notate imperfezioni, commentate pure!

, ,

1 Comment

Generare una stringa randomica in TSQL

Proprio oggi avevo la necessità di generare una chiave alfanumerica casuale (o stringa randomica che di si voglia) all’interno di una procedura SQL Server. Senza investigare troppo sul motivo di questa necessità :) ecco qua la soluzione.

Una procedura che dato un set di caratteri e una lunghezza N, ritorna in output una strina di N caratteri presi dal set specificato, in modo casuale.

CREATE PROC genera_string_random (@p_len INT, @p_random_string VARCHAR(100) OUTPUT)
AS

BEGIN
DECLARE @v_string VARCHAR(100);
DECLARE @v_type TINYINT;
DECLARE @v_source VARCHAR(100)
DECLARE @v_lenght_source AS TINYINT

SET @v_source = ‘0123456789ABCDEFGHILMNOPQRSTUVZabcdefghilmnopqrstuvz’ – set caratteri
SET @v_lenghtSource = LEN(@v_source) - 1

— scelta del nuovo carattere da aggiungere alla stringa finale
WHILE ( @p_len > 0 )
BEGIN
SET @v_password = @v_password + SUBSTRING(@v_source, CONVERT(INT, ROUND(1 + (RAND() * (@v_lenghtSource)), 0)), 1);
SET @p_len = @len - 1;
END

SET @p_random_string = @v_password;
END
GO

Per utilizzare la procedura:

DECLARE @v_random_string AS VARCHAR(100)
EXEC
genera_string_random 15, @v_random_string OUTPUT
SELECT @v_random_string

Niente di piu facile vero? Chiaramente potete cambiare il set di caratteri in base alle vostre esigenze, ma ricordate che la stringa generata non è univoca, quindi non utilizzatela come chiave primaria di una tabella…

, ,

No Comments