| Autore |
Messaggio
|
| sun83 |
Inviato: Gio Gen 03, 2008 11:18 pm Oggetto: Batch per rilevamento by sun83 |
|
|
Registrato: 07/01/07 14:51 Età: 29 Messaggi: 5360 Residenza: VR
|
Ciao ragazzi,
questa è la mia versione ottimizzata per windows che non necessita di installazioni perchè ho allegato il sed e il wget compilati per windows.
Versione 2 VISTA compatibile da 4,5 MB di spazio occupato (zip da 2.32 MB):
Versione 1 da 300 kB di spazio occupato (zip da 267 kB):
Ciao, spero torni utile a qualcuno!
Le righe che eventualmente dovete modificare sono:
Riga 91:
Codice: set note1=Linea=1280/384 mcr=64
Mettete le caratteristiche della vostra connessione.
Riga 82:
Codice: set publicip_netmask=248
Modificate questa riga se avete una netmask diversa, cioè se avete una classe diversa dagli 8 ip.
Codice della vecchia versione:
Codice:
@echo off
rem Versione derivata dalla 0.4.2 di r3lative
rem *******************
rem ***** parametri *****
rem *******************
rem *** Versione del programma
set verp=Version 1.0 by sun83
rem *** Imposta l'editor da usare per visualizzare
rem *** se vuota, usa l'editor predefinito di windows
rem set editor=%SystemRoot%\system32\notepad.exe
set editor="C:\Programmi\Windows NT\Accessori\wordpad.exe"
rem *** file temporaneo
set tfn=%temp%\e4a.tmp
rem *** file di testo contenente i risultati, è il file da aprire se volete rivedere i risultati
set fn=%temp%\e4a.txt
rem *** file parametri da passare a sed.
set sed=%temp%\e4a.sed
rem *** sito di riferimento per i test di ping e di tracert
set sito=maya.ngi.it
rem *** numero di ping da eseguire, è caldamente consigliati di non modificarlo.
rem *** nel caso, bisogna modificare anche la riga "echo 13,106d > %sed%"
rem *** questo comando indica a sed di cancellare le righe dalla 13 alla 106,
rem *** quindi se si modifica il n° di ping bisogna anche modificare questi valori.
rem *** (di norma il 106, basta fare la stessa modifica che avete fatto al n° di ping, tipo -50 o +100)
set pingn=50
set pingdelfromrow=6
set pingdeltorow=59
set pingdelrow=67
rem *** se ftpwget=1 usa il wget, se ftpwget=0 usa ftp di windows
set ftpwget=1
rem *** file parametri per l'FTP
set ftp=%temp%\e4a.ftp
rem *** file di log per l'FTP
set ftplog=%temp%\e4a.ftp.log
rem *** sito da cui fare le prove FTP di download
set ftpsite=debian.fastweb.it
rem *** nome del file remoto da scaricare (path assoluti)
set ftpfile=/debian/ls-lR.gz
rem *** nome del file locale scaricato (path assoluti)
set ftplocalfile=%temp%\ls-lr.gz.tmp
rem *** file di destinazione per l'FTP
set ftpdestfile=e4a.ftp.file
rem *** file parametri per l'HTTP
set http=%temp%\e4a.http
rem *** file di destinazione per l'HTTP
set httpdestfile=e4a.http.file
rem *** file http da scaricare
set httpdownload=http://debian.fastweb.it/debian/ls-lR.gz
rem *** variabile ambiente per impostare correttamente il code, senza dover fare nulla sullo script
set varcode=code
rem *** publicip_cache se è impostato a 1, memorizza in temp l'ip pubblico
set publicip_temp=%temp%\mypublicip.txt
rem *** netmask ip pubblici assegnati
set publicip_netmask=248
rem *** Note che possono essere aggiunte in coda al file con i risultati
rem *** si tratta di 3 righe che possono essere inserite, se non usate,
rem *** non vengono inserite nel risultato (ovvero non vengono lasciate riche vuote)
rem set note1=Linea:1536/512 MCR:128
rem set note2=
rem set note3=
set note1=Linea=1280/384 mcr=64
set note2=
set note3=
rem ***************************
rem *** INIZIO PROGRAMMA ***
rem ***************************
echo Test E4A in esecuzione
echo %verp%
echo Attendere prego ...
echo [%varcode%]Test E4A %verp%> %tfn%
echo Data: %date% %time% >> %tfn%
echo Ping in corso ...
rem echo. >>%tfn%
echo ************************************************* >> %tfn%
echo Ping verso %sito%: >> %tfn%
ping %sito% -n %pingn% >> %tfn%
echo ************************************************* >> %tfn%
echo Tracert in corso ...
tracert %sito% >> %tfn%
echo ************************************************* >> %tfn%
echo Test HTTP in corso ...
wget %httpdownload% --output-document=%httpdestfile% --output-file=%http%
sed -n /KB\/s)/p %http% >> %tfn%
del %httpdestfile%
IF %ftpwget%==1 goto ftpw
echo Test FTP in corso ...
echo open %ftpsite% > %ftp%
echo user anonymous >> %ftp%
echo pippo@pippo.it >> %ftp%
echo. >> %ftp%
echo cd / >> %ftp%
echo lcd %temp% >> %ftp%
echo binary >> %ftp%
echo get %ftpfile% %ftplocalfile% >> %ftp%
echo bye >> %ftp%
ftp -n -s:%ftp% > %ftplog%
echo FTP download filename %ftpfile% from %ftpsite% >> %tfn%
sed -n /byte\/sec/p %ftplog% >> %tfn%
goto noftpw
:ftpw
echo Test FTP in corso ...
wget ftp://%ftpsite%%ftpfile% --output-document=%ftpdestfile% --output-file=%ftplog%
sed -n /KB\/s)/p %ftplog% >> %tfn%
del %ftpdestfile%
:noftpw
echo ************************************************* >> %tfn%
echo Rilevazione completata
rem *** cancella le doppie righe vuote dal file
echo s/.$//g > %sed%
rem *** cancello le righe del ping che non interessano
echo %pingdelfromrow%,%pingdeltorow%d >> %sed%
echo %pingdelrow%d >> %sed%
rem *** sostituisco la parte finale dei test di velocità
sed -r -e "s/- `%httpdestfile%' saved \[[0-9\/]*\]/@ HTTP /g" %tfn% > %fn%
sed -r -e "s/- `%ftpdestfile%' saved \[[0-9]*\]/@ FTP /g" %fn% > %tfn%
rem *** sostituisco gli indirizzi privati e pubblici con testi non significativi
rem wget http://sun83.altervista.org/tools/e4a/sedip.php?netmask=255.255.255.%publicip_netmask% -q -O %publicip_temp%
wget http://sun83.netsons.org/tools/e4a/sedip.php?netmask=255.255.255.%publicip_netmask% -q -O %publicip_temp%
sed -f %publicip_temp% %tfn% > %fn%
sed -r -e "s/([A-Za-z0-9\.]+ +[([])?(10\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}|172\.1[6-9]\.[0-9]{1,3}\.[0-9]{1,3}|172\.2[0-9]\.[0-9]{1,3}\.[0-9]{1,3}|172\.3[0-1]\.[0-9]{1,3}\.[0-9]{1,3}|192\.168\.[0-9]{1,3}\.[0-9]{1,3}|127\.0\.0\.1)[])]?/xxx.xxx.xxx.xxx/g" %fn% > %tfn%
rem *** eseguo il sed
sed -f %sed% %tfn% > %fn%
rem *** Aggiungo testi vari che voglio vengano inseriti
if "%note1%*" == "*" goto noNote1
echo %note1% >> %fn%
:noNote1
if "%note2%*" == "*" goto noNote2
echo %note2% >> %fn%
:noNote2
if "%note3%*" == "*" goto noNote3
echo %note3% >> %fn%
:noNote3
echo *************************************************[/%varcode%] >> %fn%
:fine
echo Visualizzo i risultati
%editor% %fn% _________________ 6Mbit/6Mbit Mcr 512Kbit
Versione per windows del teste4a (non necessita nè installazioni nè configurazioni)
http://www.infoe4a.it/forum/batch-per-rilevamento-by-sun83-t1809.html
http://sun83.altervista.org/tools/e4a/teste4a.zip
L'ultima modifica di sun83 il Sab Feb 05, 2011 2:40 pm, modificato 19 volte |
|
| Top |
|
 |
