p2pforum Italia
Indietro   P2P Forum Italia > Reti e Connessioni > A tutta banda - ISP, Adsl, Contratti > Gemini Project Lab
Nome utente
Password
Home Registrati Aiuto Regolamento Utenti Calendario Cerca Messaggi di oggi Segna i forum come letti
Blog RSS Feed Giochi Arcade eStore Lotterie Fantacalcio Quiz Radio Invia SMS
Forum Link Directory Galleria Image HostingFile Hosting Italia Free Hosting Sostieni P2Pforum.it acquistando su uno dei siti partner

Iscriviti subito! Benvenuto/a su P2P Forum Italia.

Stai visualizzando il nostro sito in modalità Ospite: puoi visualizzare la maggior parte delle sezioni e delle discussioni, ma ancora non puoi parteciparvi attivamente o godere di tutte le funzioni e dei tanti vantaggi offerti dalla registrazione. Iscrivendoti gratuitamente alla nostra communITy, potrai inserire messaggi, comunicare con altri amici anche in privato, votare nei sondaggi, rilassarti giocando con i videogiochi di Arcade, partecipare alle lotterie (e vincere succulenti premi) e tanto, tanto altro... Il tutto con un'iscrizione gratuita!

Se non sai come iscriverti, dai un'occhiata qui.


Gemini Project Lab

Gemini Project: LiveCD ISO to detect packet injection and ISPs shaping P2P traffic

Iniziata da: VedoVa_NeRa    Creata il: 24-03-08 17:14     Risposte: 0

Risposta Apri una nuova discussione 
 
Strumenti discussione Cerca in questa discussione Modo di visualizzazione
Vecchio 24-03-2008, 17:14   #1
VedoVa_NeRa
Lost in LaLaLand Admin
 
L'avatar di VedoVa_NeRa
 
Profilo:
Iscritto dal: 27-02-2003
Messaggi: 16.853
Punti: 15.726
P2P in uso: Limewire
Rep: VedoVa_NeRa ha molto di cui vantarsiVedoVa_NeRa ha molto di cui vantarsiVedoVa_NeRa ha molto di cui vantarsiVedoVa_NeRa ha molto di cui vantarsiVedoVa_NeRa ha molto di cui vantarsiVedoVa_NeRa ha molto di cui vantarsiVedoVa_NeRa ha molto di cui vantarsiVedoVa_NeRa ha molto di cui vantarsiVedoVa_NeRa ha molto di cui vantarsiVedoVa_NeRa ha molto di cui vantarsi
VedoVa_NeRa è un Blogger
Cita questo messaggio in privato Vai in cima Vai in basso Inglese Gemini Project: LiveCD ISO to detect packet injection and ISPs shaping P2P traffic

#Gemini Project#


«Do ISPs filter internet traffic?» - that's the one million dollar question currently being asked by plenty of users. Some providers are (either openly or hiddenly) applying "traffic shaping" policies, tracing their users' bandwidth usage and intervening directly in order to limit their transfer speeds.
Traffic shaping is often operated on specific protocols (typically, peer-to-peer ones), but many users lament over the fact that bandwidth is reset when any P2P program is running.

To prove the existence of file-sharing filters can be difficult, especially if one seeks for evidence on a single computer, but the process gets easier if a test is performed by two remote users exchanging given data packets through a P2P protocol. By comparing what one end of the connection has sent to what the other end has received, one can see if the content has been blocked, delayed or forged by providers.

In this project, our aim is to produce evidence with the technique below: we've developed two "Live" operating systems designed to connect with one another over the Internet, to start a BitTorrent transfer, and to record the transmission - after which it will generate a report containing the analysis of the traffic.

Every user can get Gemini ISOs and perform the test with a remote friend, if his machine meet the requirements we're going to indicate.



For further details and infos about the principles Gemini is based upon, see the following pages:

Guida: come capire se un ISP ostacola il traffico P2P
Detecting packet injection: a guide to observing packet spoofing by ISPs
http://en.wikipedia.org/wiki/Traffic_shaping
http://www.azureuswiki.com/index.php/Bad_ISPs

#Requirements and setting#
  1. In order to be able to perform the test, there must be two different remote users (the test is performable only in couple): one with the version A, the other with the version B. You can download the ISOs for Gemini here:
    Gemini_A.ISO
    Gemini_B.ISO
  2. Once the ISOs have been downloaded, they need to be burned on a CDROM. (come masterizzare le ISO)
  3. You need to have a PC (no ultraSPARC, no Macintosh, no SUN)
  4. You need to have a modem/router connected to the network card (no USB, no Wireless), which you must disable NAT and Firewall upon, if previously enabled. The modem/router need to be configured so that the IP got from the provider is routed directly on the network card.
    Please note that not all the modems/routers can be configured this way. Typically, there's a feature called Half Bridge that can be enabled from the device's web interface and that sets automatically the machine.
    The Half Bridge is available under other names, depending on the producers: ZIPB - zero IP bridge, DHCP spoofing, DHCP-to-PPP spoofing, IP extension etc.
    By way of example, we list some of the models on which you can (theoretically) enable that function:
Spoiler
Atlantis Land I-Storm A02-Ra2+ (Half Bridge) --> setup
Atlantis Land I-Fly wireless router A02-WRA (half bridge)
Atlantis Land VoIP ROUTER ADSL A02-RAV211 (Half Bridge)
Atlantis Land Webshare A02-RA111 (Half Bridge)
Ar520 Modem Router - Libero (ZIPB)
Alice W-Gate Ethernet (not all the versions: Half Bridge)
Thomsom SPEEDTOUCH ST605 (DHCP-to-PPP spoofing)
Alcatel Speedtouch 5xx series (Half Bridge)
Alcatel SpeedTouch Pro (DHCP spoof)
Alcatel ST570 (DHCP spoof)
Aethra ADSL Starmodem / Starbridge / Stargate ethernet - Wind/Infostrada/Tiscali (Half Bridge)
Starbridge EB1010 / EB1030 / EB1040 (Half Bridge)
Starbridge EU (Half bridge)
Sitecom ADSL Homestation DC-214v2/216v2 (Half Bridge)
Sitecom WL-118
Billion 7100S (Half Bridge)
Billion BiPAC 5200S (Half Bridge)
Billion BEC 5200S ADSL2+
Hamlet HRDSL512
Globespan Viking/BT Voyager 205 router (ZIPB) ##-> http://192.168.1.1/MainPage?id=31
LevelOne Netcon FBR-1161A
Planet ADE-3400Av2
Edimax Network AR-7064+
Kraun Network KR-93
Aceex AR11T
Aztech ADSL DSL305EU (Half bridge)
Aztech ADSL DSL305E (not all the versions) (Half bridge)
Digicom Michelangelo WAVE 8E4248 e 8E4253
Digicom ADSL2+ COMBO (Half Bridge)
Micronet SP3361A
TeleWell TW-EA501
Protac Web Excel AL2108P
Dynalink RTA1320 (Half bridge)
Dynalink RTA100 (Half bridge / ZIPB)
Dynalink 1320
NetGear DM111P Modem ethernet ADSL2+ (Half Bridge)
NetGear DG632 (Half Bridge)
Netcomm NB1300Plus4
Netcomm NB6
Netcomm NB5/NB5plus4/NB5plus4W (firmware) (Half bridge)
GreatSpeed GS-B240G ADSL (ZIPB)
Origo ASR-8400 (Half bridge)
Origo 8100 / 8400 ADSL modem router (Half Bridge)
Linksys AM200 (Half Bridge from firmware 1.19.02)
Linksys AM300 in PPPoA (firmware?) (Half Bridge)
Linksys AG241 (Half bridge)
D-Link DSL-502T GenII (firmware) (Half Bridge) ## --> http://immagini.p2pforum.it/out.php/...lfbridge99.jpg
D-Link DSL-300/320
D-Link DSL-302G (Half bridge)
D-Link DSL-300T (ZIPB)
D-Link 300G+ (DHCP spoof)
D-Link 520T (Half Bridge)
Conitech Dakota Router ADSL 2/2+ (Half bridge)
Roper Dakota Router ADSL 2/2+ (Half bridge)
Belkin F5D5730au adsl router (Half bridge)
Trust MD-4050 ADSL 2+ Modem-Router (Half Bridge)
Trust 445A Speedlink xDSL Web Station (Half bridge)
Microlink ADSL Modem Router
Safecom SAMR-4112 (Half bridge)
Solwise SAR130 (ZIPB mode)
ZyXEL P-660R-D1 router (Half bridge) ##-> http://www.zyxel.co.uk/web/support_f...20040812093058
US Robotics USR9105 (IP Extension)
US Robotics USR9106 (IP Extension)
US Robotics USR9107 (IP Extension)
US Robotics USR9108 (IP Extension)
US Robotics MAXg ADSL Gateway (IP Extension)
Zoom X4 ADSL Router (Half Bridge)
Zoom X3 ADSL Router (Half Bridge)
Zoom X6 ADSL Router (Half Bridge)

NOTE: if you can't connect to the Internet after modifying your router, check if DHCP server is still enabled.


#How to perform the test#

Before starting, communicate your IP address to the person that will join you in the test and make sure to know his/hers. (In order to know your own IP address, you can refer - for example - to this website)

Configure your PC so that it boots from CDROM, insert the Gemini CD and turn the machine on.

