This website is now static html, I have no time to write anything and Wordpress has more security holes than a Swiss cheese, and so the migthy wget -m replaced the ugly php. For sure there will be problems with this new version, but that is life.
show hide sidebar
Some advices, read carefully:
Se vuoi essere alla moda ed avere un blog tutto tuo mi permetto di consigliarti dreamhost, se usi il codice DAT hai pure lo sconto (dettagli).

Archive for the ‘informatica’ Category

Fosse solo la posta …

Thursday, March 1st, 2007

Il buon matteomoro faceva recentemente notare come alla magnifica università del magnifico rettore Furio sia cambiato il sistema di gestione della posta.

Purtroppo i cambiamenti finiscono qui e quindi i poveri studenti ancora iscritti devono sorbirsi tutti gli altri sistemi d’ateneo. Uno su tutti: il famigerato SINDY.

Tralasciamo i dettagli tecnici … anzi no:

Windows Server 2003
Microsoft-IIS/6.0
WebApp in asp
Microsoft SQL Server

Fin qui niente di troppo strano, dovrà pur vivere anche zioBill dopotutto.

Il divertimento incomincia con i bei form che ci sono sparsi per le varie pagine che, un po’ come il prezzemolo, stanno sempre bene. Ad esempio quello per la ricerca dell’orario di ricevimento dei docenti:

Sindy

vabbè è un giorno a scazzo e non mi serve nessun orario, allora perché non metterci un ‘ ?

Ecco il risultato:

Microsoft OLE DB Provider for ODBC Drivers error ’80040e14′
[Microsoft][ODBC SQL Server Driver][SQL Server]Unclosed quotation mark before the character string ‘ ”.
/asp/CercaOraridocenteS.asp, line 135

Come direbbe mio nonno, varde ce ben, e visto che sto giusto leggendo la OWASP Testing Guide v2, provo con

1' or '1' = '1

con risultati mirabolanti

Sindy

bon mi sono stufato di apici e virgolette provo con una spartana e solitaria T, purtroppo non succede “quasi niente” di strano. Viene scelto un prof a caso condito con qualche errore alla linea 74

Sindy

Se si prova con una ‘a’ vengono mostrati gli orari di 3 prof prima che capiti l’errore di riga 74, con una ‘b’ 2, con una ‘c’ di nuovo 3 e così via (nel senso che mi sono stufato di provare).

Quindi è ora di provare con:

1' or (select * from SYSOBJECTS where
TYPE='U' order by NAME)'

ma non sortisce gli effetti desiderati

Microsoft OLE DB Provider for ODBC Drivers error ’80040e14′
[Microsoft][ODBC SQL Server Driver][SQL Server]The ORDER BY clause is invalid in views, inline functions, derived tables, and subqueries, unless TOP is also specified.
/asp/CercaOraridocenteS.asp, line 135

ma dato che gentilmente SQL Server ci dice di provare ad inserire un TOP alla SELECT perché non farlo e quindi:

1' or (select top 10 * from SYSOBJECTS where
 TYPE='U' ORDER BY NAME )'

per fortuna da qualche parte ci deve essere una limitazione e quindi si ottiene un messaggio di errore e non la lista di tutte le tabelle del database come ci aspetteremmo.

Siccome mi sono stufato più che abbastanza di questa cosa, fatta solo ed esclusivamente come esercizio per il corso di qualità e certificazione web, mi fermo qui, ovviamente non prima del pensierino della sera.

<pensierino_della_sera> Citando testualmente da un altro post di matteomoro:

[..] è mai possibile che un’università come quella di Udine che ha al suo interno un corso di laurea in Informatica, un corso di laurea in Tecnologie Web e Multimediali e un’intera facoltà di Ingegneria, che ha a disposizione qualcosa come 65536 (si, sessantacinquemilacinquecentotrentasei) indirizzi IP pubblici (tutta la rete 158.110.0.0/16, quelli realmente utilizzabili sono un po’ meno, ma sono comunque moltissimi) e un collegamento di ottimo livello con la rete GARR (64Mbit di picco, stando alle statistiche fornite dal GARR) non abbia al suo interno macchine e competenze per gestire un sistema di posta elettronica di iscrizione agli esami per 20/30000 persone?

bsod

Monday, February 12th, 2007

mi mancava un pò quel “bel” blu elettrico, non credo servano commenti vero ;)

BSOD

Breaking100, now a member

Tuesday, February 6th, 2007

Yeah,

officially a member of the Breaking100 club!! (not for this blog of course, no banners here! but for some other sites)

As you can see, the logo is on the left …

Drupal, hide install text files using rewrite rules

Tuesday, January 30th, 2007

I see lots of web sites that are using drupal cms, and most of them are not hiding the text files that the installation process leave in the root directory. This is not a problem in general, but if you use an old version of drupal maybe is better not to show the world the version you are using. Take a look at drupal.org changelog file (yes this site is supposed to be up of date;).

So I use this basic solution, note that I update drupal using cvs method so I hide also the CVS directories. Put this code in your .htaccess file after RewriteEngine on inside the IfModule mod_rewrite.c section:

RewriteRule ^(.*)CHANGELOG\.txt$ http://www.perdomani.net [R,L]
RewriteRule ^(.*)INSTALL\.mysql\.txt$ http://www.perdomani.net [R,L]
RewriteRule ^(.*)INSTALL\.txt$ http://www.perdomani.net [R,L]
RewriteRule ^(.*)MAINTAINERS\.txt$ http://www.perdomani.net [R,L]
RewriteRule ^(.*)CVS$ http://www.perdomani.net [R,L]
RewriteRule ^(.*)CVS/$ http://www.perdomani.net [R,L]
RewriteRule ^(.*)INSTALL\.pgsql\.txt$ http://www.perdomani.net [R,L]
RewriteRule ^(.*)LICENSE\.txt$ http://www.perdomani.net [R,L]
RewriteRule ^(.*)UPGRADE\.txt$ http://www.perdomani.net [R,L]

Modify to fix your needs and save the .htaccess file.

F.A.Q.

1 – Why you use tons of rules for every file and not something like ^(.*)\.txt$ ?

Mhh, I really don’t remember, maybe I have some text file I want to be accessible in the site.

2 – Why not just removing that text files?

I think that CVS import them on every update, so you have to remove the files many times.

-
buy order order order