Sponsor
|
|
 |
| Trew |
Inviato: Ven Gen 04, 2008 4:07 pm Oggetto: |
|
|
 SUPER MOD 
Registrato: 06/01/07 17:00 Età: 26 Messaggi: 3867
|
magari posta anche il codice, quì nel forum, graciass  _________________ 5GHz goes through air.
2.4GHz goes through one tree.
900MHz goes through two trees.
Chainsaws go through +3 trees. |
|
| Top |
|
 |
| lrdbiron |
Inviato: Ven Gen 04, 2008 4:34 pm Oggetto: |
|
|

Registrato: 10/01/07 22:02 Età: 46 Messaggi: 982 Residenza: Gambellara (VI)
|
a me da questo problemino.
Rilevazione instradamento verso maya.ngi.it [88.149.128.3]
su un massimo di 30 punti di passaggio:
1 1 ms 1 ms 1 ms xxx.xxx.xxx.xxx
2 3 ms 2 ms 2 ms xxx.xxx.xxx.xxx53
3 4 ms 3 ms 4 ms 88.213.162.45
4 16 ms 7 ms 5 ms 77.42.68.229
5 35 ms 22 ms 6 ms 77.42.69.210
6 69 ms 28 ms 14 ms 77.42.23.242
7 43 ms 23 ms 41 ms 77.42.23.249
8 62 ms 60 ms 64 ms 77.42.23.164
9 53 ms 48 ms 35 ms 77.42.23.213
10 61 ms 64 ms 63 ms 79.137.127.253
11 65 ms 45 ms 84 ms 77.42.91.126
12 66 ms 79 ms 128 ms vr-core.wolnet.org [80.79.57.129]
13 49 ms 23 ms 43 ms 217.19.158.37
14 96 ms 43 ms 59 ms g01-mi1r1201.retelit.it [217.19.145.33]
15 55 ms 70 ms 75 ms g31-mixr7601.retelit.it [217.19.144.166]
16 91 ms 38 ms 33 ms inet.mix-it.net [217.29.66.2]
17 52 ms 46 ms 61 ms ge5-1.wf1-gsr3.net.inet.it [212.239.97.113]
18 30 ms 59 ms 49 ms 212.239.110.46
19 52 ms 47 ms 59 ms shield1-ext.net.ngi.it [81.174.0.246]
20 55 ms 33 ms 42 ms maya.ngi.it [88.149.128.3]
il punto 2 lo cancella e nemmeno completo.
su WindozXP. _________________ Ciao
6144 Kbps / 6144 Kbps MCR:512 kbps
 |