When UBUNTU screen shows, press [F2], choose "Italian" language, then press [ENTER] on the first line, as displayed in this figure:


(Note: inside Ubuntu, you'll find this Quick Guide that resumes the following steps)
Once you've got to the desktop, double click on "Gemini-tool" icon:


A terminal window will show where messages relative to the running program are scrolled.
Select the language (pressing «i» for Italian, "e" for english).

You'll be requested to type the IP address of the user you're performing the test with (make sure to type the IP address of your companion, not yours, without mistypings of sort: the program can't check if the IP inserted is correct):


When the other user, in his turn, has typed your IP address, the program goes on automatically.
WARNING: it's very important that the user, at this stage, doesn't open other programs or use the system: the test goes on automatically for about 5/7 minutes.
During this time, the transfer of a file is started over torrent protocol, and both the end (Gemini_A and the end Gemini_B) trace the traffic on the net:


Once the transmission is over, Gemini_A's activity has come to an end. The client should look like this:


The user with Gemini_A can restart his/her PC (System menu -> )

Gemini_B, on the other hand, shall perform the comparison between the two records, after which he'll produce a report file:

The report is already available on the Desktop (even in a compressed format): now you have only to choose how to post it on our forum:
If you select the first option, your internet browser will redirect you on this page, where you will be able to upload the log; otherwise, you can browse to search for the file hosting site of your choice;
With the second option, you can save the report on a memory drive or a USB pen.
Whichever your choice, remember that the report will be deleted from desktop when you restart your PC.

#Test results#

The results of traffic tracing are included in the report; now we have to read them: let's see how.
Below, we present two real examples of report, one of which with a "clean" line:
Spoiler
------------- Packet counts ------------- inbound outbound sent: 16633 8897 received: 16633 8897 forged: 0 0 dropped: 0 0 ___________________________Gemini______________________ Sat, 01 Mar 2008 14:47:23 +0000 B local: 84.223.89.*** B local: *.89.223.84.in-addr.arpa domain name pointer host-84-223-89-*.cust-adsl.tiscali.it. A remote: 81.74.238.*** A remote: *.238.74.81.in-addr.arpa domain name pointer host*-238-static.74-81-b.business.telecomitalia.it. Delta: 240 skipNAT: false

the other example shows a high rate of dropped and forged/spoofed packets:
Spoiler
------------- Packet counts ------------- inbound outbound sent: 7463 4476 received: 6732 4848 forged: 17 455 dropped: 748 83 __________________________Gemini______________________ Sat, 02 Mar 2008 19:12:11 +0000 B local: 84.223.89.*** B local: *.89.223.84.in-addr.arpa domain name pointer host-84-223-89-*.cust-adsl.tiscali.it. A remote: 81.74.238.*** A remote: *.238.74.81.in-addr.arpa domain name pointer host*-238-static.74-81-b.business.telecomitalia.it. Delta: 240 skipNAT: false

In the latter example, "inbound" and "outbound" are from Gemini_B's point of view.
In this case, there's almost 10% of packets directed from A to B that have been dropped, and 10% of packets directed to A that B has never sent.
In consideration of the fact that Gemini_A is the torrent seeder, and that Gemini_B is downloading from A, one can rightly suspect the ISP is involved in jamming the seeder (A)'s communications by both sending him/her forged packets and blocking some of the legitimate ones. Of course, when the uploader/seed A is slowed down, the dowloader (B) will be slowed down too.

The fact that a certain number of packets is blocked or dropped during normal Internet communications is pretty ordinary. It's not ordinary when the number of missing/blocked packets is high, and it's even less ordinary and suspect-inducing when there are apparently spoofed/forged packets - this case is about packets purposely created by ISPs and passed off as "normal" messages from an end of the connection to the other.

It's important to interpret the test report with a critical eye, making sure that the results are verifiable and reproducible, as opposed to problems caused by temporary inconveniences.

In order to establish whether the traffic limitations are due to ISPs, you can keep on performing our test with other-ISP users. This enables you to know if a user is sistematically and iniquitously filtered.
Those who have noticed their connections have problems at certain hours of the day may find useful to perform at least two tests: inside and outside the time band when the slowing down of the traffic is expected to happen.

#Common errors and problems#

Below, we list some common errors and try to give explanations for them. In case doubts still persist, you're invited to report the error as in detail as possible:
Spoiler
Common error that may show on the terminal window:
"ERROR: no internet connection found: impossible to continue."
"ERROR: no connection to ethernet card found"
There's no connection available to the Internet on your PC, or connection isn't active on Ethernet.

"ERROR: NAT enabled on the connection"
Check requirements out: the IP address you get from your modem/router isn't the same as the public IP address you get from the provider.
Read above if and how you can disable NAT on your modem/router.

"ERROR: When starting UBUNTU, you need to select Italian (F2)"
. You forgot to press F2 and to choose Italian language when launching LiveCD.
That's mandatory even in case you want to use Gemini tool in English.

"ERROR: Impossible to send Gemini_B the log."
"ERROR: Impossible to get the log from Gemini_A."

When one of these two inconveniences occur, that's most likely because your DSL line has got disconnected (or modem/router has reset it).
Try to repeat the test; if the inconvenience persists, you may not have disabled the firewall on your router, or your connection is undoubtedly unstable.

The terminal window has stopped "running" for more than 10 minutes:
Normally, while performing the test, you should see various text lines flow through the terminal window. Sometimes the terminal window seems to be "idle"; if this state lasts too long (over ten minutes), an error has surely occurred.
Send us the last viewed lines: making so will help us to work the problem out.

Another case is when, the terminal being "idle", a message appears that says:
"Info: waiting for Gemini_A/B (IP address) ...."
"Info: (close this window in order to quit)"
Simply, that's either because your friend at the other end of the connection hasn't yet launched Gemini, or the IP addresses have been mistyped. Otherwise, there must be a firewall that's still active.

#Use licences#

Ubuntu: Copyright © 2007 Canonical Ltd, Licensing
pcapdiff: Copyright © 2007 Electronic Frontier Foundation, GNU General Public License version 2/3
EFF guide: http://www.eff.org/wp/detecting-packet-injection
Wireshark®: GNU General Public License version 2
Gemini: GNU General Public License version 2

#Credits#

The users who have contributed to the development of Gemini are (in no particular order): ercoppa, Finsim, ARAGORN II, Will, cydonia, paolinopaperino, fidone, Ginalfa, bogomips_16443, [_SHIN_]

#Source code#
Here the source code of the script inside Gemini:
Spoiler
#!/bin/bash ###################################################inizializzazione skipNAT=false pppoEconf=true #sperimentale delta=240 #in secondi (minimo 75s) nomeutente=`whoami` Lselector() { case $1 in e) A14="Userinput: " A17=" is started" A18="At the UBUNTU screen you have to select Italian language (F2)" A19=">> Execution ended <<" A20="Internet is reachable" A21="Internet connection not detected: unable to continue." A22="Read p2pforum.it to check requisites and error solutions" A23="(scanning ethernet)" A24="Found ethernet:" A25=" is online" A26="Disabling checksum offloading, Wait..." A27=" ethernet not configured, (searching ethernet)" A28="Internet on ethernet not found" A30=" Detected NAT on the system" A31=" selected with IP " A32="Syncing to TimeServer" A33="remote IP" A34="Insert remote IP address: " A35="No address inserted" A36="Userinput: " A37="Waiting for Gemini_B " A38="(close the window to stop)" A39="Gemini_B is ready" A40="Waiting for Gemini_A " A41="Gemini_A is ready" A42="<<<<<<<<<<<< Connected >>>>>>>>>>>>" A43="Starting Wireshark ..." A44="Creating .torrent for seed" A45="Creating .torrent" A46="Starting bittorrent tracker ..." A47="Starting bittorrent seeder ..." A48="Starting bittorrent download ..." A49=" Transfering.. time set: " A50=" seconds" A51="WAIT [GEMINI WILL NOW CONTINUE AUTOMATICALLY]" A52="WAIT [DONT USE THE SYSTEM OR OPEN PROGRAMS ]" A53="Delta elapsed" A54="Torrent closed" A55="Transferring log file Gemini_A -> Gemini_B, wait ..." A56="Compressing and sending file ..." A57="log file transferred." A58="The final report is available on Gemini_B." A59="Execution ended. (Press [enter] to exit)" A60="An error occurred transferring the log file to Gemini_B." A61="An error occurred receiving the log file from Gemini_A." A62="log file received." A63="Uncompressing file ..." A64="Comparing log files. Wait ..." A65="Compressing..." A66="Analysis completed." A67="The final report is available on the Desktop (ReportFinale.log)" A68="_in compressed format too" A69="Select how to save the report:" A70="Select" A71="Open now Firefox for browsing" A72="Firefox is running" A73="Use a USB pen/drive" A74="Connect the drive, then drag-drop the file on the window of the drive" A75="Do nothing (the file will be erased on system restart)" A77="Warning: " A78="" ;; i|*) A14="Inserito: " A17=" e' avviato" A18="All'avvio di UBUNTU bisogna selezionare la lingua Italiana (F2)" A19=">> Esecuzione terminata <<" A20="Connessione internet attiva" A21="La connessione a internet non e' stata rilevata: impossibile proseguire." A22="Consulta il forum per controllare i requisiti e le soluzioni agli errori" A23="(ricerca ethernet)" A24="Trovata scheda di rete:" A25=" e' online" A26="Disabilito checksum offloading, Attendere..." A27=" ethernet non configurata, (ricerca ethernet)" A28="Non e' stata rilevata la connessione su scheda ethernet" A30=" Sulla connessione e' attivo un NAT" A31=" selezionata con IP " A32="Sincronizzazione col TimeServer" A33="IP compagno" A34="Inserire l'indirizzo IP del computer remoto: " A35="Nessun indirizzo inserito" A36="Inserito: " A37="In attesa di Gemini_B " A38="(chiudere questa finestra se si vuole interrompere)" A39="Gemini_B ha risposto" A40="In attesa di Gemini_A " A41="Gemini_A ha risposto" A42="<<<<<<<<<<<< Connesso >>>>>>>>>>>>" A43="Avvio Wireshark in corso.." A44="creazione .torrent per seed" A45="creazione .torrent" A46="Avvio tracker bittorrent ..." A47="Avvio seeder bittorrent ..." A48="Avvio download bittorrent ..." A49=" Trasmissione in corso.. Durata programmata: " A50=" secondi" A51="ATTENDERE [LA PROCEDURA CONTINUERA' AUTOMATICAMENTE ]" A52="ATTENDERE [NON UTILIZZARE TASTIERA O CLICCARE COL MOUSE]" A53="Trasmissione terminata" A54="Torrent chiuso" A55="Trasferimento file log Gemini_A -> Gemini_B Attendere ..." A56="Compressione e invio file ..." A57="Log trasferito." A58="L'analisi finale della linea e' disponibile sul PC Gemini_B." A59="esecuzione terminata. (Premere [invio] per uscire)" A60="Non e' stato possibile trasferire il log verso Gemini_B." A61="Non e' stato possibile ricevere il log da Gemini_A." A62="Log ricevuto." A63="Decompressione file ..." A64="Analisi del traffico generato. Attendere ..." A65="Compressione..." A66="Analisi terminata." A67="Il rapporto finale e' disponibile sul Desktop come ReportFinale.log" A68="_anche in formato compresso." A69="Procedura terminata: scegli come salvare il file di log:" A70="Seleziona" A71="Accedere adesso alla discussione su p2pforum.it (Firefox)" A72="Firefox in esecuzione" A73="Utilizzare un drive USB" A74="Collega il drive, quindi trascina il file nella finestra del drive" A75="Nessuno dei due (il file verra' cancellato al riavvio del PC)" A77="Attenzione: " A78="" ;; esac } echo echo -n "Premere 'i' per Italiano | Press 'e' for English" read -n 1 lang Lselector $lang echo echo "Info: $nomeutente$A17" sudo pkill -9 btdownloadh #pulizia preventiva se si rilancia lo script sudo pkill -9 bttrack sudo pkill -9 netcat sudo pkill -9 wireshark sudo pkill -9 dumpcap mkdir -p /home/$nomeutente/Desktop/wireshark sudo rm -f /home/$nomeutente/Desktop/wireshark/* sudo rm -f /home/$nomeutente/Desktop/ReportFinale* if [ $nomeutente == "Gemini_A" ] then seeder=true Wlogfile="Wlog_A.log" #Gemini_A: seeder#attenzione e' cablato somewhere else seeder=false Wlogfile="Wlog_B.log" #Gemini_B: downloader if test -s "/home/$nomeutente/Desktop/torrent/GeminiFile.zip.bak"; then sudo cp /home/$nomeutente/Desktop/torrent/GeminiFile.zip.bak /home/$nomeutente/Desktop/torrent/GeminiFile.zip else sudo cp /home/$nomeutente/Desktop/torrent/GeminiFile.zip /home/$nomeutente/Desktop/torrent/GeminiFile.zip.bak fi fi if test "/home/$nomeutente/Desktop/wireshark/Wlog_A.log"; then rm -f /home/$nomeutente/Desktop/wireshark/Wlog_A.log; fi if test "/home/$nomeutente/Desktop/wireshark/Wlog_B.log"; then rm -f /home/$nomeutente/Desktop/wireshark/Wlog_B.log; fi if [ "$LANG" != "it_IT.UTF-8" ]; then echo "ERROR: $A18" echo "ERROR: $A19" read x; exit #interrompe lo script: impossibile effettuare il test else echo fi ###################################################step 2,3,4,7, .. if ping -w 1 www.google.com 1>/dev/null 2>/dev/null then echo "Info: $A20" else echo "ERROR: $A21" echo "ERROR: $A22" echo "ERROR: $A19" read x; exit #interrompe lo script: impossibile effettuare il test fi c=10 nat="no" until [[ c -lt 0 ]]; do scheda=`ifconfig | grep eth$c` if [ "$scheda" = "" ] then echo "Info: eth$c $A23" c=$(($c-1)) continue fi echo "Info: $A24" $scheda attiva=`ifconfig eth$c | grep 'inet '` if [ "$attiva" != "" ] then scheda=eth$c ip=`ifconfig eth$c | grep 'inet ' | awk '{print $2}'` ip=${ip:5} echo "Info: $scheda$A25" #-------------------------------step 4 :controllo IP su tabella NAT AAA="$(echo $ip | cut -d. -f1)" BBB="$(echo $ip | cut -d. -f2)" if [[ $AAA == "10" ]] then nat="si" fi if [[ $AAA == "172" ]] && [[ $BBB > "15" && $BBB < "32" ]] then nat="si" fi if [[ $AAA == "192" ]] && [[ $BBB == "168" ]] then nat="si" fi if $skipNAT then nat="no" fi #------------------------------- if [[ $nat == "no" ]] then echo "Info: $A26" sudo ethtool -K $scheda tso off rx off tx off #root # +ufo off gso off ? sleep 10 #l'ethernet si resetta: tempo break else scheda=`` c=$(($c-1)) continue fi break else echo "Info: $scheda$A27" scheda=`` c=$(($c-1)) continue fi c=$(($c-1)) done if [ "$scheda" = "" ] #&& [ $pppoEconf == "false" ] #La connessione c'e' ma non su ethernet then echo "ERROR: $A28" echo "ERROR: $A22" echo "ERROR: $A19" echo read x; exit #interrompe lo script: impossibile effettuare il test fi if [ $nat == "si" ] #La connessione c'e' e su ethernet, ma NAT then echo "ERROR: $ip$A30" echo "ERROR: $A22" echo "ERROR: $A19" echo read x; exit #interrompe lo script: impossibile effettuare il test fi echo "Info: $scheda$A31$ip" #requisiti OK ###################################################step 6: sincronizzazione TIME (non modifica BIOS) echo "Info: $A32" sudo ntpdate ntp1.inrim.it #root ###################################################step 8: input IP compagno echo -en "\007" #"Input: Inserire l'indirizzo IP del computer remoto e premere [invio]: " IPgemello=$(zenity --entry --width=500 --title="$A33" --text="$A34 ") if [ ! "$IPgemello" ] then echo "ERROR: $A35" echo "ERROR: $A19" echo read x; exit #interrompe lo script: impossibile effettuare il test fi echo "$A36($IPgemello)" ##################################################step 9: verifico stato di pronto per entrambi gli host #Gemini_A in ascolto------------------------------------------------->>> if $seeder then segnale=dummy echo "Info(A): $A37($IPgemello) ...." echo "Info(A): $A38" while [ ! "$segnale" == "$IPgemello" ]; do #lo script non prosegue finche' non c'e' il segnale di Gemini_B (Il suo IP) segnale=`netcat -l -p 5050` done echo "Info(A): $A39" #fine gemini_A-------------------------------------------------------<<< else #Gemini_B in ascolto-------------------------------------------->>> ready=dummy echo "Info(B): $A40($IPgemello) ...." echo "Info(B): $A38" while [[ ! "$ready" == 0 ]]; do #lo script su Gemini_A e' online e pronto? echo "$ip" | netcat $IPgemello 5050 -q 2 2>/dev/null #invio segnale IP a gemini_A che prosegue lo script ready=$? sleep 2 done echo "Info(B): $A41" fi #fine Gemini_B ---------------------------------------------------<<< echo "Info: $A42" echo -en "\007" ###################################################step 11: avvio Wireshark sudo pkill -9 netcat echo "Info: $A43" sudo wireshark -a duration:$delta -k -Q -i $scheda -f "host $IPgemello" -w /home/$nomeutente/Desktop/wireshark/$Wlogfile & #root! sleep 15 ###################################################step 10: creo file torrent: #crea torrent if $seeder then echo "Info: $A44" sudo btmakemetafile.bittornado http://$ip:6969/announce /home/$nomeutente/Desktop/torrent/GeminiFile.zip sleep 1 else #downloader echo "Info: $A45" sudo btmakemetafile.bittornado http://$IPgemello:6969/announce /home/$nomeutente/Desktop/torrent/GeminiFile.zip sleep 1 sudo rm -f /home/$nomeutente/Desktop/torrent/GeminiFile.zip #altrimenti fa da seed fi ###################################################step 12:avvio Tracker BT, seeder (A) download (B) if $seeder then echo "Info: $A46" sudo bttrack --reannounce_interval 10 --port 6969 --dfile /home/$nomeutente/Desktop/torrent/dstate.log --logfile /home/$nomeutente/Desktop/torrent/tracker.log > /dev/null 2>&1 < /dev/null & # --reannounce_interval 5 ? --nat_check 0? sleep 3 echo "Info: $A47" btdownloadheadless.bittornado --spew 1 --minport 65532 --maxport 65534 --max_upload_rate 200 --saveas /home/$nomeutente/Desktop/torrent/GeminiFile.zip /home/$nomeutente/Desktop/torrent/GeminiFile.zip.torrent > /dev/null 2>&1 < /dev/null & #--ip $ip sleep 5 else #downloader echo "Info: $A48" btdownloadheadless.bittornado --spew 1 --minport 65532 --maxport 65534 --max_download_rate 200 --saveas /home/$nomeutente/Desktop/torrent/GeminiFile.zip /home/$nomeutente/Desktop/torrent/GeminiFile.zip.torrent > /dev/null 2>&1 < /dev/null & #--ip $ip sleep 5 fi #::::::::::::::::::::RoundTrip (installare hping2) (solo un host) (completare) # sudo hping2 -S --count 10 --interval 5 --destport 22 -I eth$c $IPgemello | grep 'round-trip ' & echo "Info:$A49$delta$A50" echo "$A77$A51" #Attenzione: ATTENDERE [LA PROCEDURA CONTINUERA' AUTOMATICAMENTE ] echo "$A77$A52" sleep $(($delta+15)) #attesa stimata= tempo speso apertura prog. vari +delta necessario alla trasmissione echo echo "Info: $A53" ###################################################step 13: chiusura applicazioni # Wireshark dovrebbe essere gia' chiuso.. sudo pkill -9 wireshark sudo pkill -9 dumpcap sudo pkill -9 btdownloadh sudo pkill -9 bttrack echo "Info: $A54" ###################################################step 14:trasferimento log Gemini_A ->Gemini_B echo "Info: $A55" sudo chmod -R a+rwx /home/$nomeutente/Desktop/wireshark #verifica sulla live if $seeder then echo "Info: $A56" zip -j /home/$nomeutente/Desktop/wireshark/$Wlogfile".zip" /home/$nomeutente/Desktop/wireshark/$Wlogfile sudo rm -f /home/$nomeutente/Desktop/wireshark/$Wlogfile err=`netcat -q 3 $IPgemello 5051 < /home/$nomeutente/Desktop/wireshark/$Wlogfile".zip"` #-q!! if $err then echo "Info: $A57" echo echo "Info: $A58" echo "Gemini_A: $A59" read x; exit ############ interrompe lo script: Gemini_A terminato. else echo "ERROR: $A60" echo "ERROR: $A19" read x; exit #interrompe lo script: impossibile continuare il test fi else #Gemini_B #non interrompe prima di Gemini_A altrimenti il file e' illeggibile sudo netcat -w 20 -l -p 5051 > /home/$nomeutente/Desktop/wireshark/Wlog_A.log.zip #timeout in w-sec if test ! -s "/home/$nomeutente/Desktop/wireshark/Wlog_A.log.zip" then echo "ERROR: $A61" echo "ERROR: $A19" read x; exit #interrompe lo script: impossibile continuare il test else echo "Info: $A62" echo "Info: $A63" unzip /home/$nomeutente/Desktop/wireshark/Wlog_A.log.zip -d /home/$nomeutente/Desktop/wireshark/ sudo rm -f /home/$nomeutente/Desktop/wireshark/Wlog_A.log.zip fi fi ###################################################step 15: analisi log con pcapdiff echo "Info: $A64" # locale - remoto sudo python /home/$nomeutente/Desktop/pcapdiff/pcapdiff.py -V /home/$nomeutente/Desktop/wireshark/$Wlogfile $ip /home/$nomeutente/Desktop/wireshark/Wlog_A.log $IPgemello > /home/$nomeutente/Desktop/ReportFinale_.log #opzione -t se gli orologi sono perfettamente sincronizzati, analizza l'intersezione temporale dei log. Da provare sulla live: in simulazione non funziona. dat=`date -R` IPl="$(echo $ip | cut -d. -f1,2,3).***" IPlsub="$(echo $ip | cut -d. -f4)" Rl=`echo $(host $ip) | sed -e "s/$IPlsub/*/g"` IPr="$(echo $IPgemello | cut -d. -f1,2,3).***" IPrsub="$(echo $IPgemello | cut -d. -f4)" Rr=`echo $(host $IPgemello) | sed -e "s/$IPrsub/*/g"` sudo echo "" >> /home/$nomeutente/Desktop/ReportFinale_.log sudo echo "__________________________Gemini______________________" >> /home/$nomeutente/Desktop/ReportFinale_.log sudo echo "$dat" >> /home/$nomeutente/Desktop/ReportFinale_.log #sudo echo "B local: `host $ip | awk '{printf ($5)}'`" >> /home/$nomeutente/Desktop/ReportFinale_.log #sudo echo "A remote: `host $IPgemello | awk '{printf ($5)}'`" >> /home/$nomeutente/Desktop/ReportFinale_.log sudo echo "B local: $IPl" >> /home/$nomeutente/Desktop/ReportFinale_.log sudo echo "B local: $Rl" >> /home/$nomeutente/Desktop/ReportFinale_.log sudo echo "A remote: $IPr" >> /home/$nomeutente/Desktop/ReportFinale_.log sudo echo "A remote: $Rr" >> /home/$nomeutente/Desktop/ReportFinale_.log sudo echo "Delta: $delta" >> /home/$nomeutente/Desktop/ReportFinale_.log sudo echo "skipNAT local: $skipNAT" >> /home/$nomeutente/Desktop/ReportFinale_.log sudo mv /home/$nomeutente/Desktop/ReportFinale_.log /home/$nomeutente/Desktop/ReportFinale_"$dat".log sudo rm -f /home/$nomeutente/Desktop/wireshark/* echo "Info: $A65" zip -j /home/$nomeutente/Desktop/ReportFinale_"$dat".log".zip" /home/$nomeutente/Desktop/ReportFinale_"$dat".log ###################################################step 16: salvataggio file report fuori dalla live echo "Info: $A66" echo echo "Info: $A67" echo "$A68" zaa=`zenity --width=620 --height=220 --title="Gemini" --list --radiolist \ --text="$A69" \ --column="$A70" \ --column="" \ True "$A71" \ False "$A73" \ False "$A75"` if [[ $zaa = "$A71" ]]; #1 then echo "Info: $A72" echo "Gemini_B: $A19" firefox http://www.p2pforum.it/forum/showthread.php?t=283936 exit ############ interrompe lo script: Gemini_B terminato. exit elif [[ $zaa = "$A73" ]]; #2 then zenity --title "Gemini" --info --text="$A74" echo "Gemini_B: $A19" exit ############ interrompe lo script: Gemini_B terminato. exit elif [[ $zaa = "$A75" ]]; #3 then echo "Gemini_B: $A59" read x; exit ############ interrompe lo script: Gemini_B terminato. exit else #chiusa wind o ANNULLA (4=3) echo "Gemini_B: $A59" read x; exit ############ interrompe lo script: Gemini_B terminato. exit fi #POWERED BY [_SHIN_] & P2PFORUM ###################################################

__________________
Se dovessi camminare in una valle oscura, non temerei alcun male, perché Tu sei con me
In ogni dove la Vita è piena di cose da amare.

Ultima modifica di [_SHIN_] : 16-10-2008 alle 22:45.
I video di VedoVa_NeRa su Youtube Cosa sta ascoltando VedoVa_NeRa? Le statistiche di calcolo di VedoVa_NeRa, orgoglioso membro del Team di Calcolo distribuito di P2PForum.it.
VedoVa_NeRa è offline Segnala messaggio  
Rispondi citando Citazione multipla - Includi messaggio
Segnala su: OkNotizieSegnala su Upnews.it!Segnala su Kipapa.it!Segnala su Technotizie.it!Segnala su ZicZac.it! Bookmarks: Aggiungi a Segnalo!Aggiungi a del.icio.us!Aggiungi a Google Bookmarks!
I seguenti 12 utenti ringraziano/concordano con VedoVa_NeRa per questo utile contributo:
ARAGORN II (24-03-2008), BloodyD (01-04-2008), Crow© (03-04-2008), djremix (12-05-2008), ercoppa (26-03-2008), ferdinanduzzo (27-03-2008), hillevi (24-03-2008), Manlio93 (28-09-2008), NoWaVe (27-03-2008), paolinopaperino (26-03-2008), Will (25-03-2008), ^-Super_Treje-^ (06-05-2008)
Risposta


Indietro   P2P Forum Italia > Reti e Connessioni > A tutta banda - ISP, Adsl, Contratti > Gemini Project Lab
Strumenti discussione Cerca in questa discussione
Cerca in questa discussione:

Ricerca avanzata
Modo di visualizzazione

Regole di scrittura
Tu non puoi aprire nuove discussioni
Tu non puoi rispondere ai messaggi
Tu non puoi inserire allegati
Tu non puoi modificare i tuoi messaggi

Il codice vB è On
Le faccine sono On
[IMG] é On
L' HTML è Off

Punti per lettura discussione: 0
Punti per apertura nuova disc.: 0
Punti per risposta: 0





Tutti gli orari sono GMT +2. Ora sono le 01:13.


P2P Forum Italia, 2003-2009
Lo scambio del sapere è potere