|
| Top |
|
 |
| sun83 |
Inviato: Ven Gen 04, 2008 4:43 pm Oggetto: |
|
|
Registrato: 07/01/07 14:51 Età: 29 Messaggi: 5360 Residenza: VR
|
|
| Top |
|
 |
| sun83 |
Inviato: Ven Gen 04, 2008 4:45 pm Oggetto: |
|
|
Registrato: 07/01/07 14:51 Età: 29 Messaggi: 5360 Residenza: VR
|
| lrdbiron ha scritto: | a me da questo problemino.
Rilevazione instradamento verso maya.ngi.it [88.149.128.3]
su un massimo di 30 punti di passaggio:
1 1 ms 1 ms 1 ms xxx.xxx.xxx.xxx
2 3 ms 2 ms 2 ms xxx.xxx.xxx.xxx53
3 4 ms 3 ms 4 ms 88.213.162.45
4 16 ms 7 ms 5 ms 77.42.68.229
5 35 ms 22 ms 6 ms 77.42.69.210
6 69 ms 28 ms 14 ms 77.42.23.242
7 43 ms 23 ms 41 ms 77.42.23.249
8 62 ms 60 ms 64 ms 77.42.23.164
9 53 ms 48 ms 35 ms 77.42.23.213
10 61 ms 64 ms 63 ms 79.137.127.253
11 65 ms 45 ms 84 ms 77.42.91.126
12 66 ms 79 ms 128 ms vr-core.wolnet.org [80.79.57.129]
13 49 ms 23 ms 43 ms 217.19.158.37
14 96 ms 43 ms 59 ms g01-mi1r1201.retelit.it [217.19.145.33]
15 55 ms 70 ms 75 ms g31-mixr7601.retelit.it [217.19.144.166]
16 91 ms 38 ms 33 ms inet.mix-it.net [217.29.66.2]
17 52 ms 46 ms 61 ms ge5-1.wf1-gsr3.net.inet.it [212.239.97.113]
18 30 ms 59 ms 49 ms 212.239.110.46
19 52 ms 47 ms 59 ms shield1-ext.net.ngi.it [81.174.0.246]
20 55 ms 33 ms 42 ms maya.ngi.it [88.149.128.3]
il punto 2 lo cancella e nemmeno completo.
su WindozXP. |
Strano, sembrerebbe un problema nel sed.
Prova a inviarmi via PM cosa ti da in output la pagina web http://sun83.altervista.org/tools/e4a/sedip.php?netmask=255.255.255.248 _________________ 6Mbit/6Mbit Mcr 512Kbit
Versione per windows del teste4a (non necessita nè installazioni nè configurazioni)
http://www.infoe4a.it/forum/batch-per-rilevamento-by-sun83-t1809.html
http://sun83.altervista.org/tools/e4a/teste4a.zip |
|
| Top |
|
 |
| sun83 |
Inviato: Ven Gen 04, 2008 5:08 pm Oggetto: |
|
|
Registrato: 07/01/07 14:51 Età: 29 Messaggi: 5360 Residenza: VR
|
|
| Top |
|
 |
| lrdbiron |
Inviato: Ven Gen 04, 2008 5:13 pm Oggetto: |
|
|

Registrato: 10/01/07 22:02 Età: 46 Messaggi: 982 Residenza: Gambellara (VI)
|
fatto.
test andato a buon fine.
1 2 ms 1 ms 1 ms xxx.xxx.xxx.xxx
2 3 ms 2 ms 2 ms 77.42.64.253
3 11 ms 7 ms 5 ms 88.213.162.45
 _________________ Ciao
6144 Kbps / 6144 Kbps MCR:512 kbps
 |
|
| Top |
|
 |
| sun83 |
Inviato: Ven Gen 04, 2008 5:17 pm Oggetto: |
|
|
Registrato: 07/01/07 14:51 Età: 29 Messaggi: 5360 Residenza: VR
|
|
| Top |
|
 |
| sun83 |
Inviato: Ven Gen 04, 2008 5:53 pm Oggetto: |
|
|
Registrato: 07/01/07 14:51 Età: 29 Messaggi: 5360 Residenza: VR
|
|
| Top |
|
 |
| marte_57 |
Inviato: Sab Gen 05, 2008 9:42 am Oggetto: |
|
|
 BANNATO
Registrato: 21/01/07 11:12 Età: 54 Messaggi: 3968
|
|
| Top |
|
 |
| DaveDevil |
Inviato: Sab Gen 05, 2008 1:37 pm Oggetto: |
|
|

Registrato: 07/01/07 02:34
Messaggi: 1372 Residenza: Casa mia (Veggiano)
|
funsia x vista? _________________
FdO: Ma le sembra il modo di correre?
Dave: Non sto correndo troppo forte, sto volando troppo piano! |
|
| Top |
|
 |
| sun83 |
Inviato: Sab Gen 05, 2008 3:20 pm Oggetto: |
|
|
Registrato: 07/01/07 14:51 Età: 29 Messaggi: 5360 Residenza: VR
|
|
| Top |
|
 |
| r3lative |
Inviato: Sab Gen 05, 2008 8:09 pm Oggetto: |
|
|
 BANNATO
Registrato: 03/05/07 00:27
Messaggi: 7340 Residenza: Saccolongo - PD - ITALY - terzo pianeta a sinistra
|
bravo, ottima idea
dopo lo spulcio
ciao _________________ “Mai argomentare con un idiota;
ti fa scendere al suo livello e ti batte per esperienza ”
r3lative blog |
|
| Top |
|
 |
| ivanil |
Inviato: Lun Gen 07, 2008 3:31 pm Oggetto: |
|
|
Registrato: 12/10/07 14:15
Messaggi: 57 Residenza: mussolente (VI)
|
ho scaricato i file e messo la compatibilità per xp (ho vista) però non ho capito esattamente cosa devo fare...
un aiutino?
grazie |
|
| Top |
|
 |
| Head Not Found |
Inviato: Lun Gen 07, 2008 3:49 pm Oggetto: |
|
|

Registrato: 15/01/07 00:22 Età: 32 Messaggi: 595 Residenza: Altopiano dei Sette Comuni/versante sud-est
|
sun83, non riesco a trovare il tuo sito  |
|
| Top |
|
 |
|
|