├── docs └── v1.0 │ ├── images │ ├── setup.png │ ├── bigPicture.png │ ├── full-flow.png │ ├── htp_prio_bands.png │ ├── laptop-AP-setup.png │ └── live-classification.png │ ├── Traffic_classification.pdf │ ├── README_User.md │ └── README_Developer.md ├── scripts └── v1.0 │ ├── Configure-Laptop-as-AP │ ├── make-ap.sh │ ├── remove-ap.sh │ └── Laptop-AP │ ├── KNN-classification-2-interface-machine │ ├── knn.model │ ├── main-script-KNN.sh │ ├── test-data.arff │ ├── generate-KNN-model.sh │ ├── create-htb-queues.sh │ ├── call-weka-and-find-tag.sh │ ├── knn-classification-script.py │ ├── train-data.arff │ └── data.csv │ ├── DHCP │ ├── interfaces │ ├── configure-dhcp-server.sh │ └── dhcpd.conf │ ├── Label-training-data │ ├── for-download-pcaps │ │ ├── create-header.py │ │ ├── create-training-data-for-download.sh │ │ └── create-csv-with-flow-features-download.py │ └── for-multimedia-pcaps │ │ ├── create-header.py │ │ ├── generate-list-of-port-with-GET-request.py │ │ ├── create-training-data-multimedia-with-NO-GET-request │ │ ├── create-training-data-no-GET-multimedia.sh │ │ └── create-csv-with-flow-features-with-No-GET.py │ │ ├── create-training-data-for-Multimedia.sh │ │ └── create-csv-with-flow-features.py │ ├── MOS-calculation-scripts │ ├── auto-calculate-mos.sh │ ├── calculate-moss.sh │ └── calculate-moss.py │ ├── DT-classification-2-interface-machine │ ├── main-script.sh │ ├── generate-decision-tree-model.sh │ ├── create-htb-queues.sh │ └── classification-script-decision-tree.py │ ├── DT-classification-on-laptop-AP │ ├── main-script-laptop-AP.sh │ ├── create-htb-queues-laptop-AP.sh │ └── decision-tree-classification-laptop-AP.py │ └── 2-interface-machine-files │ ├── 2interface.sh │ └── nat.sh └── README.md /docs/v1.0/images/setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkedsystemsIITB/Traffic_Classification/HEAD/docs/v1.0/images/setup.png -------------------------------------------------------------------------------- /docs/v1.0/images/bigPicture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkedsystemsIITB/Traffic_Classification/HEAD/docs/v1.0/images/bigPicture.png -------------------------------------------------------------------------------- /docs/v1.0/images/full-flow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkedsystemsIITB/Traffic_Classification/HEAD/docs/v1.0/images/full-flow.png -------------------------------------------------------------------------------- /docs/v1.0/Traffic_classification.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkedsystemsIITB/Traffic_Classification/HEAD/docs/v1.0/Traffic_classification.pdf -------------------------------------------------------------------------------- /docs/v1.0/images/htp_prio_bands.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkedsystemsIITB/Traffic_Classification/HEAD/docs/v1.0/images/htp_prio_bands.png -------------------------------------------------------------------------------- /docs/v1.0/images/laptop-AP-setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkedsystemsIITB/Traffic_Classification/HEAD/docs/v1.0/images/laptop-AP-setup.png -------------------------------------------------------------------------------- /scripts/v1.0/Configure-Laptop-as-AP/make-ap.sh: -------------------------------------------------------------------------------- 1 | sudo cp ./Laptop-AP /etc/NetworkManager/system-connections/ 2 | sudo service network-manager restart 3 | 4 | -------------------------------------------------------------------------------- /scripts/v1.0/Configure-Laptop-as-AP/remove-ap.sh: -------------------------------------------------------------------------------- 1 | sudo rm /etc/NetworkManager/system-connections/Laptop-AP 2 | sudo service network-manager restart 3 | 4 | -------------------------------------------------------------------------------- /docs/v1.0/images/live-classification.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkedsystemsIITB/Traffic_Classification/HEAD/docs/v1.0/images/live-classification.png -------------------------------------------------------------------------------- /scripts/v1.0/KNN-classification-2-interface-machine/knn.model: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/networkedsystemsIITB/Traffic_Classification/HEAD/scripts/v1.0/KNN-classification-2-interface-machine/knn.model -------------------------------------------------------------------------------- /scripts/v1.0/DHCP/interfaces: -------------------------------------------------------------------------------- 1 | # interfaces(5) file used by ifup(8) and ifdown(8) 2 | auto lo 3 | iface lo inet loopback 4 | 5 | auto eth0 6 | iface eth0 inet static 7 | address 172.16.1.70 8 | netmask 255.255.255.0 9 | gateway 172.16.1.60 10 | network 172.16.1.0 11 | 12 | -------------------------------------------------------------------------------- /scripts/v1.0/Label-training-data/for-download-pcaps/create-header.py: -------------------------------------------------------------------------------- 1 | # This script creates a csv file containing only the header 2 | 3 | print 'Src_IP,Dst_IP,Src_port,Dst_port,Avg Packet Size,Std. deviation of packet size,Total Bytes,Number of Packet,AVG. IAT(ms),Std. daviation of IAT(ms),Flow duration(SECONDS),Push_flag_cnt,Avg_wind_size,Class' 4 | -------------------------------------------------------------------------------- /scripts/v1.0/MOS-calculation-scripts/auto-calculate-mos.sh: -------------------------------------------------------------------------------- 1 | rm -rf mos-scores.txt 2 | echo "Moss score" > mos-scores.txt 3 | 4 | for p in *.pcap 5 | do 6 | echo "==========================">>mos-scores.txt 7 | echo "Name : $p" >> mos-scores.txt 8 | sh calculate-moss.sh $p>> mos-scores.txt 9 | 10 | 11 | done 12 | rm c.txt n.txt a.txt 13 | -------------------------------------------------------------------------------- /scripts/v1.0/Label-training-data/for-multimedia-pcaps/create-header.py: -------------------------------------------------------------------------------- 1 | # This script creates a csv file containing only the header 2 | 3 | print 'Src_IP,Dst_IP,Src_port,Dst_port,Avg Packet Size,Std. deviation of packet size,Total Bytes,Number of Packet,AVG. IAT(ms),Std. daviation of IAT(ms),Flow duration(SECONDS),Push_flag_cnt,Avg_wind_size,Class' 4 | -------------------------------------------------------------------------------- /scripts/v1.0/KNN-classification-2-interface-machine/main-script-KNN.sh: -------------------------------------------------------------------------------- 1 | #This the main script which creates HTB queues and also calls the python scripts which classifies the flows 2 | 3 | sudo bash create-htb-queues.sh 4 | echo "htb created...." 5 | sudo killall -9 tcpdump 6 | sudo tcpdump -pni eth1 -s 100 -C 10 -w capture & 7 | echo "tcpdump running..." 8 | sudo python knn-classification-script.py 9 | 10 | -------------------------------------------------------------------------------- /scripts/v1.0/DT-classification-2-interface-machine/main-script.sh: -------------------------------------------------------------------------------- 1 | #This the main script which creates HTB queues and also calls the python scripts which classifies the flows 2 | 3 | sudo bash create-htb-queues.sh 4 | echo "htb created...." 5 | sudo killall -9 tcpdump 6 | sudo tcpdump -pni eth1 -s 100 -C 10 -w capture & 7 | echo "tcpdump running..." 8 | sudo python classification-script-decision-tree.py 9 | 10 | -------------------------------------------------------------------------------- /scripts/v1.0/Configure-Laptop-as-AP/Laptop-AP: -------------------------------------------------------------------------------- 1 | [connection] 2 | id=Laptop-AP 3 | uuid=2ae71e0b-1a90-48ca-a7d6-e856e16eb4c9 4 | type=802-11-wireless 5 | 6 | [802-11-wireless] 7 | ssid=Laptop-AP 8 | mode=ap 9 | mac-address=00:C2:C6:3E:3A:0F 10 | security=802-11-wireless-security 11 | 12 | [802-11-wireless-security] 13 | key-mgmt=wpa-psk 14 | psk=12344321 15 | 16 | [ipv4] 17 | method=shared 18 | 19 | [ipv6] 20 | method=auto 21 | -------------------------------------------------------------------------------- /scripts/v1.0/DT-classification-on-laptop-AP/main-script-laptop-AP.sh: -------------------------------------------------------------------------------- 1 | #This the main script which creates HTB queues and also calls the python scripts which classifies the flows 2 | 3 | sudo bash create-htb-queues-laptop-AP.sh 4 | echo "htb created...." 5 | sudo killall -9 tcpdump 6 | sudo tcpdump -pni eth0 -s 100 -C 5 -w capture & 7 | echo "tcpdump running..." 8 | sudo python decision-tree-classification-laptop-AP.py 9 | 10 | -------------------------------------------------------------------------------- /scripts/v1.0/KNN-classification-2-interface-machine/test-data.arff: -------------------------------------------------------------------------------- 1 | @relation data 2 | @attribute 'Avg Packet Size' numeric 3 | @attribute 'Std. deviation of packet size' numeric 4 | @attribute 'Total Bytes' numeric 5 | @attribute 'AVG. IAT(ms)' numeric 6 | @attribute 'Std. daviation of IAT(ms)' numeric 7 | @attribute 'Flow duration(SECONDS)' numeric 8 | @attribute Push_flag_cnt numeric 9 | @attribute Avg_wind_size numeric 10 | @attribute Class {download,multimedia} 11 | @data 12 | 13 | 1495,70,1495772,1.09,1.35,1.08450835,3,30015,download -------------------------------------------------------------------------------- /scripts/v1.0/DT-classification-2-interface-machine/generate-decision-tree-model.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This script is used to generate decision tree model from the given training data (filename must be data.csv) 4 | 5 | 6 | user_name=`whoami` #(your_user_name) 7 | weka_path=/home/$user_name/weka-3-6-13/weka.jar 8 | 9 | sudo java -Xmx2024m -classpath CLASSPATH::$weka_path weka.core.converters.CSVLoader data.csv > train-data.arff 10 | java -Xmx2024m -classpath CLASSPATH:$weka_path weka.classifiers.trees.BFTree -S 1 -M 2 -N 5 -C 1.0 -P POSTPRUNED -t train-data.arff 11 | 12 | -------------------------------------------------------------------------------- /scripts/v1.0/2-interface-machine-files/2interface.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # This script is meant for shadowfax setup, needed to be executed on shadowfax machine. 3 | # It is used to make a bridge between the two interfaces iof the machine. It forwards all the packets from eth0 to eth1 interface and vice-versa. 4 | # 5 | sudo echo 1 > /proc/sys/net/ipv4/ip_forward # enable IP forwarding 6 | sudo iptables -A FORWARD -i eth0 -o eth1 -j ACCEPT # forward all the packets from eth0 to eth1 7 | sudo iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT # forward all the packets from eth1 to eth0 8 | -------------------------------------------------------------------------------- /scripts/v1.0/2-interface-machine-files/nat.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This script is executed on shadowfax machine. 4 | #It is used for natting. It translates private ip to public ip for all the packets going outside of the private network, i.e. packets going to the Internet. Similarly, it translates public ip to private ip for all the packets coming from Internet. It changes the source IP of the packets going to the Internet, to its own IP address (masquerade), i.e. desktop’s eth0 IP address 5 | 6 | 7 | sudo ifconfig eth1 172.16.1.60 # assign static IP for gateway 8 | sudo iptables -P FORWARD ACCEPT # disabling the firewall 9 | sudo iptables --table nat -A POSTROUTING -o eth0 -j MASQUERADE # iptables rules for natting 10 | -------------------------------------------------------------------------------- /scripts/v1.0/DHCP/configure-dhcp-server.sh: -------------------------------------------------------------------------------- 1 | # This script make the system work as DHCP server. 2 | # the server gets static IP as 172.16.1.70 3 | # And client machines get IP range 172.16.1.10 to 172.16.1.50; 4 | # gateway 172.16.1.60 5 | # these things have been specified in dhcp.conf file 6 | 7 | 8 | # simply run this sript as $ bash setup.sh 9 | 10 | # it first copies these files at appropriate locations 11 | sudo cp dhcpd.conf /etc/dhcp/ #added on 9 june 12 | sudo cp interfaces /etc/network #added on 9 june 13 | 14 | 15 | #and then restarts the server 16 | 17 | sudo ifconfig eth0 172.16.1.70 18 | sudo service isc-dhcp-server stop 19 | sudo service isc-dhcp-server start 20 | sudo service isc-dhcp-server status 21 | sudo /etc/init.d/networking restart 22 | -------------------------------------------------------------------------------- /scripts/v1.0/KNN-classification-2-interface-machine/generate-KNN-model.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | user_name=`whoami` #(your_user_name) 4 | weka_path=/home/$user_name/weka-3-6-13/weka.jar 5 | 6 | 7 | 8 | # This script is used to generate KNN model from the training file which must be in CSV format. 9 | 10 | # Below line converts the training file (data.csv) in to arff format. 11 | sudo java -Xmx2024m -classpath CLASSPATH:$weka_path weka.core.converters.CSVLoader data.csv > train-data.arff 12 | 13 | # Next line builds the model using training data set and save it as knn.model 14 | sudo java -Xmx2024m -classpath CLASSPATH:$weka_path weka.classifiers.lazy.IBk -K 1 -W 0 -A "weka.core.neighboursearch.LinearNNSearch -A \"weka.core.EuclideanDistance -R first-last\"" -t train-data.arff -d knn.model >a 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /scripts/v1.0/Label-training-data/for-multimedia-pcaps/generate-list-of-port-with-GET-request.py: -------------------------------------------------------------------------------- 1 | # This script is invoked by create-training-data-for-Multimedia.sh 2 | # It takes a file as input which contains packets with HTTP GET request. 3 | # It creates a string which looks like "tcp.dstport == 47997 or tcp.dstport == 49146 or ...." . This string is written into a filter.txt. 4 | 5 | import csv 6 | import sys, getopt 7 | 8 | set_ports = set() 9 | filter_string = "" 10 | 11 | with open(sys.argv[1], 'rb') as csvfile: # open the input file 12 | reader = csv.reader(csvfile, delimiter=' ', quotechar='|') 13 | for row in reader: 14 | port = row[0].split("|")[3] # take 5th field # split the line with '|', take 5th field, which is destination port number 15 | if port : # if dst port not null, add it to the set 16 | set_ports.add(port) 17 | 18 | 19 | 20 | # Now create the filter string by concatenating the dst ports. 21 | for p in set_ports: 22 | filter_string = filter_string + " tcp.dstport == "+p + " or " 23 | 24 | with open('filter.txt', 'w') as f: # write it into a file 25 | f.write(filter_string[:-3]) 26 | 27 | 28 | -------------------------------------------------------------------------------- /scripts/v1.0/MOS-calculation-scripts/calculate-moss.sh: -------------------------------------------------------------------------------- 1 | #This script calculate latency (rtt), jitter and loss percentage, and using it it finds MOS score for given pcap file 2 | 3 | 4 | # the following command gives list of RTT of all the packets, we use ip filter to remove unnecessary packets. YOu must set ths ip as the ip of your client machines IP on which you took these trace files (pcap files) 5 | tshark -r $1 -R "tcp.analysis.ack_rtt and (ip.dst==172.16.255.255/16 or ip.src == 172.16.255.255/16)" -e tcp.analysis.ack_rtt -T fields -E separator=, -E quote=d > n.txt 6 | 7 | sed 's/"//g' n.txt > a.txt 8 | 9 | 10 | # the following command calcuates tcp retransmission, number of duplicate acks, number of lost segments and number of fast retransmission 11 | tshark -r $1 -R "(ip.dst==172.16.255.255/16 or ip.src == 172.16.255.255/16)" -q -z io,stat,10000,"COUNT(tcp.analysis.retransmission) tcp.analysis.retransmission","COUNT(tcp.analysis.duplicate_ack)tcp.analysis.duplicate_ack","COUNT(tcp.analysis.lost_segment) tcp.analysis.lost_segment","COUNT(tcp.analysis.fast_retransmission) tcp.analysis.fast_retransmission" | tail -2| head -1 > c.txt 12 | 13 | a=`cat c.txt |cut -d "|" -f5` # tcp retransmission 14 | b=`cat c.txt |cut -d "|" -f6` # number of duplicate acks 15 | c=`cat c.txt |cut -d "|" -f7` # number of lost segments 16 | d=`cat c.txt |cut -d "|" -f8` # number of fast retransmission 17 | e=`expr $a + $b+ $c+ $d` 18 | #echo $a $b $c $d $e 19 | 20 | 21 | # cnt varible stores total number of packets 22 | cnt=`cat c.txt |cut -d "|" -f3` 23 | 24 | 25 | # following script calculate MOS score, it takes two inputs : total number of lost packets and total packets 26 | python calculate-moss.py $e $cnt 27 | 28 | -------------------------------------------------------------------------------- /scripts/v1.0/DT-classification-on-laptop-AP/create-htb-queues-laptop-AP.sh: -------------------------------------------------------------------------------- 1 | # This script works on laptop-AP setup and creates 3 HTB bands and also throttles the bandwidth to 1500 KBps (here kbps == Kilo Bytes per second , and kbits = kilo bits) 2 | # Band 5 is priritized band ; Band 6 is neutral band ; Band 7 is de-priritized band 3 | # This is applied at wlan0 interface. 4 | 5 | # Each band has two attributes: 6 | # 1. rate : it defines the Mininmum rate witch is guaranteed always. 7 | # 2. ceil : it defines the Maximum rate which can be achieved by this band, if available. 8 | 9 | #--------------------------------- 10 | 11 | upperLimit=1500kbps # here kbps =>Kilo Bytes per second 12 | lowerLimit=50kbps 13 | 14 | sudo iptables -t mangle -F # flush all rules from mangle table 15 | sudo tc qdisc del dev wlan0 root # delete all qdisc at wlan0 , if any exist. 16 | 17 | sudo tc qdisc add dev wlan0 root handle 1: htb default 6 # create the htb qdisc at wlan0 interface 18 | 19 | sudo tc class add dev wlan0 parent 1: classid 1:1 htb rate $upperLimit # Define upper limit at the root of the HTB itself 20 | 21 | sudo tc class add dev wlan0 parent 1:1 classid 1:5 htb rate $lowerLimit ceil $upperLimit prio 0 # Prioritized band 22 | sudo tc class add dev wlan0 parent 1:1 classid 1:6 htb rate $lowerLimit ceil $upperLimit prio 1 # Default class 23 | sudo tc class add dev wlan0 parent 1:1 classid 1:7 htb rate $lowerLimit ceil $upperLimit prio 2 # De-Prioritized band 24 | 25 | 26 | sudo tc filter add dev wlan0 parent 1:0 prio 1 protocol ip handle 5 fw flowid 1:5 # Filter packets marked with 5 and send them to class 1:5 27 | sudo tc filter add dev wlan0 parent 1:0 prio 1 protocol ip handle 7 fw flowid 1:7 # Filter packets marked with 7 and send them to class 1:7 28 | 29 | 30 | -------------------------------------------------------------------------------- /scripts/v1.0/DT-classification-2-interface-machine/create-htb-queues.sh: -------------------------------------------------------------------------------- 1 | # This script creates 3 HTB bands and also throttles the bandwidth to 1500 KBps (here kbps == Kilo Bytes per second , and kbits = kilo bits) 2 | # Band 5 is priritized band ; Band 6 is neutral band ; Band 7 is de-priritized band 3 | # This is applied at eth1 interface. 4 | 5 | # Each band has two attributes: 6 | # 1. rate : it defines the Mininmum rate witch is guaranteed always. 7 | # 2. ceil : it defines the Maximum rate which can be achieved by this band, if available. 8 | 9 | #----------------------------------- 10 | 11 | #iptables -L -t mangle --line-numbers 12 | #iptables -t mangle -D POSTROUTING x 13 | 14 | #--------------------------------- 15 | 16 | upperLimit=1500kbps # here kbps =>Kilo Bytes per second 17 | lowerLimit=50kbps 18 | 19 | sudo iptables -t mangle -F # flush all rules from mangle table 20 | sudo tc qdisc del dev eth1 root # delete all qdisc at eth1 , if any exist. 21 | 22 | sudo tc qdisc add dev eth1 root handle 1: htb default 6 # create the htb qdisc at eth1 interface 23 | 24 | sudo tc class add dev eth1 parent 1: classid 1:1 htb rate $upperLimit # Define upper limit at the root of the HTB itself 25 | 26 | sudo tc class add dev eth1 parent 1:1 classid 1:5 htb rate $lowerLimit ceil $upperLimit prio 0 # Prioritized band 27 | sudo tc class add dev eth1 parent 1:1 classid 1:6 htb rate $lowerLimit ceil $upperLimit prio 1 # Default class 28 | sudo tc class add dev eth1 parent 1:1 classid 1:7 htb rate $lowerLimit ceil $upperLimit prio 2 # De-Prioritized band 29 | 30 | 31 | sudo tc filter add dev eth1 parent 1:0 prio 1 protocol ip handle 5 fw flowid 1:5 # Filter packets marked with 5 and send them to class 1:5 32 | sudo tc filter add dev eth1 parent 1:0 prio 1 protocol ip handle 7 fw flowid 1:7 # Filter packets marked with 7 and send them to class 1:7 33 | 34 | 35 | -------------------------------------------------------------------------------- /scripts/v1.0/KNN-classification-2-interface-machine/create-htb-queues.sh: -------------------------------------------------------------------------------- 1 | # This script creates 3 HTB bands and also throttles the bandwidth to 1500 KBps (here kbps == Kilo Bytes per second , and kbits = kilo bits) 2 | # Band 5 is priritized band ; Band 6 is neutral band ; Band 7 is de-priritized band 3 | # This is applied at eth1 interface. 4 | 5 | # Each band has two attributes: 6 | # 1. rate : it defines the Mininmum rate witch is guaranteed always. 7 | # 2. ceil : it defines the Maximum rate which can be achieved by this band, if available. 8 | 9 | #----------------------------------- 10 | 11 | #iptables -L -t mangle --line-numbers 12 | #iptables -t mangle -D POSTROUTING x 13 | 14 | #--------------------------------- 15 | 16 | upperLimit=1500kbps # here kbps =>Kilo Bytes per second 17 | lowerLimit=50kbps 18 | 19 | sudo iptables -t mangle -F # flush all rules from mangle table 20 | sudo tc qdisc del dev eth1 root # delete all qdisc at eth1 , if any exist. 21 | 22 | sudo tc qdisc add dev eth1 root handle 1: htb default 6 # create the htb qdisc at eth1 interface 23 | 24 | sudo tc class add dev eth1 parent 1: classid 1:1 htb rate $upperLimit # Define upper limit at the root of the HTB itself 25 | 26 | sudo tc class add dev eth1 parent 1:1 classid 1:5 htb rate $lowerLimit ceil $upperLimit prio 0 # Prioritized band 27 | sudo tc class add dev eth1 parent 1:1 classid 1:6 htb rate $lowerLimit ceil $upperLimit prio 1 # Default class 28 | sudo tc class add dev eth1 parent 1:1 classid 1:7 htb rate $lowerLimit ceil $upperLimit prio 2 # De-Prioritized band 29 | 30 | 31 | sudo tc filter add dev eth1 parent 1:0 prio 1 protocol ip handle 5 fw flowid 1:5 # Filter packets marked with 5 and send them to class 1:5 32 | sudo tc filter add dev eth1 parent 1:0 prio 1 protocol ip handle 7 fw flowid 1:7 # Filter packets marked with 7 and send them to class 1:7 33 | 34 | 35 | -------------------------------------------------------------------------------- /scripts/v1.0/Label-training-data/for-multimedia-pcaps/create-training-data-multimedia-with-NO-GET-request/create-training-data-no-GET-multimedia.sh: -------------------------------------------------------------------------------- 1 | # This is the main script... 2 | # This script is meant for fetching multimedia flows from the trace file given. 3 | # This script finally generates a csv file containing 4-tuple(SIP,DIP,SP,DP) along with 8 feature values for that flow. Each row in that csv represents a unique flow. 4 | 5 | # As we use this script to fetch multimedia flows, and they are further used to train the classifier. The traces we took on different machines and we were only interested in all incoming packets. So we set filters to identify incoming packets. In our case, the client machines had following IPs. 6 | client_ip34="172.16.1.34" 7 | client_ip12="172.16.1.12" 8 | client_ip13="172.16.1.13" 9 | 10 | # Delete temporary files which are not needed, 11 | # Here we have used *csv, *txt which will delete all txt and csv files, so be CAREFUL. 12 | rm -rf *csv *.txt 13 | 14 | # Here we want to run this script on all the trace files (pcap files) present in the current directory. 15 | # keep all the training pcap files in the current folder before running this script. 16 | 17 | 18 | # following loop, takes each pcap file one by one and on each pcap file, we apply a filter to find all packets which are incoming to any one of the mentined ip addresses. 19 | # it creates a txt file named as pcapFileName.txt, which has many rows, each row re presents a packet. 20 | 21 | # for each pcap file, we have one txt file generated here 22 | 23 | # Now this txt file is given to another script 'create-csv-with-flow-features-with-No-GET.py' , which will convert this packet level information to flow level information 24 | # That script will generate a csv file which will contain multimedia flows along with 4-tuple information and feature values 25 | 26 | 27 | for f in *.pcap 28 | do 29 | echo $f 30 | tshark -r $f -R "(ip.dst==$client_ip34 or ip.dst==$client_ip12 or ip.dst==$client_ip13)" -T fields -e frame.time_relative -e ip.src -e ip.dst -e tcp.srcport -e tcp.dstport -e ip.len -e tcp.flags.push -e tcp.window_size -E separator='|' > $f.txt 31 | 32 | done 33 | 34 | 35 | 36 | 37 | #Now run python script to generate csv file, where Each row will represents a multimedia flow. 38 | for f in *.txt 39 | do 40 | python create-csv-with-flow-features-with-No-GET.py $f 1000 > $f.csv # 1st param:txt file ; 2nd param : threshold points (no. of packets after which classification need to be done) 41 | 42 | done 43 | rm -rf all-multimedia-flows.csv 44 | cat *.csv > all-multimedia-flows.csv 45 | 46 | # at this point of time, we have created 'all-multimedia-flows.csv' which contains all the multimedia flows along with their feature values. 47 | # Now just put all temporary txt and csv file to a new directory txt-files and CSV-files respectively. 48 | mkdir -p CSV-files # create directory if not exist already 49 | mkdir -p txt-files 50 | 51 | 52 | mv *txt txt-files/ 53 | mv *csv CSV-files 54 | 55 | mv CSV-files/all-multimedia-flows.csv . 56 | -------------------------------------------------------------------------------- /scripts/v1.0/MOS-calculation-scripts/calculate-moss.py: -------------------------------------------------------------------------------- 1 | 2 | # This sccript calculates MOS score using latency, jitter and loss percentage parameters. 3 | 4 | # This script takes two input : total number of lost packets and total packets 5 | 6 | 7 | import math 8 | import sys 9 | import numpy 10 | 11 | flow_list = [] # this list contains all the RTT 12 | 13 | with open('a.txt','r') as f1: 14 | for line in f1: 15 | time = float(line) 16 | if (time < 5): # we ignores long RTT packets those are outliers 17 | flow_list.append(time) 18 | 19 | 20 | count=0 21 | summ=0 22 | a=0 23 | avg_RTT=0 24 | rtt_dif=0 25 | avg_diff=0 26 | last=0 27 | 28 | #-------------------------------------------------------------------------------------------------------------------------------- 29 | 30 | for key in flow_list: 31 | summ=summ+key # summ represents sum of RTTs 32 | count=count+1 # count represents total number of packets 33 | if(a==1): 34 | rtt_dif=rtt_dif+abs(key-last) # rtt_diff represents jitter, which is difference between the two consecutive RTTs 35 | a=1 36 | last=key 37 | 38 | if(count>0): 39 | avg_RTT=summ/count # average RTT 40 | avg_diff=rtt_dif/(count-1) # average jitter 41 | 42 | 43 | avg_RTT=avg_RTT*1000 # convert it to milli seconds 44 | avg_diff=avg_diff*1000 # convert it to milli seconds 45 | 46 | 47 | loss_per=float(sys.argv[1])*100/float(sys.argv[2]) # calculate loss percentage 48 | 49 | 50 | print "Avg latency: "+ str(avg_RTT) +" ms" 51 | print "Avg jitter: "+ str(avg_diff) +" ms" 52 | print "Lost percentage: "+str(loss_per)+" %" 53 | 54 | ''' 55 | We use the following equations from Pingplotter software page ( https://www.pingman.com/kb/article/how-is-mos-calculated-in-pingplotter-pro-50.html ) to calculate the MOS score 56 | ========================================================================================= 57 | 58 | ' Take the average latency, add jitter, but double the impact to latency 59 | ' then add 10 for protocol latencies 60 | EffectiveLatency = ( AverageLatency + Jitter * 2 + 10 ) 61 | 62 | ' Implement a basic curve - deduct 4 for the R value at 160ms of latency 63 | ' (round trip). Anything over that gets a much more agressive deduction 64 | if EffectiveLatency < 160 then 65 | R = 93.2 - (EffectiveLatency / 40) 66 | else 67 | R = 93.2 - (EffectiveLatency - 120) / 10 68 | 69 | ' Now, let's deduct 2.5 R values per percentage of packet loss 70 | R = R - (PacketLoss * 2.5) 71 | 72 | ' Convert the R into an MOS value.(this is a known formula) 73 | MOS = 1 + (0.035) * R + (.000007) * R * (R-60) * (100-R) 74 | ========================================================================================= 75 | ''' 76 | 77 | r=0 78 | el=0 # effective latency 79 | el=avg_RTT+avg_diff*2+10 80 | if(el<160): 81 | r=93.2-(el/40) 82 | else: 83 | r=93.2-(el-120)/10 84 | 85 | mos=0 86 | 87 | r = r - (loss_per * 2.5) 88 | 89 | mos= 1 + (0.035) * r + (.000007) * r * (r-60) * (100-r) # calculate the MOS score 90 | 91 | 92 | print "MOS Score: "+str(mos) 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /scripts/v1.0/Label-training-data/for-download-pcaps/create-training-data-for-download.sh: -------------------------------------------------------------------------------- 1 | # This is the main script... 2 | # This script is meant for fetching download flows from the trace file given. 3 | # This script finally generates a csv file containing 4-tuple(SIP,DIP,SP,DP) along with 8 feature values for that flow. Each row in that csv represents a unique flow. 4 | 5 | # As we use this script to fetch download flows, and they are further used to train the classifier. The traces we took on different machines and we were only interested in all incoming packets. So we set filters to identify incoming packets. In our case, the client machines had following IPs. 6 | client_ip34="172.16.1.34" 7 | client_ip12="172.16.1.12" 8 | client_ip13="172.16.1.13" 9 | 10 | # Delete temporary files which are not needed, 11 | # Here we have used *csv, *txt which will delete all txt and csv files, so be CAREFUL. 12 | rm -rf *csv *.txt 13 | 14 | # Here we want to run this script on all the trace files (pcap files) present in the current directory. 15 | # keep all the training pcap files in the current folder before running this script. 16 | 17 | 18 | # following loop, takes each pcap file one by one and on each pcap file, we apply a filter to find all packets which are incoming to any one of the mentined ip addresses. 19 | # it creates a txt file named as pcapFileName.txt, which has many rows, each row re presents a packet. 20 | 21 | # for each pcap file, we have one txt file generated here 22 | 23 | # Now this txt file is given to another script 'create-csv-with-flow-features-download.py' , which will convert this packet level information to flow level information 24 | # That script will generate a csv file which will contain download flows along with 4-tuple information and feature values 25 | 26 | 27 | for f in *.pcap 28 | do 29 | echo $f 30 | tshark -r $f -R "(ip.dst==$client_ip34 or ip.dst==$client_ip12 or ip.dst==$client_ip13)" -T fields -e frame.time_relative -e ip.src -e ip.dst -e tcp.srcport -e tcp.dstport -e ip.len -e tcp.flags.push -e tcp.window_size -E separator='|' > $f.txt 31 | 32 | done 33 | 34 | 35 | 36 | # Next 'create-header.py' will generate a csv file containing only one row .i.e. Header, that will be used when we merge all CSV files into one file 37 | python create-header.py > aaa_Header.csv # this filename must come first in alphabetical order, this is needed for successfully merging the csv files 38 | # that's why dummy aaa appended in the name, in the front. 39 | 40 | 41 | #Now run python script to generate csv file, where Each row will represents a download flow. 42 | for f in *.txt 43 | do 44 | python create-csv-with-flow-features-download.py $f 1000 > $f.csv # 1st param:txt file ; 2nd param : threshold points (no. of packets after which classification need to be done) 45 | 46 | done 47 | rm -rf all-download-flows.csv 48 | cat *.csv > all-download-flows.csv 49 | 50 | # at this point of time, we have created 'all-download-flows.csv' which contains all the download flows along with their feature values. 51 | # Now just put all temporary txt and csv file to a new directory txt-files and CSV-files respectively. 52 | rm aaa_Header.csv # not required, delete it 53 | mkdir -p CSV-files # create directory if not exist already 54 | mkdir -p txt-files 55 | 56 | 57 | mv *txt txt-files/ 58 | mv *csv CSV-files 59 | 60 | mv CSV-files/all-download-flows.csv . 61 | -------------------------------------------------------------------------------- /scripts/v1.0/KNN-classification-2-interface-machine/call-weka-and-find-tag.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | user_name=`whoami` #(your_user_name) 4 | weka_path=/home/$user_name/weka-3-6-13/weka.jar 5 | 6 | # This weka_path 7 | 8 | # This script is invoked by 'knn-classification-script.py' after features values have been calculated for the flow in the consideration. 9 | # It uses the training data (train-data.arff) and the KNN model (knn.model) to predict the class tag for the test flow (test-data.arff). 10 | 11 | # Below line converts the training file (data.csv) in to arff format. 12 | #sudo java -Xmx2024m -classpath CLASSPATH:$weka_path weka.core.converters.CSVLoader data.csv > train-data.arff 13 | 14 | # Next line builds the model using training data set and save it 15 | #sudo java -Xmx2024m -classpath CLASSPATH:$weka_path weka.classifiers.lazy.IBk -K 1 -W 0 -A "weka.core.neighboursearch.LinearNNSearch -A \"weka.core.EuclideanDistance -R first-last\"" -t train-data.arff -d knn.model >a 16 | 17 | # we have commented above commands to convert the data in csv file to arff file, and also the command which creates the model using that training data in arff format, as these two things we need to do only when there is any update in the training data. 18 | 19 | 20 | # Now load the knn model and then classify the test data 21 | 22 | # This command will use the existing knn model, train data and test instance to predict the tag 23 | java -Xmx2024m -classpath CLASSPATH:$weka_path weka.classifiers.lazy.IBk -l knn.model -T test-data.arff | tail -4|head -3|cut -d "|" -f1>temp.txt 24 | 25 | cat temp.txt 26 | 27 | <tag.txt 57 | exit 58 | fi 59 | 60 | b=`cut -d " " -f3 temp.txt|grep 1|wc -l` 61 | 62 | if [ $b -eq 1 ]; 63 | then 64 | echo "multimedia" >tag.txt 65 | exit 66 | fi 67 | c=`cut -d " " -f4 temp.txt|grep 1|wc -l` 68 | 69 | rm temp.txt 70 | #====================================================END======================================================== 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Traffic Classification & Prioritization 2 | 3 | The overall goal of this project is to improve the quality of multimedia streaming. This becomes important when other users/applications are downloading large files etc., and it leads to the multimedia quality deterioration. So we first identify the multimedia flow (classification) and then prioritize it. Current Version is 1.0, and it is released on June 22, 2016. 4 | 5 | #### Outline 6 | Traffic classification is useful for traffic engineering and network security. Network administrators can use it to allocate, control and manage the network resources as per their requirements. Classification methods can be used to classify P2P traffic, encrypted traffic, web, streaming, download or any specific application. 7 | 8 | Our classification model classifies traffic into two classes, i.e., multimedia and download. We used supervised machine learning algorithms (Decision Tree and K-NN) to build the classification model. This model is trained using pre-labeled training instances and later used to classify the traffic in real-time. We use packet level statistics (average packet size, average inter-arrival time, receiver's window size, flow duration etc.) as features for classification algorithms. 9 | 10 | Prioritization module ensures that once the flow is identified as multimedia it will get higher priority over the download flows. We used HTB (Hierarchical Token Bucket Filter) for this purpose. 11 | 12 | We have also developed heuristics that can automatically label the training data set with some manual inputs, i.e. labeling each flow in the data set as either multimedia or download. These heuristics look at URI of HTTP GET request and search for multimedia file formats in it, if found then it labels that flow as multimedia. 13 | 14 | This project can be used to create a large training data, train the classifier and further classify the traffic. Someone may try to add few new features and change specific settings to analyze the classification behavior. 15 | 16 | 17 | #### List of modules developed 18 | 19 | - Classification module (2 approaches, K-NN and decision tree) 20 | - Prioritization module (HTB) 21 | - Auto-labeling heuristics to create large training data 22 | - Configure laptop as AP 23 | - Configure the DHCP server 24 | 25 | #### Directory Structure 26 | - **doc**: Contains project documentation 27 | - **scripts**: Contains necessary scripts for the setup, classification and prioritization. 28 | 29 | #### Contents #### 30 | - A [Detailed Report](docs/v1.0/Traffic_classification.pdf) containing an explanation our work in detail. 31 | - Scripts for various setups, classification and prioritization. 32 | - A [user guide](docs/v1.0/README_User.md) containing the setup and installation instructions. 33 | - A [developer guide](docs/v1.0/README_Developer.md) which explains the structure of the scripts. 34 | 35 | #### Authors #### 36 | * [Hiren Patel](https://www.linkedin.com/in/hiren-patel-8b310283), Master's student (2014-2016), Dept. of Computer Science and Engineering, IIT Bombay. 37 | * [Vidya Sagar Kushwaha](https://in.linkedin.com/in/vidya-sagar-kushwaha-a713a835), Master's student (2014-2016), Dept. of Computer Science and Engineering, IIT Bombay. 38 | * [Prof. Mythili Vutukuru](https://www.cse.iitb.ac.in/~mythili/), Dept. of Computer Science and Engineering, IIT Bombay. 39 | 40 | #### Contact Us 41 | - Hiren Patel, hiren131292[AT]gmail.com 42 | - Vidya Sagar Kushwaha, vskushwaha21[AT]gmail.com 43 | - Prof. Mythili Vutukuru, mythili[AT]cse.iitb.ac.in 44 | 45 | 46 | -------------------------------------------------------------------------------- /scripts/v1.0/DHCP/dhcpd.conf: -------------------------------------------------------------------------------- 1 | # 2 | # Sample configuration file for ISC dhcpd for Debian 3 | # 4 | # Attention: If /etc/ltsp/dhcpd.conf exists, that will be used as 5 | # configuration file instead of this file. 6 | # 7 | # 8 | 9 | # The ddns-updates-style parameter controls whether or not the server will 10 | # attempt to do a DNS update when a lease is confirmed. We default to the 11 | # behavior of the version 2 packages ('none', since DHCP v2 didn't 12 | # have support for DDNS.) 13 | ddns-update-style none; 14 | 15 | # option definitions common to all supported networks... 16 | option domain-name "example.org"; 17 | option domain-name-servers ns1.example.org, ns2.example.org; 18 | 19 | default-lease-time 600; 20 | max-lease-time 7200; 21 | 22 | # If this DHCP server is the official DHCP server for the local 23 | # network, the authoritative directive should be uncommented. 24 | #authoritative; 25 | 26 | # Use this to send dhcp log messages to a different log file (you also 27 | # have to hack syslog.conf to complete the redirection). 28 | log-facility local7; 29 | 30 | # No service will be given on this subnet, but declaring it helps the 31 | # DHCP server to understand the network topology. 32 | 33 | #subnet 10.152.187.0 netmask 255.255.255.0 { 34 | #} 35 | 36 | # This is a very basic subnet declaration. 37 | 38 | #subnet 192.168.1.0 netmask 255.255.255.0 { 39 | # range 192.168.1.10 192.168.1.20; 40 | # option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org; 41 | #} 42 | 43 | # This declaration allows BOOTP clients to get dynamic addresses, 44 | # which we don't really recommend. 45 | 46 | #subnet 10.254.239.32 netmask 255.255.255.224 { 47 | # range dynamic-bootp 10.254.239.40 10.254.239.60; 48 | # option broadcast-address 10.254.239.31; 49 | # option routers rtr-239-32-1.example.org; 50 | #} 51 | 52 | # A slightly different configuration for an internal subnet. 53 | subnet 172.16.1.0 netmask 255.255.255.0 { 54 | range 172.16.1.10 172.16.1.50; 55 | option domain-name-servers 10.200.1.11; 56 | #option domain-name 10.200.1.11; 57 | option routers 172.16.1.60; 58 | option broadcast-address 172.16.1.255; 59 | default-lease-time 600; 60 | max-lease-time 7200; 61 | } 62 | 63 | # Hosts which require special configuration options can be listed in 64 | # host statements. If no address is specified, the address will be 65 | # allocated dynamically (if possible), but the host-specific information 66 | # will still come from the host declaration. 67 | 68 | #host passacaglia { 69 | # hardware ethernet 0:0:c0:5d:bd:95; 70 | # filename "vmunix.passacaglia"; 71 | # server-name "toccata.fugue.com"; 72 | #} 73 | 74 | # Fixed IP addresses can also be specified for hosts. These addresses 75 | # should not also be listed as being available for dynamic assignment. 76 | # Hosts for which fixed IP addresses have been specified can boot using 77 | # BOOTP or DHCP. Hosts for which no fixed address is specified can only 78 | # be booted with DHCP, unless there is an address range on the subnet 79 | # to which a BOOTP client is connected which has the dynamic-bootp flag 80 | # set. 81 | #host fantasia { 82 | # hardware ethernet 08:00:07:26:c0:a5; 83 | # fixed-address fantasia.fugue.com; 84 | #} 85 | 86 | # You can declare a class of clients and then do address allocation 87 | # based on that. The example below shows a case where all clients 88 | # in a certain class get addresses on the 10.17.224/24 subnet, and all 89 | # other clients get addresses on the 10.0.29/24 subnet. 90 | 91 | #class "foo" { 92 | # match if substring (option vendor-class-identifier, 0, 4) = "SUNW"; 93 | #} 94 | 95 | #shared-network 224-29 { 96 | # subnet 10.17.224.0 netmask 255.255.255.0 { 97 | # option routers rtr-224.example.org; 98 | # } 99 | # subnet 10.0.29.0 netmask 255.255.255.0 { 100 | # option routers rtr-29.example.org; 101 | # } 102 | # pool { 103 | # allow members of "foo"; 104 | # range 10.17.224.10 10.17.224.250; 105 | # } 106 | # pool { 107 | # deny members of "foo"; 108 | # range 10.0.29.10 10.0.29.230; 109 | # } 110 | #} 111 | -------------------------------------------------------------------------------- /docs/v1.0/README_User.md: -------------------------------------------------------------------------------- 1 | ## Traffic Classification User's Guide 2 | 3 | The manual contains all the steps to setup the classification and prioritization modules. 4 | There are two setups in this work.
5 | 1. Using 2-interface machine and an access point (AP)
6 | 2. Using laptop as AP
7 | 8 | ### Setup-1: 9 | This setup is shown in the Fig. 1. 10 | 11 | It requires
12 | 1. One machine with 2 NICs (network interface cards) with Ubuntu 14.04
13 | 2. One machine which will act at DHCP server with Ubuntu 14.04
14 | 3. One switch
15 | 4. One AP
16 | 5. User machines (clients)
17 | 18 | 19 | 20 |
21 | Fig. 1: 2-interface machine setup 22 |
23 |

Fig. 1: 2-interface machine setup

24 | 25 | 26 | 27 | 28 | #### DHCP server #### 29 | 1. Install the dhcp server (one time only).
30 | ``` 31 | $ sudo apt-get install isc-dhcp-server 32 | ``` 33 | 2. Run the configure-dhcp-server.sh from the folder DHCP. 34 | ``` 35 | $ cd DHCP 36 | $ sudo bash configure-dhcp-server.sh 37 | ``` 38 | 39 | It will configure the ip-range in this machine which will be assigned to any machine which is connected to the switch or AP. 40 | 41 | #### 2-interface machine #### 42 | 3. Run the nat.sh and 2interface.sh from 2-interface-machine-files folder.
43 | ``` 44 | $ cd 2-interface-machine-files 45 | 46 | $ sudo bash nat.sh 47 | 48 | $ sudo 2interface.sh 49 | ``` 50 | 4. Run the main-script.sh from DT-classification-2-interface-machine folder.
51 | ``` 52 | $ cd DT-classification-2-interface-machine 53 | 54 | $ sudo bash main-script.sh 55 | ``` 56 | 57 | This is for decision tree based classification. It will classify the traffic into multimedia or download. If the tag is multimedia, then that flow is prioritized immediately.
58 | **Note** :
59 | If you want to use K-NN algorithm approach then you need to run main-script.sh from KNN-classification-2-interface-machine folder. 60 | 61 | But before that you need to install weka on 2-interface machine. 62 | ``` 63 | $ cd 64 | $ wget https://sourceforge.net/projects/weka/files/weka-3-6/3.6.13/weka-3-6-13.zip/download -O weka-3-6-13.zip 65 | $ sudo apt-get install unzip 66 | $ unzip weka-3-6-13.zip 67 | ``` 68 | Now move to the KNN-classification-2-interface-machine directory and run the main script. 69 | ``` 70 | $ sudo bash main-script-KNN.sh 71 | ``` 72 | This script will show the logs on the screen. It will print the connection ID (4-tuple : source IP, destination IP, source port, destination IP) along with the calculated feature values. It will also show the predicted tag by the classification model. 73 | 74 | 75 | 76 | ### Setup 2 : Laptop AP 77 | 78 | In this case, we first make a laptop as AP and then perform all the tasks in this laptop itself. See Fig. 2. 79 | 80 | 81 |
82 | Fig. 2: Laptop AP setup 83 |
84 |

Fig. 2: Laptop AP setup

85 | 86 | 87 | Here eth0 interface of laptop is connected to wired network (Internet) and wlan0 works as access point. All the classification and prioritization take place at wlan0 interface. 88 | 89 | 90 | 91 | #### Make the laptop as AP 92 | 1. Find your laptop wlan0 MAC address 93 | ``` 94 | $ ifconfig wlan1 | head -1 | rev | cut -d " " -f3 | rev 95 | ``` 96 | Now update the ‘mac-address’ field in the file ‘Laptop-AP’ in Configure-Laptop-as-AP directory. 97 | 98 | 2. Now run make-ap.sh 99 | ``` 100 | $ cd Configure-Laptop-as-AP 101 | $ sudo bash make-ap.sh 102 | ``` 103 | 104 | After this command, a wifi network with SSID ‘Laptop-AP’ will be configured. You can connect devices to this network and access multimedia or other content to test the classification model. 105 | 106 | After you are done with the experiment, and you want to remove this AP configuration, then run remove-ap.sh 107 | 108 | 109 | ``` 110 | $ sudo bash remove-ap.sh 111 | ``` 112 | This will remove the changes made to the laptop. 113 | 114 | **Classification and Prioritization**
115 | Now, we have set up the laptop as AP.
116 | 1. Install python pcapy module (if not already installed)
117 | ``` 118 | $ sudo apt-get update 119 | $ sudo apt-get install python-pcapy 120 | ``` 121 |
122 | 2. Go to the ‘DT-classification-on-laptop-AP’ directory and run main-script-laptop-AP.sh.
123 | ``` 124 | $ cd DT-classification-on-laptop-AP 125 | 126 | $ sudo bash main-script-laptop-AP.sh 127 | ``` 128 | This script will show the logs on the screen. It will print the connection ID (4-tuple : source IP, destination IP, source port, destination IP) along with the calculated feature values. It will also show the predicted tag by the classification model. 129 | 130 | 131 | ### Trace collection and labeling training data ### 132 | This process is common to both the setups. 133 | 134 | #### Trace collection #### 135 | As the classification algorithms we have used, require pre-labelled training data, you need to collect traces for both multimedia and download classes. 136 | 137 | You can use wireshark or tcpdump tool to capture the traces. Also follow some naming convention for these trace files (pcap files) so that you can identify which pcap file was used to capture multimedia flows and which one was used to capture download flows. 138 | 139 | Keep the trace files for both the classes in separate folders. 140 | 141 | **For Multimedia**
142 | Move all the multimedia pcap files to Label-training-data/for-multimedia-pcaps directory. Then run create-training-data-for-Multimedia.sh 143 | ``` 144 | $ bash create-training-data-for-Multimedia.sh 145 | ``` 146 | It will generate a csv file with name as ‘all-multimedia-flows.csv’. 147 | This csv file contains all the multimedia flows along with their feature values. 148 | 149 | 150 | **For Download**
151 | Move all the download pcap files to Label-training-data/for-download-pcaps directory. Then run create-training-data-for-download.sh
152 | ``` 153 | $ bash create-training-data-for-download.sh 154 | ``` 155 | It will generate a csv file with name as ‘all-download-flows.csv’. 156 | This csv file contains all the download flows along with their feature values. 157 | 158 | Now you need to merge this two csv files so that we have a combined csv file having all the flows. Don’t forget to remove extra header line that you get after merging these two csv files. 159 | 160 | Now you can build two models:
161 | 1. KNN model
162 | 2. Decision tree model
163 | 164 | **For KNN model**
165 | 1. Move this combined csv file to ‘KNN-classification-2-interface-machine’ directory and rename it to ‘data.csv’
166 | 2. Run generate-KNN-model.sh which will generate the knn model.
167 | ``` 168 | $ bash generate-KNN-model.sh 169 | ``` 170 | 171 | **For Decision Tree Model**
172 | 1. Move the combined csv file to ‘DT-classification-2-interface-machine’ directory and rename it to ‘data.csv’
173 | 2. Run generate-decision-tree-model.sh which will generate the decision tree model.
174 | ``` 175 | $ bash generate-decision-tree-model.sh 176 | ``` 177 | Above command will generate decision tree rules in hierarchical way, which can be implemented as if-else rules in the classification script (classification-script-decision-tree.py) in the same directory. 178 | -------------------------------------------------------------------------------- /scripts/v1.0/Label-training-data/for-multimedia-pcaps/create-training-data-for-Multimedia.sh: -------------------------------------------------------------------------------- 1 | # This script is meant for fetching multimedia flows from the trace file given. 2 | # This script finally generates a csv file containing 4-tuple(SIP,DIP,SP,DP) along with 8 feature values for that flow. Each row in that csv represents a unique flow. 3 | 4 | # As we use this script to fetch multimedia flows, and they are further used to train the classifier. The traces we took on different machines and we were only interested in all incoming packets. So we set filters to identify incoming packets. In our case, the client machines had following IPs. 5 | client_ip34="172.16.1.34" 6 | client_ip12="172.16.1.12" 7 | client_ip13="172.16.1.13" 8 | 9 | # Delete temporary files which are not needed, 10 | # Here we have used *csv, *txt which will delete all txt and csv files, so be CAREFUL. 11 | rm -rf *csv *.txt 12 | 13 | # Here we want to run this script on all the trace files (pcap files) present in the current directory. 14 | # keep all the training pcap files in the current folder before running this script. 15 | 16 | 17 | # following loop, takes each pcap file one by one and on each pcap file it applies tshark command with filter as 'all packets which are outgoing from any of the mentioned IP addresses AND which have HTTP GET request AND the http request URI contains any one of the mentioned multimedia file format'. 18 | # so all it does is that it finds all the packets having GET request going to web-servers and put their details (time, SIP, DIP, SP, DP etc) in a txt file named as pcapFileName-port.txt. 19 | # for each pcap file, we have one txt file generated here 20 | 21 | # Now this txt file is given to another script 'generate-list-of-port-with-GET-request.py' , which will create a filter string (and writes it in filter.txt file) that will be used again by tshark command to fetch all packets who belong to the port numbers mentioned in the txt file given as input 22 | 23 | 24 | # we will move all the pcaps to the follwoing directory which do not have HTTP GET request for multimedia file. 25 | mkdir -p pcaps_without_GET_request 26 | echo "===================================" 27 | 28 | for f in *.pcap 29 | do 30 | echo $f # print on screen 31 | get_out=$f-port.txt 32 | 33 | tshark -r $f -R "((ip.src==$client_ip12 or ip.src==$client_ip13 or ip.src==$client_ip34) && http.request.method == "GET" ) && ( http.request.uri contains mp4 || http.request.uri contains .smil || http.request.uri contains mp3 || http.request.uri contains mkv || http.request.uri contains avi || http.request.uri contains 3gp || http.request.uri contains .webm || http.request.uri contains .flv || http.request.uri contains .vob || http.request.uri contains .mov || http.request.uri contains .wmv || http.request.uri contains .rmvb || http.request.uri contains .m4p || http.request.uri contains .m4v || http.request.uri contains .mpg || http.request.uri contains .mpeg || http.request.uri contains .3g2 || http.request.uri contains .aa || http.request.uri contains .aac || http.request.uri contains .aax || http.request.uri contains .act || http.request.uri contains .aiff || http.request.uri contains .amr || http.request.uri contains .ape || http.request.uri contains .au || http.request.uri contains .awb || http.request.uri contains .dct || http.request.uri contains .dss || http.request.uri contains .dvf || http.request.uri contains .flac || http.request.uri contains .gsm || http.request.uri contains .m4a || http.request.uri contains .m4b || http.request.uri contains .mmf || http.request.uri contains .mpc || http.request.uri contains .ogg || http.request.uri contains .oga || http.request.uri contains .opus || http.request.uri contains .ra || http.request.uri contains .rm || http.request.uri contains .raw || http.request.uri contains .sln || http.request.uri contains .tta || http.request.uri contains .vox || http.request.uri contains .wav || http.request.uri contains .wma || http.request.uri contains .wa || http.request.uri contains .webm ) && !(http.request.uri contains .png || http.request.uri contains .jpg )" -T fields -e frame.time_relative -e ip.src -e ip.dst -e tcp.srcport -e tcp.dstport -e ip.len -e tcp.flags.push -e tcp.window_size -E separator='|' > $get_out # port.txt contains only packets with get 34 | 35 | 36 | python generate-list-of-port-with-GET-request.py $get_out # This will create filter.txt , having filter string 37 | rm -rf $get_out # remove it, as not required any more 38 | 39 | fil=`cat filter.txt` # now variable fil containts the content of filter.txt 40 | rm filter.txt # remove it, as not required any more 41 | 42 | 43 | 44 | if [ -z "$fil" ]; then # if the filter is empty, it means no packet with GET request and file format found 45 | echo "*****No GET request with desired file extension******" 46 | echo $f 47 | mv $f pcaps_without_GET_request/ 48 | else 49 | # it simply applies the filter on the pcap file and extracts the required packet header info in a txt file, named as pcapFileName.txt 50 | # Here, This $fil contains filters like "tcp.dstport == 47997 or tcp.dstport == 49146 or ...." , so all packets coming to these ports are put in $f.csv" 51 | # all these packets belong to multimedia 52 | 53 | tshark -r $f -R "$fil" -T fields -e frame.time_relative -e ip.src -e ip.dst -e tcp.srcport -e tcp.dstport -e ip.len -e tcp.flags.push -e tcp.window_size -E separator='|' > $f.txt 54 | 55 | fi 56 | 57 | done 58 | # for loop ends here 59 | 60 | # Next 'create-header.py' will generate a csv file containing only one row .i.e. Header, that will be used when we merge all CSV files into one file 61 | python create-header.py > aaa_Header.csv # this filename must come first in alphabetical order, this is needed for successfully merging the csv files 62 | # that's why dummy aaa appended in the name, in the front. 63 | 64 | # Now, we already have one txt file containing info abt multimedia packets, for each pcap file. Each of these txt file is given to another script 'create-csv-with-flow-features.py' 65 | # which will create a csv file which contains 4 tuple (SIP,DIP,SP,DP) and values of 8 features. Each row represents a multimedia flow. 66 | for f in *.txt 67 | do 68 | python create-csv-with-flow-features.py $f 1000 > $f.csv # 1st parameter : txt file ; 2nd parameter : threshold points (no. of packets after which classification need to be done) 69 | 70 | done 71 | 72 | 73 | # now we will manually find multimedia flow for the pcaps available in directory - pcaps_without_GET_request. For this we will call another script. For this we will copy relavent scripts from create-training-data-multimedia-with-NO-GET-request to pcaps_without_GET_request. 74 | cp create-training-data-multimedia-with-NO-GET-request/* pcaps_without_GET_request/ 75 | cnt=0 76 | cnt=`ls pcaps_without_GET_request/*pcap |wc -l` # cnt variable counts the number of pcaps with NO GET request 77 | if [ $cnt -ne 0 ]; then # if cnt not ZERO, then go in that directory and do processing 78 | cd pcaps_without_GET_request 79 | bash create-training-data-no-GET-multimedia.sh 80 | fi 81 | cd .. # come out of pcaps_without_GET_request directory 82 | 83 | rm -rf all-multimedia-flows.csv 84 | cat *.csv pcaps_without_GET_request/all-multimedia-flows.csv > all-multimedia-flows.csv 85 | 86 | # at this point of time, we have created 'all-multimedia-flows.csv' which contains all the multimedia flows along with their feature values. 87 | # Now just put all temporary txt and csv file to a new directory txt-files and CSV-files respectively. 88 | rm aaa_Header.csv # not required, delete it 89 | mkdir -p CSV-files # create directory if not exist already 90 | mkdir -p txt-files 91 | 92 | 93 | mv *txt pcaps_without_GET_request/txt-files/*txt txt-files/ 94 | mv *csv pcaps_without_GET_request/CSV-files/*csv CSV-files/ 95 | 96 | mv CSV-files/all-multimedia-flows.csv . 97 | -------------------------------------------------------------------------------- /scripts/v1.0/Label-training-data/for-multimedia-pcaps/create-csv-with-flow-features.py: -------------------------------------------------------------------------------- 1 | ''' 2 | This script is invoked by create-training-data-for-Multimedia.sh 3 | It takes 2 inputs: 4 | 1. file as input which contains many rows, each row represents a packet's information. This scripts associates each packet to a flow (4-tuple. SIP,DIP,SP,DP). 5 | 2. number of packets after which we will classify the flow (i.e. 1000) 6 | 7 | Finally it calculates 8 features for each flow and outputs the same in a csv file. 8 | 9 | 8 features: 10 | 1. Number of packets with push flag set, 11 | 2. Avg window size 12 | 3. Avg Packet Size 13 | 4. Std. deviation of packet size 14 | 5. Avg. IAT(ms) 15 | 6. Std. daviation of IAT(ms) 16 | 7. Total Bytes 17 | 8. Flow duration 18 | 19 | ''' 20 | 21 | import math 22 | import sys 23 | filename = sys.argv[1] #name of .txt file, containing time, sip,dip,sp,dp,pktSize etc 24 | 25 | main_packet_size = {} # dictionary to store list of packet sizes for each flow (Here key = flowID, value = list of packet sizes) 26 | flow_list = [] # contains the flowIDs (a combination of SIP,DIP,srcPort, dstPort) 27 | main_inter_arrival_time = {} # dictionary to store list of IATs for each flow (Here key = flowID, value = list of IATs) 28 | last_time={} # for each flow we store timestamp of the last packet arrival 29 | 30 | avg_pkt_sizes={} # contains the flowID and their calculated average packet sizes 31 | string={} # For each flow, we have a string of feature values (just for printing purpose, on screen) 32 | 33 | window_size = {} # to store the sum of window sizes of a connection 34 | win_size = 0 # Advertized window size 35 | packet_count = {} # contains flowID as key and number of packets as value 36 | push_flag_count = {} # contains flowID as key and number of packets with PSH flag 'set' as value 37 | 38 | #========================================================================================================================================================= 39 | min_number_of_packets = int(sys.argv[2]) # if number of packets in a flow is less than this, then we ignore any such flow from our analysis 40 | number_of_pkts_limit = int(sys.argv[2]) # we store info abt these many pkts in each flow, after this ignore 41 | #========================================================================================================================================================= 42 | 43 | # open the given txt file, read each line (each line here represents one packet), and fetch the values by spliting the line 44 | with open(filename,'r') as f1: 45 | for line in f1: 46 | l = line.split("|") 47 | time = float(l[0]) # timestamp of the packet 48 | dstip = l[2] # destination IP 49 | srcip = l[1] # source IP 50 | srcport = l[3] # source port 51 | dstport = l[4] # destination port 52 | pktsize = int(l[5]) # packet size 53 | push_flag_str = l[6] # push flag 0 or 1 54 | if not push_flag_str: # if PSH is a NULL string , set it to 0, else convert to int 55 | push_flag = 0 56 | else: 57 | push_flag = int(push_flag_str) 58 | 59 | 60 | win_size = l[7].split('\n')[0] # window size 61 | 62 | if not win_size: # if window size is a NULL string , set it to 0, else convert to int 63 | win_size = 0 64 | else: 65 | win_size = int(win_size) 66 | 67 | 68 | # check if srcport or dstport is null string, if yes, set it to 0 69 | if(srcport==''): 70 | srcport='0'; 71 | 72 | if(dstport==''): 73 | dstport='0'; 74 | 75 | # To identify each flow uniquely, we concatenate SIP,DIP,SP,DP to make the key 76 | key = srcip +' '+ dstip +' '+ srcport +' '+ dstport 77 | 78 | if (key in flow_list) : # check if the packet belongs to already existing flow ? 79 | if (len(main_packet_size[key]) < number_of_pkts_limit ): # check if, less that specified limit of packets 80 | packet_count[key] = packet_count[key] + 1 # increament packet count 81 | main_packet_size[key].append(pktsize) # append its packet size to the packet size list for this flow 82 | lasttime = last_time[key] 83 | diff = round(float(time) - float(lasttime),8) # calculate inter-arrival time (seconds) 84 | main_inter_arrival_time[key].append(diff) # append IAT 85 | 86 | if(push_flag==1): # check if the PSH flag is set, and update the count if 1 87 | push_flag_count[key] = push_flag_count[key]+1 88 | window_size[key] = window_size[key] + win_size # update the sum of window size for the flow 89 | last_time[key] = time # update last time for the flow, to the timestamp of this packet 90 | 91 | 92 | else: # if this packet is the first one in this NEW flow 93 | flow_list.append(key) # make its entry in the existing flow List 94 | packet_count[key] = 1 # first packet arrived for this flow, set count =1 95 | main_packet_size[key] = [pktsize] # make its entry in the packet size dictionary 96 | main_inter_arrival_time[key] = [] # create a blank list in this disctionary, as it is the first packet 97 | if(push_flag==1): # initilize push count for this new flow 98 | push_flag_count[key] = 1 99 | else: 100 | push_flag_count[key] = 0 101 | 102 | window_size[key] = win_size # Initialize its entry for window size dictionary, next time keep on adding to it 103 | last_time[key] = time 104 | 105 | #----------------------------------------------------------------------------------------------------------------------------------------------------------------------- 106 | for key in main_packet_size.keys(): 107 | packet_list = main_packet_size[key] # packet_list contains the list of packet sizes for the flow in consideration 108 | length=len(packet_list) # number of packets 109 | avg_pkt_sizes[key] = sum(packet_list)/length # calculate avg packet size, and store 110 | summ = 0 # Now calculate variance and standard deviation of packet sizes 111 | for j in packet_list: 112 | summ = summ + (avg_pkt_sizes[key] - j)*(avg_pkt_sizes[key] - j) 113 | var_pkt_size = summ/length 114 | std_dev_pkt_size = int(math.sqrt(var_pkt_size)) 115 | string[key]=key+","+str(avg_pkt_sizes[key])+","+str(std_dev_pkt_size)+","+str(sum(packet_list))+","+str(len(packet_list)) # concatenate features in string format 116 | #------------------- --------------------------------------------------------------------------------------------------------------------------------------------------- 117 | 118 | # Now calculate average IAT, standars deviation of IAT 119 | for key in main_inter_arrival_time.keys(): 120 | inter_arrival_time_list = main_inter_arrival_time[key] # a list containing IATs for the flow 121 | length=len(inter_arrival_time_list) 122 | if length > 0: 123 | flow_duration = sum(inter_arrival_time_list) # flow duration 124 | avg_iat = flow_duration/length # Average IAT 125 | avg_iat_in_ms = round(1000*avg_iat,2) # convert in millisecond 126 | 127 | summ=0 128 | for iat in inter_arrival_time_list: 129 | summ=summ + (iat-avg_iat)*(iat-avg_iat) 130 | std_dev_IAT = round(1000*math.sqrt(summ/(length)),6) # standard deviation of IATs in ms 131 | 132 | if(len(main_packet_size[key]) >= min_number_of_packets ): # we consider a flow only if at least 'min_number_of_packets' in that flow 133 | string[key]=string[key]+","+str(avg_iat_in_ms)+","+str(std_dev_IAT)+","\ 134 | +str(flow_duration)+","+str(push_flag_count[key])+","+str(window_size[key]/len(main_packet_size[key]))+","+"Multimedia" 135 | print string[key] 136 | 137 | # Here string[key] contains the feature vector in string format with the 4-tuple(SIP,DIP,SP,DP) appended in front 138 | 139 | #=================================================================================END========================================================================================= 140 | 141 | 142 | -------------------------------------------------------------------------------- /scripts/v1.0/Label-training-data/for-download-pcaps/create-csv-with-flow-features-download.py: -------------------------------------------------------------------------------- 1 | ''' 2 | This script is invoked by create-training-for-download.sh 3 | It takes 2 inputs: 4 | 1. file as input which contains many rows, each row represents a packet's information. This scripts associates each packet to a flow (4-tuple. SIP,DIP,SP,DP). 5 | 2. number of packets after which we will classify the flow (i.e. 1000) 6 | 7 | Finally it calculates 8 features for each flow and outputs the same in a csv file. 8 | 9 | 8 features: 10 | 1. Number of packets with push flag set, 11 | 2. Avg window size 12 | 3. Avg Packet Size 13 | 4. Std. deviation of packet size 14 | 5. Avg. IAT(ms) 15 | 6. Std. daviation of IAT(ms) 16 | 7. Total Bytes 17 | 8. Flow duration 18 | 19 | ''' 20 | 21 | import math 22 | import sys 23 | filename = sys.argv[1] #name of .txt file, containing time, sip,dip,sp,dp,pktSize etc 24 | 25 | main_packet_size = {} # dictionary to store list of packet sizes for each flow (Here key = flowID, value = list of packet sizes) 26 | flow_list = [] # contains the flowIDs (a combination of SIP,DIP,srcPort, dstPort) 27 | main_inter_arrival_time = {} # dictionary to store list of IATs for each flow (Here key = flowID, value = list of IATs) 28 | last_time={} # for each flow we store timestamp of the last packet arrival 29 | 30 | avg_pkt_sizes={} # contains the flowID and their calculated average packet sizes 31 | string={} # For each flow, we have a string of feature values (just for printing purpose, on screen) 32 | 33 | window_size = {} # to store the sum of window sizes of a connection 34 | win_size = 0 # Advertized window size 35 | packet_count = {} # contains flowID as key and number of packets as value 36 | push_flag_count = {} # contains flowID as key and number of packets with PSH flag 'set' as value 37 | 38 | #========================================================================================================================================================= 39 | min_number_of_packets = int(sys.argv[2]) # if number of packets in a flow is less than this, then we ignore any such flow from our analysis 40 | number_of_pkts_limit = int(sys.argv[2]) # we store info abt these many pkts in each flow, after this ignore 41 | #========================================================================================================================================================= 42 | 43 | # open the given txt file, read each line (each line here represents one packet), and fetch the values by spliting the line 44 | with open(filename,'r') as f1: 45 | for line in f1: 46 | l = line.split("|") 47 | time = float(l[0]) # timestamp of the packet 48 | dstip = l[2] # destination IP 49 | srcip = l[1] # source IP 50 | srcport = l[3] # source port 51 | dstport = l[4] # destination port 52 | pktsize = int(l[5]) # packet size 53 | push_flag_str = l[6] # push flag 0 or 1 54 | if not push_flag_str: # if PSH is a NULL string , set it to 0, else convert to int 55 | push_flag = 0 56 | else: 57 | push_flag = int(push_flag_str) 58 | 59 | win_size = l[7].split('\n')[0] # window size 60 | 61 | if not win_size: # if window size is a NULL string , set it to 0, else convert to int 62 | win_size = 0 63 | else: 64 | win_size = int(win_size) 65 | 66 | 67 | # check if srcport or dstport is null string, if yes, set it to 0 68 | if(srcport==''): 69 | srcport='0'; 70 | 71 | if(dstport==''): 72 | dstport='0'; 73 | 74 | # To identify each flow uniquely, we concatenate SIP,DIP,SP,DP to make the key 75 | key = srcip +' '+ dstip +' '+ srcport +' '+ dstport 76 | 77 | if (key in flow_list) : # check if the packet belongs to already existing flow ? 78 | if (len(main_packet_size[key]) < number_of_pkts_limit ): # check if, less that specified limit of packets 79 | packet_count[key] = packet_count[key] + 1 # increament packet count 80 | main_packet_size[key].append(pktsize) # append its packet size to the packet size list for this flow 81 | lasttime = last_time[key] 82 | diff = round(float(time) - float(lasttime),8) # calculate inter-arrival time (seconds) 83 | main_inter_arrival_time[key].append(diff) # append IAT 84 | 85 | if(push_flag==1): # check if the PSH flag is set, and update the count if 1 86 | push_flag_count[key] = push_flag_count[key]+1 87 | window_size[key] = window_size[key] + win_size # update the sum of window size for the flow 88 | last_time[key] = time # update last time for the flow, to the timestamp of this packet 89 | 90 | 91 | else: # if this packet is the first one in this NEW flow 92 | flow_list.append(key) # make its entry in the existing flow List 93 | packet_count[key] = 1 # first packet arrived for this flow, set count =1 94 | main_packet_size[key] = [pktsize] # make its entry in the packet size dictionary 95 | main_inter_arrival_time[key] = [] # create a blank list in this disctionary, as it is the first packet 96 | if(push_flag==1): # initilize push count for this new flow 97 | push_flag_count[key] = 1 98 | else: 99 | push_flag_count[key] = 0 100 | 101 | window_size[key] = win_size # Initialize its entry for window size dictionary, next time keep on adding to it 102 | last_time[key] = time 103 | 104 | #----------------------------------------------------------------------------------------------------------------------------------------------------------------------- 105 | for key in main_packet_size.keys(): 106 | packet_list = main_packet_size[key] # packet_list contains the list of packet sizes for the flow in consideration 107 | length=len(packet_list) # number of packets 108 | avg_pkt_sizes[key] = sum(packet_list)/length # calculate avg packet size, and store 109 | summ = 0 # Now calculate variance and standard deviation of packet sizes 110 | for j in packet_list: 111 | summ = summ + (avg_pkt_sizes[key] - j)*(avg_pkt_sizes[key] - j) 112 | var_pkt_size = summ/length 113 | std_dev_pkt_size = int(math.sqrt(var_pkt_size)) 114 | string[key]=key+","+str(avg_pkt_sizes[key])+","+str(std_dev_pkt_size)+","+str(sum(packet_list))+","+str(len(packet_list)) # concatenate features in string format 115 | #------------------- --------------------------------------------------------------------------------------------------------------------------------------------------- 116 | 117 | # Now calculate average IAT, standars deviation of IAT 118 | for key in main_inter_arrival_time.keys(): 119 | inter_arrival_time_list = main_inter_arrival_time[key] # a list containing IATs for the flow 120 | length=len(inter_arrival_time_list) 121 | if length > 0: 122 | flow_duration = sum(inter_arrival_time_list) # flow duration 123 | avg_iat = flow_duration/length # Average IAT 124 | avg_iat_in_ms = round(1000*avg_iat,2) # convert in millisecond 125 | 126 | summ=0 127 | for iat in inter_arrival_time_list: 128 | summ=summ + (iat-avg_iat)*(iat-avg_iat) 129 | std_dev_IAT = round(1000*math.sqrt(summ/(length)),6) # standard deviation of IATs in ms 130 | 131 | # we consider a flow only if at least 'min_number_of_packets' in that flow and average packet size > 800, as we want to avoid noisy/unwanted flows 132 | if(len(main_packet_size[key]) >= min_number_of_packets and avg_pkt_sizes[key] > 800 ): 133 | string[key]=string[key]+","+str(avg_iat_in_ms)+","+str(std_dev_IAT)+","\ 134 | +str(flow_duration)+","+str(push_flag_count[key])+","+str(window_size[key]/len(main_packet_size[key]))+","+"Download" 135 | print string[key] 136 | 137 | # Here string[key] contains the feature vector in string format with the 4-tuple(SIP,DIP,SP,DP) appended in front 138 | 139 | #=================================================================================END========================================================================================= 140 | 141 | 142 | -------------------------------------------------------------------------------- /scripts/v1.0/Label-training-data/for-multimedia-pcaps/create-training-data-multimedia-with-NO-GET-request/create-csv-with-flow-features-with-No-GET.py: -------------------------------------------------------------------------------- 1 | ''' 2 | This script is invoked by create-training-data-no-GET-multimedia.sh 3 | It takes 2 inputs: 4 | 1. file as input which contains many rows, each row represents a packet's information. This scripts associates each packet to a flow (4-tuple. SIP,DIP,SP,DP). 5 | 2. number of packets after which we will classify the flow (i.e. 1000) 6 | 7 | Finally it calculates 8 features for each flow and outputs the same in a csv file. 8 | 9 | 8 features: 10 | 1. Number of packets with push flag set, 11 | 2. Avg window size 12 | 3. Avg Packet Size 13 | 4. Std. deviation of packet size 14 | 5. Avg. IAT(ms) 15 | 6. Std. daviation of IAT(ms) 16 | 7. Total Bytes 17 | 8. Flow duration 18 | 19 | ''' 20 | 21 | import math 22 | import sys 23 | filename = sys.argv[1] #name of .txt file, containing time, sip,dip,sp,dp,pktSize etc 24 | 25 | main_packet_size = {} # dictionary to store list of packet sizes for each flow (Here key = flowID, value = list of packet sizes) 26 | flow_list = [] # contains the flowIDs (a combination of SIP,DIP,srcPort, dstPort) 27 | main_inter_arrival_time = {} # dictionary to store list of IATs for each flow (Here key = flowID, value = list of IATs) 28 | last_time={} # for each flow we store timestamp of the last packet arrival 29 | 30 | avg_pkt_sizes={} # contains the flowID and their calculated average packet sizes 31 | string={} # For each flow, we have a string of feature values (just for printing purpose, on screen) 32 | 33 | window_size = {} # to store the sum of window sizes of a connection 34 | win_size = 0 # Advertized window size 35 | packet_count = {} # contains flowID as key and number of packets as value 36 | push_flag_count = {} # contains flowID as key and number of packets with PSH flag 'set' as value 37 | 38 | #========================================================================================================================================================= 39 | min_number_of_packets = int(sys.argv[2]) # if number of packets in a flow is less than this, then we ignore any such flow from our analysis 40 | number_of_pkts_limit = int(sys.argv[2]) # we store info abt these many pkts in each flow, after this ignore 41 | #========================================================================================================================================================= 42 | 43 | # open the given txt file, read each line (each line here represents one packet), and fetch the values by spliting the line 44 | with open(filename,'r') as f1: 45 | for line in f1: 46 | l = line.split("|") 47 | time = float(l[0]) # timestamp of the packet 48 | dstip = l[2] # destination IP 49 | srcip = l[1] # source IP 50 | srcport = l[3] # source port 51 | dstport = l[4] # destination port 52 | pktsize = int(l[5]) # packet size 53 | push_flag_str = l[6] # push flag 0 or 1 54 | if not push_flag_str: # if PSH is a NULL string , set it to 0, else convert to int 55 | push_flag = 0 56 | else: 57 | push_flag = int(push_flag_str) 58 | 59 | win_size = l[7].split('\n')[0] # window size 60 | 61 | if not win_size: # if window size is a NULL string , set it to 0, else convert to int 62 | win_size = 0 63 | else: 64 | win_size = int(win_size) 65 | 66 | 67 | # check if srcport or dstport is null string, if yes, set it to 0 68 | if(srcport==''): 69 | srcport='0'; 70 | 71 | if(dstport==''): 72 | dstport='0'; 73 | 74 | # To identify each flow uniquely, we concatenate SIP,DIP,SP,DP to make the key 75 | key = srcip +' '+ dstip +' '+ srcport +' '+ dstport 76 | 77 | if (key in flow_list) : # check if the packet belongs to already existing flow ? 78 | if (len(main_packet_size[key]) < number_of_pkts_limit ): # check if, less that specified limit of packets 79 | packet_count[key] = packet_count[key] + 1 # increament packet count 80 | main_packet_size[key].append(pktsize) # append its packet size to the packet size list for this flow 81 | lasttime = last_time[key] 82 | diff = round(float(time) - float(lasttime),8) # calculate inter-arrival time (seconds) 83 | main_inter_arrival_time[key].append(diff) # append IAT 84 | 85 | if(push_flag==1): # check if the PSH flag is set, and update the count if 1 86 | push_flag_count[key] = push_flag_count[key]+1 87 | window_size[key] = window_size[key] + win_size # update the sum of window size for the flow 88 | last_time[key] = time # update last time for the flow, to the timestamp of this packet 89 | 90 | 91 | else: # if this packet is the first one in this NEW flow 92 | flow_list.append(key) # make its entry in the existing flow List 93 | packet_count[key] = 1 # first packet arrived for this flow, set count =1 94 | main_packet_size[key] = [pktsize] # make its entry in the packet size dictionary 95 | main_inter_arrival_time[key] = [] # create a blank list in this disctionary, as it is the first packet 96 | if(push_flag==1): # initilize push count for this new flow 97 | push_flag_count[key] = 1 98 | else: 99 | push_flag_count[key] = 0 100 | 101 | window_size[key] = win_size # Initialize its entry for window size dictionary, next time keep on adding to it 102 | last_time[key] = time 103 | 104 | #----------------------------------------------------------------------------------------------------------------------------------------------------------------------- 105 | for key in main_packet_size.keys(): 106 | packet_list = main_packet_size[key] # packet_list contains the list of packet sizes for the flow in consideration 107 | length=len(packet_list) # number of packets 108 | avg_pkt_sizes[key] = sum(packet_list)/length # calculate avg packet size, and store 109 | summ = 0 # Now calculate variance and standard deviation of packet sizes 110 | for j in packet_list: 111 | summ = summ + (avg_pkt_sizes[key] - j)*(avg_pkt_sizes[key] - j) 112 | var_pkt_size = summ/length 113 | std_dev_pkt_size = int(math.sqrt(var_pkt_size)) 114 | string[key]=key+","+str(avg_pkt_sizes[key])+","+str(std_dev_pkt_size)+","+str(sum(packet_list))+","+str(len(packet_list)) # concatenate features in string format 115 | #------------------- --------------------------------------------------------------------------------------------------------------------------------------------------- 116 | 117 | # Now calculate average IAT, standars deviation of IAT 118 | for key in main_inter_arrival_time.keys(): 119 | inter_arrival_time_list = main_inter_arrival_time[key] # a list containing IATs for the flow 120 | length=len(inter_arrival_time_list) 121 | if length > 0: 122 | flow_duration = sum(inter_arrival_time_list) # flow duration 123 | avg_iat = flow_duration/length # Average IAT 124 | avg_iat_in_ms = round(1000*avg_iat,2) # convert in millisecond 125 | 126 | summ=0 127 | for iat in inter_arrival_time_list: 128 | summ=summ + (iat-avg_iat)*(iat-avg_iat) 129 | std_dev_IAT = round(1000*math.sqrt(summ/(length)),6) # standard deviation of IATs in ms 130 | 131 | # we consider a flow only if at least 'min_number_of_packets' in that flow and average packet size > 800, as we want to avoid noisy/unwanted flows 132 | if(len(main_packet_size[key]) >= min_number_of_packets and avg_pkt_sizes[key] > 800 ): 133 | string[key]=string[key]+","+str(avg_iat_in_ms)+","+str(std_dev_IAT)+","\ 134 | +str(flow_duration)+","+str(push_flag_count[key])+","+str(window_size[key]/len(main_packet_size[key]))+","+"Multimedia" 135 | print string[key] 136 | 137 | # Here string[key] contains the feature vector in string format with the 4-tuple(SIP,DIP,SP,DP) appended in front 138 | 139 | #=================================================================================END========================================================================================= 140 | 141 | 142 | -------------------------------------------------------------------------------- /docs/v1.0/README_Developer.md: -------------------------------------------------------------------------------- 1 | ##Traffic Classification Developer's Guide 2 | 3 | The manual contains a brief overview of the scripts. We have used bash and python scripts in this project. 4 | 5 | ## Overview of complete process 6 | 7 | Traffic classification is basically two phase process.
8 | 1. Trace collection and training the classifier (offline)
9 | 2. Identify multimedia traffic using classification model (real-time) 10 | 11 | Figure 1 shows the big picture of the whole process. 12 | 13 | 14 |
15 | Fig. 1: Overall classification  process 16 |
17 |

Fig. 1: Overall classification process

18 | 19 | 20 | First we collect traces, use some labeling mechanism to label the training flows. Then we select the minimal set of features which can classify the traffic with high accuracy. 21 | After this, we apply different ML algorithms to train the classifier which is further used in the real-time scenario. 22 | 23 | During real-time classification, inside an AP, traffic is captured live and then we calculate the flow related statistics (feature values) after certain pre-defined threshold point. Depending upon those feature values, the flow is classified as either multimedia or download. If it is classified as multimedia then that flow is prioritized immediately. 24 | 25 | As the same training data might not be effective after long duration because the flow characteristics changes over the period of time, we need to update our classifier at regular intervals. To re-train the classifier, we save the traces during the real-time classification and at regular intervals we keep on adding these new flows along with their correct tags in the existing training data and re-train the classifier. Thus, the changes in the network/traffic characteristics can be reflected. 26 | 27 | 28 | 29 | ### Description of each module 30 | 31 | Each script contains enough comments and documentation explaining the overall workflow and the relevance of every important command. So here we will briefly go through the workflow of each module. For specific details, you can read the comments in the corresponding script. 32 | 33 | 34 | #### Module 1: 2-interface-machine-files #### 35 | This directory contains 2 bash scripts which are executed on 2-interface machine.
36 | 1. **nat.sh :** It is used for natting. It translates private ip to public ip for all the packets going outside of the private network, i.e. packets going to the Internet. Similarly, it translates public ip to private ip for all the packets coming from Internet. It changes the source IP of the packets going to the Internet, to its own IP address (masquerade), i.e. desktop’s eth0 IP address.
37 | 2. **2interface.sh :** It is used to make a bridge between the two interfaces of the machine. It forwards all the packets from eth0 to eth1 interface and vice-versa. 38 | 39 | 40 | #### Module 2: DHCP 41 | This module configures the dhcp server on a machine. This module consists of 3 files.
42 | 1. **configure-dhcp-server.sh :** It makes the necessary changes in /etc/dhcp/dhcpd.conf and /etc/network/interfaces files to configure the ip-ranges and gateway etc.
43 | 2. **interfaces :** This file contains information about the gateway, netmask and other parameters.
44 | 3. **dhcpd.conf :** This file contains the defined ip-ranges that will be allotted by the dhcp server. You can make the necessary changes in this file as per requirement.
45 | 46 | #### Module 3: Label-training-data 47 | This module is responsible for labelling the training data (trace files in pcap format). 48 | There are two sub directories.
49 | 50 | ##### for-multimedia-pcaps : 51 | It does the labeling for multimedia trace files.
52 | create-training-data-for-Multimedia.sh : It uses tshark command to fetch the required fields from each of the packets . It further invokes generate-list-of-port-with-GET-request.py, create-csv-with-flow-features.py and create-header.py to create a csv file which contains all the multimedia flows. 53 | It also takes care of all those pcaps which do not have HTTP GET requests. You can read the comments in the scripts for more details.
54 | 55 | 56 | ##### for download-pcaps : 57 | It does the labeling for download files.
58 | create-training-data-for-download.sh : It invokes create-csv-with-flow-features-download.py which contains manually defined threshold values for some of the feature values to filter out the download flows and put them in a csv file. You can change those threshold values as required. 59 | 60 | #### Module 4:Configure-Laptop-as-AP 61 | This module consists of 3 files.
62 | 1. **Laptop-AP :** This file contains the configuration information of the access point that will be created. You can change the SSID,wifi security settings, etc., in this file.
63 | 2. **make-ap.sh :** This script copies Laptop-AP file to /etc/NetworkManager/system-connections/ location and restarts network manager to create a wifi network with the SSID mentioned in Laptop-AP file.
64 | 3. **remove-ap.sh :** It will undo the changes made by the make-ap.sh script.
65 | 66 | #### Module 5: DT-classification-2-interface-machine 67 | This module contains scripts which are applied at 2-interface machine setup (see Fig. 2). 68 | 69 |
70 | Fig. 2: 2-interface machine setup 71 |
72 |

Fig. 2: 2-interface machine setup

73 | 74 | This does the decision tree based classification. It has following files.
75 | 1. **generate-decision-tree-model.sh :** This script is used to generate decision tree model from the given training data.
76 | 2. **create-htb-queues.sh :** This script creates 3 bands and it has some tc filter rules which forward multimedia packets to high priority band. Fig. 3 shows the HTB bands and how we use iptables rules along with tc filter rules to put the multimedia flow packets in the prioritized band. After the classification script has identified a flow as multimedia, it applies an iptables rule which marks all the packets belonging to that flow as some particular number, say 5. 77 |
78 | Fig. 3: HTB bands and Use of iptables and tc filter rules 79 |
80 |

Fig. 3: HTB bands and Use of iptables and tc filter rules

81 | Now we have another tc filter rule which filters all the packets marked with number 5 and then forwards them to high priority band. Thus multimedia flows get prioritized. There are some other parameters also, such as ceil, rate, etc., that you can change as per requirement (see the comments in the script for more details).
82 | 3. **classification-script-decision-tree.py :** This script uses pcapy module to capture packet live, and process each packet one by one (see Fig. 4). First it checks if the packet belongs to an existing flow. If not, then it creates a new flow entry in the data structure and initializes other parameters. If that packet belongs to an existing flow, then the parameters of that flow get updated, such as packet count for the flow, inter-arrival times, etc. We maintain list of packet sizes, list of inter-arrival times and few other data structures for each flow.
83 | 84 |
85 | Fig. 4: Classification in live AP 86 |
87 |

Fig. 4: Classification in live AP

88 | 89 | Then we check if this flow has reached the threshold point (defined as some particular number of packets - N in a flow, in our case its first N=1000 packets). If YES, then we call another function which calculates all the features values and then checks if this flow falls under multimedia class, depending on the if-else conditions, that were generated from the decision tree model.
90 | If the flow gets classified as multimedia, then we use iptables command to prioritize that flow using the 4-tuple information (SIP,DIP,SP and DP). We put an iptables command to mark the flow as some particular number and then there is a tc filter which filters those marked packets and put them in the prioritized band.
4. **main-script.sh :** This is the main script. It invokes the above 2 scripts (create-htb-queues.sh and classification-script-decision-tree.py). It also captures the traffic in pcap file using tcpdump and saves them locally, which will be further used to re-train the classifier.
91 | 92 | #### Module 6: DT-classification-on-laptop-AP 93 | This module is similar to module 5. The difference is that, here the classification is performed on the wlan0 interface of a laptop which is working as an AP. In this case, we capture the packets at wlan0 (see Fig. 5).
94 | 95 |
96 | Fig. 5: Laptop-AP setup 97 |
98 |

Fig. 5: Laptop-AP setup

99 | 100 | This module contains 3 files:
101 | 1. create-htb-queues-laptop-AP.sh
102 | 2. decision-tree-classification-laptop-AP.py
103 | 3. main-script-laptop-AP.sh
104 | 105 | #### Module 7: KNN-classification-2-interface-machine 106 | This module performs K-nearest neighbor based classification. It needs weka tool to classify the flow using knn model. It contains following files.
107 | 1. **data.csv :** This is the training file containing flows along with their feature values and label.
108 | 2. **generate-KNN-model.sh :** This script converts data.csv to a new file train-data.arff and then it builds KNN model using this arff file.
109 | 3. **knn.model :** This is the knn model which is passed to weka to predict the tag of the test flow.
110 | 4. **test-data.arff :** This file contains exactly one entry, i.e., the feature values of the flow which we will classify.
111 | 5. **call-weka-and-find-tag.sh :** It uses the exising KNN model (knn.model file) and the test instance (test-data.arff) and invokes KNN algorithm to predict the tag for the flow written in test-data.arff.
112 | 6. **create-htb-queues.sh :** This script creates 3 bands and also sets different parameters.
113 | 7. **knn-classification-script.py :** This script captures packets live, calculate feature values for the flow (similar to the script in module 5). It creates the test-instance (test-data.arff file) and then invokes call-weka-and-find-tag.sh to get the predicted tag for it. It further does the prioritization if the flow is tagged as multimedia using the iptables and tc filter rules.
114 | 8. **main-script-KNN.sh :** This script invokes create-htb-queues.sh and knn-classification-script.py. It also captures the traffic in pcap file using tcpdump and saves them locally, which will be further used to re-train the classifier.
115 | 116 | 117 | #### Module 8: MOS-calculation-scripts 118 | This module is used when we want to test the quality of the multimedia streaming. MOS score is based on the features such as packet loss, latency and jitter. To calculate the MOS score, first we need to capture the trace (pcap file) on the client machine, while we do the multimedia streaming.
119 | Now move all the pcaps to the directory MOS-calculation-scripts. You need to simply run the auto-calculate-mos.sh script. 120 | 121 | This module has 3 files.
122 | 1. **calculate-moss.py :** In this script, we use equations from Pingplotter software page
(https://www.pingman.com/kb/article/how-is-mos-calculated-in-pingplotter-pro-50.html) to calculate the MOS score.
123 | 2. **calculate-moss.sh :** This script calculates the number of tcp retransmission, number of duplicate acks, number of lost segments and number of fast retransmission. It invokes calculate-moss.py and pass these informations to calculate the MOS score.
124 | 3. **auto-calculate-mos.sh :** This script invokes calculate-moss.sh for each pcap file present in the current directory and finally creates a file ‘mos-scores.txt’ which contains the MOS scores of each pcap file.
125 | -------------------------------------------------------------------------------- /scripts/v1.0/KNN-classification-2-interface-machine/knn-classification-script.py: -------------------------------------------------------------------------------- 1 | #---------------------------------------------KNN approach using 8 features-------------------------------------- 2 | '''This scripts does real-time classification of the flows and prioritization/de-prioritization. 3 | 4 | Here we have used following 8 features: 5 | 1. Number of packets with push flag set, 6 | 2. Avg window size 7 | 3. Avg Packet Size 8 | 4. Std. deviation of packet size 9 | 5. Avg. IAT(ms) 10 | 6. Std. daviation of IAT(ms) 11 | 7. Total Bytes 12 | 8. Flow duration 13 | 14 | It uses pcapy module to capture the live traffic and process each packet one by one. 15 | 16 | ''' 17 | 18 | import socket 19 | from struct import * 20 | import datetime,time 21 | import pcapy 22 | import sys,math 23 | import subprocess,os 24 | 25 | 26 | minPacket = 1000 #Minimum number of packets after which we classify the flow (Threshold point). 27 | src_port = "" 28 | dst_port = "" 29 | main_packet_size = {} # dictionary to store list of packet sizes for each flow (Here key = flowID, value = list of packet sizes) 30 | flow_list = [] # contains the flowIDs (a combination of SIP,DIP,srcPort, dstPort) 31 | main_inter_arrival_time = {} # dictionary to store list of IATs for each flow (Here key = flowID, value = list of IATs) 32 | last_time={} # for each flow we store timestamp of the last packet arrival 33 | window_sizes = {} # for each flow, it stores sum of windows sizes 34 | push_flags = {} # for each flow, it stores total count of push flags which are 'SET' 35 | string={} # For each flow, we have a string of feature values (just for printing purpose, on screen) 36 | 37 | length = 0 # Number of packets in a flow 38 | avg_pkt_size = 0 # average packet size of a flow 39 | std_dev_pkt_size = 0 # standard deviation of packet sizes in a flow 40 | avg_iat = 0 # average IAT of a flow 41 | std_dev_IAT = 0 # standard deviation of IAT in a flow 42 | pktsize = 0 # packet size 43 | win_size = 0 # Advertized window size 44 | total_bytes = 0 # total bytes in a flow 45 | flow_duration = 0 # Total flow duration 46 | 47 | 48 | var_pkt_size = 0 # variance of packet sizes of a flow 49 | 50 | rule1 = "" # used to execute iptables rule 51 | rule2 = "" # used to execute iptables rule 52 | 53 | proto = "" # whether a packet/flow is UDP or TCP 54 | start_time = time.time() # initial time 55 | 56 | tag = "" #tag given by decision tree method 57 | 58 | 59 | 60 | def main(argv): 61 | dev = "eth1" # interface on which packet will be captured 62 | 63 | cap = pcapy.open_live(dev , 100 , 1 , 0) # Here, open_live() captures packet 64 | # 1st parameter : interface name 65 | # 2nd parameter : How many bytes to capture in each packet 66 | # 3rd parameter : promiscous mode 67 | # 4th parameter : Read timeout time 68 | 69 | #start sniffing packets, infinite while loop 70 | while(1) : 71 | (header, packet) = cap.next() # capture packets, one by one 72 | parse_packet(packet) # parse each packet 73 | 74 | #Convert a string of 6 characters of ethernet address into a dash separated hex string 75 | def eth_addr (a) : 76 | b = "%.2x:%.2x:%.2x:%.2x:%.2x:%.2x" % (ord(a[0]) , ord(a[1]) , ord(a[2]), ord(a[3]), ord(a[4]) , ord(a[5])) 77 | return b 78 | 79 | 80 | #function to parse a packet 81 | def parse_packet(packet) : 82 | #parse ethernet header 83 | eth_length = 14 84 | eth_header = packet[:eth_length] # upto header 85 | eth = unpack('!6s6sH' , eth_header) # un-packing 86 | eth_protocol = socket.ntohs(eth[2]) 87 | 88 | #Parse IP packets, IP Protocol number = 8 89 | if eth_protocol == 8 : # checks if it is an IP packet 90 | #Parse IP header 91 | ip_header = packet[eth_length:20+eth_length] # take first 20 characters for the ip header 92 | 93 | #now unpack them :) 94 | iph = unpack('!BBHHHBBH4s4s' , ip_header) 95 | pktsize = int(iph[2]) 96 | 97 | version_ihl = iph[0] 98 | version = version_ihl >> 4 99 | ihl = version_ihl & 0xF 100 | 101 | iph_length = ihl * 4 102 | 103 | 104 | protocol = iph[6] # protocol (TCP/UDP) 105 | s_addr = socket.inet_ntoa(iph[8]); # source IP address 106 | d_addr = socket.inet_ntoa(iph[9]); # destination IP address 107 | 108 | time1 = time.time() - start_time # How many seconds have elapsed since this script started, works as unique timestamp for packets 109 | 110 | #TCP protocol 111 | if protocol == 6 : # protocol 6 referes to TCP protocol 112 | proto = "tcp" 113 | if("172.16.1" in str(d_addr)): # Client machines had 172.16.1.XX ips, so we are interested in only those packets coming to these IPs 114 | if(pktsize > 1500): # if packet size is more than 1500, set it to 1500 115 | pktsize = 1500 116 | 117 | t = iph_length + eth_length 118 | tcp_header = packet[t:t+20] 119 | tcph = unpack('!HHLLBBHHH' , tcp_header) 120 | tcph_v2 = unpack('!HHLLHHHH' , tcp_header) # sp, dp, Seq, ack, first2B (16 bits), winSize 121 | src_port = tcph[0] # source port 122 | dst_port = tcph[1] # destination port 123 | 124 | #sequence = tcph[2] # L, not used 125 | #acknowledgement = tcph[3] # L, not used 126 | #doff_reserved = tcph[4] # not used 127 | #tcph_length = doff_reserved >> 4 # not used 128 | 129 | 130 | # To identify each flow uniquely, we concatenate SIP,DIP,SP,DP to make the key 131 | key = str(s_addr)+"|"+ str(d_addr)+"|"+str(src_port)+"|"+str(dst_port) 132 | 133 | first16bits = tcph_v2[4] 134 | push_flag_str = first16bits & 0x0008 # push flag in string format 135 | push_flag = int(push_flag_str)/8 # push flag in 0/1 form 136 | 137 | win_size_str = tcph_v2[5] 138 | win_size = int(win_size_str) # advertized window size in integer 139 | 140 | 141 | if (key in flow_list): # check if the packet belongs to already existing flow ? 142 | main_packet_size[key].append(pktsize) # if YES, append its packet size to the packet size list for this flow 143 | lasttime = last_time[key] 144 | diff = round(float(time1) - float(lasttime),8) # calculate inter-arrival time (seconds) 145 | main_inter_arrival_time[key].append(diff) # append IAT 146 | window_sizes[key] = window_sizes[key] + win_size # update the sum of window size for the flow 147 | if(push_flag == 1): # check if the PSH flag is set, and update the count if 1 148 | push_flags[key] = push_flags[key] + 1 149 | last_time[key] = time1 # update last time for the flow, to the timestamp of this packet 150 | 151 | 152 | else: # if this packet is the first one in this NEW flow 153 | flow_list.append(key) # make its entry in the existing flow List 154 | main_packet_size[key] = [pktsize] # make its entry in the packet size dictionary 155 | main_inter_arrival_time[key] = [] # create a blank list in this disctionary, as it is the first packet 156 | window_sizes[key] = win_size # Initialize its entry for window size dictionary 157 | if(push_flag == 1): # initilize push count for this new flow 158 | push_flags[key] = 1 159 | else: 160 | push_flags[key] = 0 161 | 162 | last_time[key] = time1 163 | 164 | #sys.stdout.write(str(time1)+"|"+str(s_addr)+"|"+ str(d_addr)+"|"+str(src_port) + "|" + str(dst_port)+"|"+pktsize ) 165 | 166 | if (len(main_packet_size[key]) == 200): # This is to just print on screen that 200 packets have arrived in this flow 167 | print key, "200 packets arrived so far......." 168 | if (len(main_packet_size[key]) == 750): # This is to just print on screen that 750 packets have arrived in this flow 169 | print key, "-------------750 packets arrived so far......." 170 | 171 | if (len(main_packet_size[key]) == int(minPacket)): # flow has reached Threshold point, Now call the function to calculate features and then classify the flow 172 | if("172.16.1" not in str(s_addr)): # ignore ACK packets going from 172.16.1.XX ip address, as we are interested in 173 | calculate(key,proto) # classifying only incoming packets flows 174 | 175 | 176 | 177 | 178 | # This function takes two parameters as input, 1. flowID, 2. protocol 179 | # It calculates the features values, and then checks if they pass the decision tree rules 180 | # if they pass, it further prioritize the flow using Iptables rules 181 | def calculate(key,proto) : 182 | feature_vector = " " 183 | 184 | packet_list = main_packet_size[key] # packet_list contains the list of packet sizes for the flow in consideration 185 | length=len(packet_list) # number of packets 186 | total_bytes = int(sum(packet_list)) # Total_bytes in the flow 187 | avg_pkt_size = total_bytes/length 188 | summ = 0 189 | for j in packet_list: # calculating standard deviation of packet sizes 190 | summ = summ + (avg_pkt_size - j)*(avg_pkt_size - j) 191 | var_pkt_size = summ/length # variance of packet sizes 192 | std_dev_pkt_size = int(math.sqrt(var_pkt_size)) 193 | feature_vector =" Avg pkt size:"+str(avg_pkt_size)+" Pkt_size_Std_Dev : "+str(std_dev_pkt_size)+" Total_Bytes : "+str(total_bytes) # concatenate features in string format 194 | 195 | 196 | inter_arrival_time_list = main_inter_arrival_time[key] # a list containing IATs for the flow 197 | length = len(inter_arrival_time_list) 198 | if (length > 0): 199 | flow_duration = sum(inter_arrival_time_list) # flow duration 200 | avg_iat = 1000*1.0*flow_duration/length # averag IAT in miliSeconds 201 | summ=0 202 | for iat in inter_arrival_time_list: 203 | iat = 1000.0*iat # covert each IAT to ms, and then calculate 204 | summ=summ + (iat-avg_iat)*(iat-avg_iat) #ms 205 | 206 | std_dev_IAT = round(math.sqrt(1.0*summ/(length)),2) # standard deviation of IATs 207 | 208 | 209 | feature_vector = feature_vector+" AVG_IAT : "+str(round(float(avg_iat),2))+" IAT_Std_Dev :"+str(std_dev_IAT) #concatenate 210 | 211 | avg_win_size = window_sizes[key]/len(main_packet_size[key]) # average window size 212 | feature_vector = feature_vector + " Avg_win_size = " + str(avg_win_size) + " PSH_count = "+str(push_flags[key]) 213 | 214 | # At this point , we have all the features calculated us, so we need to check the if else conditions to see if this flow belongs to multimedia 215 | # These if-else rules are generated by decision tree classifier(BFTree) on weka 216 | 217 | testrow = str(avg_pkt_size)+","+str(std_dev_pkt_size)+","+str(total_bytes)+","+str(round(float(avg_iat),2))+","+str(std_dev_IAT)+","+str(flow_duration)+","+str(push_flags[key])+","+str(avg_win_size)+","+"download" #Here 'download' is just a dummy class, as it is needed be be there in test arff file 218 | 219 | 220 | #Remove the test-data line and blank lines....using sed commands 221 | 222 | subprocess.call("sed -i '/^[0-9]/d' test-data.arff", shell=True) # remove existing test rows 223 | subprocess.call("sed -i '/^$/d' test-data.arff", shell=True) # Remove blank lines 224 | 225 | 226 | with open("test-data.arff", "a") as myfile: #open the test data file, Append this new flow statistics 227 | myfile.write("\n"+testrow) 228 | myfile.close(); 229 | 230 | 231 | 232 | #now invoke WEKA with the existing knn model, with this new test data file, to get the predicted TAG for it. 233 | #if tag is multimedia ,then prioritize this flow by executing iptables command 234 | 235 | subprocess.call("bash call-weka-and-find-tag.sh", shell=True) # This script invokes weka and gets the tag i.e. multimedia, download 236 | 237 | # The above script puts the tag in the 'tag.txt', open this file and fetch it 238 | with open("tag.txt", "r") as f1: 239 | for line in f1: 240 | tag = str(line).split("\n")[0] 241 | f1.close(); 242 | 243 | print "TAG = ", tag 244 | 245 | # if the flow is tagged as Multimedia, we need to priritize it, and for that we need to fetch the SIP, DIP, SP, DP from the key 246 | # and then apply the iptables rules accordingly, to put the flow in high priority band 247 | tuples = key.split("|") 248 | sip = tuples[0] # source ip 249 | dip = tuples[1] # dst ip 250 | sp = tuples[2] # source port 251 | dp = tuples[3] # dst port 252 | 253 | if( tag == 'multimedia'): 254 | print "KEY : "+key+"------" ,tag,"------" ,feature_vector # print on the screen 255 | 256 | # There are three bands, band 5 : priritized, band 6 : neutral, band 7 : de-prioritized 257 | # iptables rule1 make sure that any packet coming from 'sip' with port 'sp', and going to 'dip' and port 'dp' get marked as '5'. 258 | # iptables rule2 does the same, but for all packets flowing in the reverse direction 259 | rule1 = "sudo iptables -A POSTROUTING -t mangle -d "+dip+" -s "+sip+" -p "+proto+ " --dport "+dp+" --sport "+sp+" -j MARK --set-mark 5 " 260 | rule2 = "sudo iptables -A POSTROUTING -t mangle -s "+dip+" -d "+sip+" -p "+proto+ " --sport "+dp+" --dport "+sp+" -j MARK --set-mark 5 " 261 | 262 | # execute these two rules now 263 | subprocess.call(rule1, shell=True) 264 | subprocess.call(rule2, shell=True) 265 | 266 | print "iptables Rules for multimedia flows, got executed......." 267 | else: 268 | # download flow 269 | print "KEY : "+key+"------",tag,"------",feature_vector #when it could not qualify the rule..print with ****** 270 | # mark these packets as 7, as band 7 is de-prioritized band. 271 | rule1 = "sudo iptables -A POSTROUTING -t mangle -d "+dip+" -s "+sip+" -p "+proto+ " --dport "+dp+" --sport "+sp+" -j MARK --set-mark 7 " 272 | rule2 = "sudo iptables -A POSTROUTING -t mangle -s "+dip+" -d "+sip+" -p "+proto+ " --sport "+dp+" --dport "+sp+" -j MARK --set-mark 7 " 273 | 274 | # execute these two rules now 275 | subprocess.call(rule1, shell=True) 276 | subprocess.call(rule2, shell=True) 277 | 278 | print "iptables Rules for Download flows, got executed......." 279 | 280 | if __name__ == "__main__": 281 | main(sys.argv) 282 | -------------------------------------------------------------------------------- /scripts/v1.0/DT-classification-2-interface-machine/classification-script-decision-tree.py: -------------------------------------------------------------------------------- 1 | #--------------------------Decision tree approach with complete rules and using 8 features-------------------------------------- 2 | '''This scripts does real-time classification of the flows and prioritization/de-prioritization on 2-interface machine and Airtight AP. 3 | 4 | Here we have used following 8 features: 5 | 1. Number of packets with push flag set, 6 | 2. Avg window size 7 | 3. Avg Packet Size 8 | 4. Std. deviation of packet size 9 | 5. Avg. IAT(ms) 10 | 6. Std. daviation of IAT(ms) 11 | 7. Total Bytes 12 | 8. Flow duration 13 | 14 | It uses pcapy module to capture the live traffic and process each packet one by one. 15 | ''' 16 | #Key=sip+dip only 17 | import socket 18 | from struct import * 19 | import datetime,time 20 | import pcapy 21 | import sys,math 22 | import subprocess,os 23 | #-------------------------------------- 24 | minPacket = 1000 #Minimum number of packets after which we classify the flow (Threshold point). 25 | src_port = "" 26 | dst_port = "" 27 | main_packet_size = {} # dictionary to store list of packet sizes for each flow (Here key = flowID, value = list of packet sizes) 28 | flow_list = [] # contains the flowIDs (a combination of SIP,DIP,srcPort, dstPort) 29 | main_inter_arrival_time = {} # dictionary to store list of IATs for each flow (Here key = flowID, value = list of IATs) 30 | last_time={} # for each flow we store timestamp of the last packet arrival 31 | window_sizes = {} # for each flow, it stores sum of windows sizes 32 | push_flags = {} # for each flow, it stores total count of push flags which are 'SET' 33 | string={} # For each flow, we have a string of feature values (just for printing purpose, on screen) 34 | 35 | #####count = 0 36 | 37 | length = 0 # Number of packets in a flow 38 | avg_pkt_size = 0 # average packet size of a flow 39 | std_dev_pkt_size = 0 # standard deviation of packet sizes in a flow 40 | avg_iat = 0 # average IAT of a flow 41 | std_dev_IAT = 0 # standard deviation of IAT in a flow 42 | pktsize = 0 # packet size 43 | win_size = 0 # Advertized window size 44 | total_bytes = 0 # total bytes in a flow 45 | flow_duration = 0 # Total flow duration 46 | 47 | 48 | var_pkt_size = 0 # variance of packet sizes of a flow 49 | 50 | rule1 = "" # used to execute iptables rule 51 | rule2 = "" # used to execute iptables rule 52 | 53 | proto = "" # whether a packet/flow is UDP or TCP 54 | start_time = time.time() # initial time 55 | 56 | tag = "" #tag given by decision tree method 57 | 58 | 59 | 60 | def main(argv): 61 | dev = "eth1" # interface on which packet will be captured 62 | 63 | cap = pcapy.open_live(dev , 100 , 1 , 0) # Here, open_live() captures packet 64 | # 1st parameter : interface name 65 | # 2nd parameter : How many bytes to capture in each packet 66 | # 3rd parameter : promiscous mode 67 | # 4th parameter : Read timeout time 68 | 69 | #start sniffing packets, infinite while loop 70 | while(1) : 71 | (header, packet) = cap.next() # capture packets, one by one 72 | parse_packet(packet) # parse each packet 73 | 74 | #Convert a string of 6 characters of ethernet address into a dash separated hex string 75 | def eth_addr (a) : 76 | b = "%.2x:%.2x:%.2x:%.2x:%.2x:%.2x" % (ord(a[0]) , ord(a[1]) , ord(a[2]), ord(a[3]), ord(a[4]) , ord(a[5])) 77 | return b 78 | 79 | 80 | #function to parse a packet 81 | def parse_packet(packet) : 82 | #parse ethernet header 83 | eth_length = 14 84 | eth_header = packet[:eth_length] # upto header 85 | eth = unpack('!6s6sH' , eth_header) # un-packing 86 | eth_protocol = socket.ntohs(eth[2]) 87 | 88 | #Parse IP packets, IP Protocol number = 8 89 | if eth_protocol == 8 : # checks if it is an IP packet 90 | #Parse IP header 91 | ip_header = packet[eth_length:20+eth_length] # take first 20 characters for the ip header 92 | 93 | #now unpack them :) 94 | iph = unpack('!BBHHHBBH4s4s' , ip_header) 95 | pktsize = int(iph[2]) 96 | 97 | version_ihl = iph[0] 98 | version = version_ihl >> 4 99 | ihl = version_ihl & 0xF 100 | 101 | iph_length = ihl * 4 102 | 103 | 104 | protocol = iph[6] # protocol (TCP/UDP) 105 | s_addr = socket.inet_ntoa(iph[8]); # source IP address 106 | d_addr = socket.inet_ntoa(iph[9]); # destination IP address 107 | 108 | time1 = time.time() - start_time # How many seconds have elapsed since this script started, works as unique timestamp for packets 109 | 110 | #TCP protocol 111 | if protocol == 6 : # protocol 6 referes to TCP protocol 112 | proto = "tcp" 113 | if("172.16.1" in str(d_addr)): # Client machines had 172.16.1.XX ips, so we are interested in only those packets coming to these IPs 114 | if(pktsize > 1500): # if packet size is more than 1500, set it to 1500 115 | pktsize = 1500 116 | 117 | t = iph_length + eth_length 118 | tcp_header = packet[t:t+20] 119 | tcph = unpack('!HHLLBBHHH' , tcp_header) 120 | tcph_v2 = unpack('!HHLLHHHH' , tcp_header) # sp, dp, Seq, ack, first2B (16 bits), winSize 121 | src_port = tcph[0] # source port 122 | dst_port = tcph[1] # destination port 123 | 124 | #sequence = tcph[2] # L, not used 125 | #acknowledgement = tcph[3] # L, not used 126 | #doff_reserved = tcph[4] # not used 127 | #tcph_length = doff_reserved >> 4 # not used 128 | 129 | 130 | # To identify each flow uniquely, we concatenate SIP,DIP,SP,DP to make the key 131 | key = str(s_addr)+"|"+ str(d_addr)+"|"+str(src_port)+"|"+str(dst_port) 132 | 133 | first16bits = tcph_v2[4] 134 | push_flag_str = first16bits & 0x0008 # push flag in string format 135 | push_flag = int(push_flag_str)/8 # push flag in 0/1 form 136 | 137 | win_size_str = tcph_v2[5] 138 | win_size = int(win_size_str) # advertized window size in integer 139 | 140 | 141 | if (key in flow_list): # check if the packet belongs to already existing flow ? 142 | main_packet_size[key].append(pktsize) # if YES, append its packet size to the packet size list for this flow 143 | lasttime = last_time[key] 144 | diff = round(float(time1) - float(lasttime),8) # calculate inter-arrival time (seconds) 145 | main_inter_arrival_time[key].append(diff) # append IAT 146 | window_sizes[key] = window_sizes[key] + win_size # update the sum of window size for the flow 147 | if(push_flag == 1): # check if the PSH flag is set, and update the count if 1 148 | push_flags[key] = push_flags[key] + 1 149 | last_time[key] = time1 # update last time for the flow, to the timestamp of this packet 150 | 151 | 152 | else: # if this packet is the first one in this NEW flow 153 | flow_list.append(key) # make its entry in the existing flow List 154 | main_packet_size[key] = [pktsize] # make its entry in the packet size dictionary 155 | main_inter_arrival_time[key] = [] # create a blank list in this disctionary, as it is the first packet 156 | window_sizes[key] = win_size # Initialize its entry for window size dictionary 157 | if(push_flag == 1): # initilize push count for this new flow 158 | push_flags[key] = 1 159 | else: 160 | push_flags[key] = 0 161 | 162 | last_time[key] = time1 163 | 164 | #sys.stdout.write(str(time1)+"|"+str(s_addr)+"|"+ str(d_addr)+"|"+str(src_port) + "|" + str(dst_port)+"|"+pktsize ) 165 | 166 | if (len(main_packet_size[key]) == 200): # This is to just print on screen that 200 packets have arrived in this flow 167 | print key, "200 packets arrived so far......." 168 | if (len(main_packet_size[key]) == 750): # This is to just print on screen that 750 packets have arrived in this flow 169 | print key, "-------------750 packets arrived so far......." 170 | 171 | if (len(main_packet_size[key]) == int(minPacket)): # flow has reached Threshold point, Now call the function to calculate features and then classify the flow 172 | if("172.16.1" not in str(s_addr)): # ignore ACK packets going from 172.16.1.XX ip address, as we are interested in 173 | calculate(key,proto) # classifying only incoming packets flows 174 | 175 | 176 | 177 | 178 | # This function takes two parameters as input, 1. flowID, 2. protocol 179 | # It calculates the features values, and then checks if they pass the decision tree rules 180 | # if they pass, it further prioritize the flow using Iptables rules 181 | def calculate(key,proto) : 182 | feature_vector = " " 183 | 184 | packet_list = main_packet_size[key] # packet_list contains the list of packet sizes for the flow in consideration 185 | length=len(packet_list) # number of packets 186 | total_bytes = int(sum(packet_list)) # Total_bytes in the flow 187 | avg_pkt_size = total_bytes/length 188 | summ = 0 189 | for j in packet_list: # calculating standard deviation of packet sizes 190 | summ = summ + (avg_pkt_size - j)*(avg_pkt_size - j) 191 | var_pkt_size = summ/length # variance of packet sizes 192 | std_dev_pkt_size = int(math.sqrt(var_pkt_size)) 193 | feature_vector =" Avg pkt size:"+str(avg_pkt_size)+" Pkt_size_Std_Dev : "+str(std_dev_pkt_size)+" Total_Bytes : "+str(total_bytes) # concatenate features in string format 194 | 195 | 196 | inter_arrival_time_list = main_inter_arrival_time[key] # a list containing IATs for the flow 197 | length = len(inter_arrival_time_list) 198 | if (length > 0): 199 | flow_duration = sum(inter_arrival_time_list) # flow duration 200 | avg_iat = 1000*1.0*flow_duration/length # averag IAT in miliSeconds 201 | summ=0 202 | for iat in inter_arrival_time_list: 203 | iat = 1000.0*iat # covert each IAT to ms, and then calculate 204 | summ=summ + (iat-avg_iat)*(iat-avg_iat) #ms 205 | 206 | std_dev_IAT = round(math.sqrt(1.0*summ/(length)),2) # standard deviation of IATs 207 | 208 | 209 | feature_vector = feature_vector+" AVG_IAT : "+str(round(float(avg_iat),2))+" IAT_Std_Dev :"+str(std_dev_IAT) #concatenate 210 | 211 | avg_win_size = window_sizes[key]/len(main_packet_size[key]) # average window size 212 | feature_vector = feature_vector + " Avg_win_size = " + str(avg_win_size) + " PSH_count = "+str(push_flags[key]) 213 | 214 | # At this point , we have all the features calculated us, so we need to check the if else conditions to see if this flow belongs to multimedia 215 | # These if-else rules are generated by decision tree classifier(BFTree) on weka 216 | 217 | tag = 'download' # default tag assigned as 'Download' 218 | 219 | if(avg_win_size<31380.5): 220 | if(avg_iat<3.3): 221 | if(total_bytes< 1497085.5): 222 | tag='multimedia' 223 | elif(avg_win_size<8792.5): 224 | tag='multimedia' 225 | 226 | 227 | elif(avg_iat>=3.3): 228 | if(push_flags[key]<279): 229 | if(total_bytes<1495564.5): 230 | if(push_flags[key]<88.5): 231 | tag='multimedia' 232 | elif(avg_iat<7.625 and avg_iat>=4.23): 233 | if(avg_pkt_size < 1453): 234 | tag='multimedia' 235 | 236 | elif(push_flags[key]>=279): 237 | if(push_flags[key]<312.5): 238 | if(avg_pkt_size<1346): 239 | tag='multimedia' 240 | if(avg_pkt_size>=1346): 241 | if(push_flags[key] >= 308): 242 | tag='multimedia' 243 | 244 | elif(avg_win_size>=31380.5): 245 | if(avg_win_size<33132.5): 246 | if(push_flags[key]>=378.5): 247 | tag='multimedia' 248 | elif(avg_win_size>=33132.5): 249 | if(push_flags[key]>=7.5): 250 | if(push_flags[key]<44.5): 251 | if(avg_iat<6.035): 252 | tag='multimedia' 253 | else: # psh_flags >= 44.5 254 | if(push_flags[key]<256): 255 | if(avg_win_size >=35025.5 and avg_win_size <40510.5): 256 | tag='multimedia' 257 | else: # psh_flags >= 256 258 | tag='multimedia' 259 | 260 | # By this we have the tag, decided by the above if-else rules 261 | print 'Decision tree TAG =', tag 262 | 263 | # if the flow is tagged as Multimedia, we need to priritize it, and for that we need to fetch the SIP, DIP, SP, DP from the key 264 | # and then apply the iptables rules accordingly, to put the flow in high priority band 265 | tuples = key.split("|") 266 | sip = tuples[0] # source ip 267 | dip = tuples[1] # dst ip 268 | sp = tuples[2] # source port 269 | dp = tuples[3] # dst port 270 | 271 | if( tag == 'multimedia'): 272 | print "KEY : "+key+"------" ,tag,"------" ,feature_vector # print on the screen 273 | 274 | # There are three bands, band 5 : priritized, band 6 : neutral, band 7 : de-prioritized 275 | # iptables rule1 make sure that any packet coming from 'sip' with port 'sp', and going to 'dip' and port 'dp' get marked as '5'. 276 | # iptables rule2 does the same, but for all packets flowing in the reverse direction 277 | rule1 = "sudo iptables -A POSTROUTING -t mangle -d "+dip+" -s "+sip+" -p "+proto+ " --dport "+dp+" --sport "+sp+" -j MARK --set-mark 5 " 278 | rule2 = "sudo iptables -A POSTROUTING -t mangle -s "+dip+" -d "+sip+" -p "+proto+ " --sport "+dp+" --dport "+sp+" -j MARK --set-mark 5 " 279 | 280 | # execute these two rules now 281 | subprocess.call(rule1, shell=True) 282 | subprocess.call(rule2, shell=True) 283 | 284 | print "iptables Rules for multimedia flows, got executed......." 285 | else: 286 | # download flow 287 | print "KEY : "+key+"------",tag,"------",feature_vector #when it could not qualify the rule..print with ****** 288 | # mark these packets as 7, as band 7 is de-prioritized band. 289 | rule1 = "sudo iptables -A POSTROUTING -t mangle -d "+dip+" -s "+sip+" -p "+proto+ " --dport "+dp+" --sport "+sp+" -j MARK --set-mark 7 " 290 | rule2 = "sudo iptables -A POSTROUTING -t mangle -s "+dip+" -d "+sip+" -p "+proto+ " --sport "+dp+" --dport "+sp+" -j MARK --set-mark 7 " 291 | 292 | # execute these two rules now 293 | subprocess.call(rule1, shell=True) 294 | subprocess.call(rule2, shell=True) 295 | 296 | print "iptables Rules for Download flows, got executed......." 297 | 298 | if __name__ == "__main__": 299 | main(sys.argv) 300 | -------------------------------------------------------------------------------- /scripts/v1.0/DT-classification-on-laptop-AP/decision-tree-classification-laptop-AP.py: -------------------------------------------------------------------------------- 1 | #------------------------Laptop-AP-Decision tree approach with complete rules and using 8 features-------------------------------------- 2 | '''This scripts does real-time classification of the flows and prioritization/de-prioritization in Laptop-AP setup. 3 | 4 | Here we have used following 8 features: 5 | 1. Number of packets with push flag set, 6 | 2. Avg window size 7 | 3. Avg Packet Size 8 | 4. Std. deviation of packet size 9 | 5. Avg. IAT(ms) 10 | 6. Std. daviation of IAT(ms) 11 | 7. Total Bytes 12 | 8. Flow duration 13 | 14 | It uses pcapy module to capture the live traffic and process each packet one by one. 15 | ''' 16 | import socket 17 | from struct import * 18 | import datetime,time 19 | import pcapy 20 | import sys,math 21 | import subprocess,os 22 | #-------------------------------------- 23 | minPacket = 1000 #Minimum number of packets after which we classify the flow (Threshold point). 24 | src_port = "" 25 | dst_port = "" 26 | main_packet_size = {} # dictionary to store list of packet sizes for each flow (Here key = flowID, value = list of packet sizes) 27 | flow_list = [] # contains the flowIDs (a combination of SIP,DIP,srcPort, dstPort) 28 | main_inter_arrival_time = {} # dictionary to store list of IATs for each flow (Here key = flowID, value = list of IATs) 29 | last_time={} # for each flow we store timestamp of the last packet arrival 30 | window_sizes = {} # for each flow, it stores sum of windows sizes 31 | push_flags = {} # for each flow, it stores total count of push flags which are 'SET' 32 | string={} # For each flow, we have a string of feature values (just for printing purpose, on screen) 33 | 34 | #####count = 0 35 | 36 | length = 0 # Number of packets in a flow 37 | avg_pkt_size = 0 # average packet size of a flow 38 | std_dev_pkt_size = 0 # standard deviation of packet sizes in a flow 39 | avg_iat = 0 # average IAT of a flow 40 | std_dev_IAT = 0 # standard deviation of IAT in a flow 41 | pktsize = 0 # packet size 42 | win_size = 0 # Advertized window size 43 | total_bytes = 0 # total bytes in a flow 44 | flow_duration = 0 # Total flow duration 45 | 46 | 47 | var_pkt_size = 0 # variance of packet sizes of a flow 48 | 49 | rule1 = "" # used to execute iptables rule 50 | rule2 = "" # used to execute iptables rule 51 | 52 | proto = "" # whether a packet/flow is UDP or TCP 53 | start_time = time.time() # initial time 54 | 55 | tag = "" #tag given by decision tree method 56 | 57 | def main(argv): 58 | dev = "wlan0" # interface on which packet will be captured 59 | 60 | cap = pcapy.open_live(dev , 100 , 1 , 1000) # Here, open_live() captures packet 61 | # 1st parameter : interface name 62 | # 2nd parameter : How many bytes to capture in each packet 63 | # 3rd parameter : promiscous mode 64 | # 4th parameter : Read timeout time 65 | 66 | #start sniffing packets, infinite while loop 67 | while(1) : 68 | (header, packet) = cap.next() # capture packets, one by one 69 | parse_packet(packet) # parse each packet 70 | 71 | #Convert a string of 6 characters of ethernet address into a dash separated hex string 72 | def eth_addr (a) : 73 | b = "%.2x:%.2x:%.2x:%.2x:%.2x:%.2x" % (ord(a[0]) , ord(a[1]) , ord(a[2]), ord(a[3]), ord(a[4]) , ord(a[5])) 74 | return b 75 | 76 | 77 | #function to parse a packet 78 | def parse_packet(packet) : 79 | #parse ethernet header 80 | eth_length = 14 81 | eth_header = packet[:eth_length] # upto header 82 | eth = unpack('!6s6sH' , eth_header) # un-packing 83 | eth_protocol = socket.ntohs(eth[2]) 84 | 85 | #Parse IP packets, IP Protocol number = 8 86 | if eth_protocol == 8 : # checks if it is an IP packet 87 | #Parse IP header 88 | ip_header = packet[eth_length:20+eth_length] # take first 20 characters for the ip header 89 | 90 | #now unpack them :) 91 | iph = unpack('!BBHHHBBH4s4s' , ip_header) 92 | pktsize = int(iph[2]) 93 | 94 | version_ihl = iph[0] 95 | version = version_ihl >> 4 96 | ihl = version_ihl & 0xF 97 | 98 | iph_length = ihl * 4 99 | 100 | 101 | protocol = iph[6] # protocol (TCP/UDP) 102 | s_addr = socket.inet_ntoa(iph[8]); # source IP address 103 | d_addr = socket.inet_ntoa(iph[9]); # destination IP address 104 | 105 | time1 = time.time() - start_time # How many seconds have elapsed since this script started, works as unique timestamp for packets 106 | 107 | #TCP protocol 108 | if protocol == 6 : # protocol 6 referes to TCP protocol 109 | proto = "tcp" 110 | if("172.16.1" in str(d_addr)): # Client machines had 172.16.1.XX ips, so we are interested in only those packets coming to these IPs 111 | if(pktsize > 1500): # if packet size is more than 1500, set it to 1500 112 | pktsize = 1500 113 | 114 | t = iph_length + eth_length 115 | tcp_header = packet[t:t+20] 116 | tcph = unpack('!HHLLBBHHH' , tcp_header) 117 | tcph_v2 = unpack('!HHLLHHHH' , tcp_header) # sp, dp, Seq, ack, first2B (16 bits), winSize 118 | src_port = tcph[0] # source port 119 | dst_port = tcph[1] # destination port 120 | 121 | #sequence = tcph[2] # L, not used 122 | #acknowledgement = tcph[3] # L, not used 123 | #doff_reserved = tcph[4] # not used 124 | #tcph_length = doff_reserved >> 4 # not used 125 | 126 | 127 | # To identify each flow uniquely, we concatenate SIP,DIP,SP,DP to make the key 128 | key = str(s_addr)+"|"+ str(d_addr)+"|"+str(src_port)+"|"+str(dst_port) 129 | 130 | first16bits = tcph_v2[4] 131 | push_flag_str = first16bits & 0x0008 # push flag in string format 132 | push_flag = int(push_flag_str)/8 # push flag in 0/1 form 133 | 134 | win_size_str = tcph_v2[5] 135 | win_size = int(win_size_str) # advertized window size in integer 136 | 137 | 138 | if (key in flow_list): # check if the packet belongs to already existing flow ? 139 | main_packet_size[key].append(pktsize) # if YES, append its packet size to the packet size list for this flow 140 | lasttime = last_time[key] 141 | diff = round(float(time1) - float(lasttime),8) # calculate inter-arrival time (seconds) 142 | main_inter_arrival_time[key].append(diff) # append IAT 143 | window_sizes[key] = window_sizes[key] + win_size # update the sum of window size for the flow 144 | if(push_flag == 1): # check if the PSH flag is set, and update the count if 1 145 | push_flags[key] = push_flags[key] + 1 146 | last_time[key] = time1 # update last time for the flow, to the timestamp of this packet 147 | 148 | 149 | else: # if this packet is the first one in this NEW flow 150 | flow_list.append(key) # make its entry in the existing flow List 151 | main_packet_size[key] = [pktsize] # make its entry in the packet size dictionary 152 | main_inter_arrival_time[key] = [] # create a blank list in this disctionary, as it is the first packet 153 | window_sizes[key] = win_size # Initialize its entry for window size dictionary 154 | if(push_flag == 1): # initilize push count for this new flow 155 | push_flags[key] = 1 156 | else: 157 | push_flags[key] = 0 158 | 159 | last_time[key] = time1 160 | 161 | #sys.stdout.write(str(time1)+"|"+str(s_addr)+"|"+ str(d_addr)+"|"+str(src_port) + "|" + str(dst_port)+"|"+pktsize ) 162 | 163 | if (len(main_packet_size[key]) == 200 and ("172.16.1" not in str(s_addr)) and ("10.42." not in str(s_addr))): # This is to just print on screen that 200 packets have arrived in this flow 164 | print key, "200 packets arrived so far......." 165 | if (len(main_packet_size[key]) == 750 and ("172.16.1" not in str(s_addr)) and ("10.42." not in str(s_addr))): # This is to just print on screen that 750 packets have arrived in this flow 166 | print key, "-------------750 packets arrived so far......." 167 | 168 | if (len(main_packet_size[key]) == int(minPacket)): # flow has reached Threshold point, Now call the function to calculate features and then classify the flow 169 | if(("172.16.1" not in str(s_addr)) and ("10.42." not in str(s_addr))): # ignore ACK packets going from 172.16.1.XX ip address, as we are interested in 170 | calculate(key,proto) # classifying only incoming packets flows 171 | 172 | 173 | 174 | 175 | # This function takes two parameters as input, 1. flowID, 2. protocol 176 | # It calculates the features values, and then checks if they pass the decision tree rules 177 | # if they pass, it further prioritize the flow using Iptables rules 178 | def calculate(key,proto) : 179 | feature_vector = " " 180 | 181 | packet_list = main_packet_size[key] # packet_list contains the list of packet sizes for the flow in consideration 182 | length=len(packet_list) # number of packets 183 | total_bytes = int(sum(packet_list)) # Total_bytes in the flow 184 | avg_pkt_size = total_bytes/length 185 | summ = 0 186 | for j in packet_list: # calculating standard deviation of packet sizes 187 | summ = summ + (avg_pkt_size - j)*(avg_pkt_size - j) 188 | var_pkt_size = summ/length # variance of packet sizes 189 | std_dev_pkt_size = int(math.sqrt(var_pkt_size)) 190 | feature_vector =" Avg pkt size:"+str(avg_pkt_size)+" Pkt_size_Std_Dev : "+str(std_dev_pkt_size)+" Total_Bytes : "+str(total_bytes) # concatenate features in string format 191 | 192 | 193 | inter_arrival_time_list = main_inter_arrival_time[key] # a list containing IATs for the flow 194 | length = len(inter_arrival_time_list) 195 | if (length > 0): 196 | flow_duration = sum(inter_arrival_time_list) # flow duration 197 | avg_iat = 1000*1.0*flow_duration/length # averag IAT in miliSeconds 198 | summ=0 199 | for iat in inter_arrival_time_list: 200 | iat = 1000.0*iat # covert each IAT to ms, and then calculate 201 | summ=summ + (iat-avg_iat)*(iat-avg_iat) #ms 202 | 203 | std_dev_IAT = round(math.sqrt(1.0*summ/(length)),2) # standard deviation of IATs 204 | 205 | 206 | feature_vector = feature_vector+" AVG_IAT : "+str(round(float(avg_iat),2))+" IAT_Std_Dev :"+str(std_dev_IAT) #concatenate 207 | 208 | avg_win_size = window_sizes[key]/len(main_packet_size[key]) # average window size 209 | feature_vector = feature_vector + " Avg_win_size = " + str(avg_win_size) + " PSH_count = "+str(push_flags[key]) 210 | 211 | # At this point , we have all the features calculated us, so we need to check the if else conditions to see if this flow belongs to multimedia 212 | # These if-else rules are generated by decision tree classifier(BFTree) on weka 213 | 214 | tag = 'download' # default tag assigned as 'Download' 215 | 216 | if(avg_win_size<31380.5): 217 | if(avg_iat<3.3): 218 | if(total_bytes< 1497085.5): 219 | tag='multimedia' 220 | elif(avg_win_size<8792.5): 221 | tag='multimedia' 222 | 223 | 224 | elif(avg_iat>=3.3): 225 | if(push_flags[key]<279): 226 | if(total_bytes<1495564.5): 227 | if(push_flags[key]<88.5): 228 | tag='multimedia' 229 | elif(avg_iat<7.625 and avg_iat>=4.23): 230 | if(avg_pkt_size < 1453): 231 | tag='multimedia' 232 | 233 | elif(push_flags[key]>=279): 234 | if(push_flags[key]<312.5): 235 | if(avg_pkt_size<1346): 236 | tag='multimedia' 237 | if(avg_pkt_size>=1346): 238 | if(push_flags[key] >= 308): 239 | tag='multimedia' 240 | 241 | elif(avg_win_size>=31380.5): 242 | if(avg_win_size<33132.5): 243 | if(push_flags[key]>=378.5): 244 | tag='multimedia' 245 | elif(avg_win_size>=33132.5): 246 | if(push_flags[key]>=7.5): 247 | if(push_flags[key]<44.5): 248 | if(avg_iat<6.035): 249 | tag='multimedia' 250 | else: # psh_flags >= 44.5 251 | if(push_flags[key]<256): 252 | if(avg_win_size >=35025.5 and avg_win_size <40510.5): 253 | tag='multimedia' 254 | else: # psh_flags >= 256 255 | tag='multimedia' 256 | 257 | # By this we have the tag, decided by the above if-else rules 258 | print 'Decision tree TAG =', tag 259 | 260 | # if the flow is tagged as Multimedia, we need to priritize it, and for that we need to fetch the SIP, DIP, SP, DP from the key 261 | # and then apply the iptables rules accordingly, to put the flow in high priority band 262 | tuples = key.split("|") 263 | sip = tuples[0] # source ip 264 | dip = tuples[1] # dst ip 265 | sp = tuples[2] # source port 266 | dp = tuples[3] # dst port 267 | 268 | if( tag == 'multimedia'): 269 | print "KEY : "+key+"------" ,tag,"------" ,feature_vector # print on the screen 270 | 271 | # There are three bands, band 5 : priritized, band 6 : neutral, band 7 : de-prioritized 272 | # iptables rule1 make sure that any packet coming from 'sip' with port 'sp', and going to 'dip' and port 'dp' get marked as '5'. 273 | # iptables rule2 does the same, but for all packets flowing in the reverse direction 274 | rule1 = "sudo iptables -A POSTROUTING -t mangle -d "+dip+" -s "+sip+" -p "+proto+ " --dport "+dp+" --sport "+sp+" -j MARK --set-mark 5 " 275 | rule2 = "sudo iptables -A POSTROUTING -t mangle -s "+dip+" -d "+sip+" -p "+proto+ " --sport "+dp+" --dport "+sp+" -j MARK --set-mark 5 " 276 | 277 | # execute these two rules now 278 | subprocess.call(rule1, shell=True) 279 | subprocess.call(rule2, shell=True) 280 | 281 | print "iptables Rules for multimedia flows, got executed......." 282 | else: 283 | # download flow 284 | print "KEY : "+key+"------",tag,"------",feature_vector #when it could not qualify the rule..print with ****** 285 | # mark these packets as 7, as band 7 is de-prioritized band. 286 | rule1 = "sudo iptables -A POSTROUTING -t mangle -d "+dip+" -s "+sip+" -p "+proto+ " --dport "+dp+" --sport "+sp+" -j MARK --set-mark 7 " 287 | rule2 = "sudo iptables -A POSTROUTING -t mangle -s "+dip+" -d "+sip+" -p "+proto+ " --sport "+dp+" --dport "+sp+" -j MARK --set-mark 7 " 288 | 289 | # execute these two rules now 290 | subprocess.call(rule1, shell=True) 291 | subprocess.call(rule2, shell=True) 292 | 293 | print "iptables Rules for Download flows, got executed......." 294 | 295 | if __name__ == "__main__": 296 | main(sys.argv) 297 | -------------------------------------------------------------------------------- /scripts/v1.0/KNN-classification-2-interface-machine/train-data.arff: -------------------------------------------------------------------------------- 1 | @relation data 2 | 3 | @attribute 'Avg Packet Size' numeric 4 | @attribute 'Std. deviation of packet size' numeric 5 | @attribute 'Total Bytes' numeric 6 | @attribute 'AVG. IAT(ms)' numeric 7 | @attribute 'Std. daviation of IAT(ms)' numeric 8 | @attribute 'Flow duration(SECONDS)' numeric 9 | @attribute Push_flag_cnt numeric 10 | @attribute Avg_wind_size numeric 11 | @attribute Class {download,multimedia} 12 | 13 | @data 14 | 1426,210.741548,1426529,10.86,51.682291,10.846116,185,30015,download 15 | 1400,250.792743,1400886,4.06,22.593781,4.058345,276,30015,download 16 | 1487,143.805424,1487074,14.71,181.206312,14.692192,123,34252,download 17 | 1420,236.822719,1420973,10.13,49.875605,10.123397,188,30015,download 18 | 1394,254.972548,1394665,3.46,16.541209,3.460801,305,30449,download 19 | 1490,108.434312,1490920,30.89,78.922546,30.855365,32,31078,download 20 | 1487,129.973074,1487350,10.74,73.107948,10.733989,113,33195,download 21 | 1390,272.814956,1390626,3.12,13.746667,3.121458,267,30015,download 22 | 1407,239.386716,1407833,9.97,49.548553,9.962068,214,30015,download 23 | 1342,312.152206,1342493,5.1,29.318478,5.096614,333,30185,download 24 | 1385,243.993852,1385697,3.9,21.376979,3.892976,277,30666,download 25 | 1490,110.864783,1490040,65.91,167.838689,65.840938,199,32063,download 26 | 1477,175.661607,1477141,9.99,84.661506,9.976475,127,32470,download 27 | 1478,169.676162,1478605,8.66,46.707235,8.654119,121,32063,download 28 | 1487,127.624449,1487101,2.04,13.995727,2.034379,241,33926,download 29 | 1488,121.144542,1488446,2.25,11.673709,2.252602,235,33817,download 30 | 1490,106.023582,1490938,6.09,24.329,6.082775,213,32063,download 31 | 1492,103.48913,1492197,1.24,4.284511,1.243682,33,32063,download 32 | 1492,103.48913,1492197,1.49,10.416141,1.490793,27,32063,download 33 | 1492,103.48913,1492197,1.29,4.476159,1.285848,25,32063,download 34 | 1480,199.085409,1480017,5.73,49.442771,5.722929,129,32063,download 35 | 1478,170.061753,1478557,4.37,27.04507,4.367009,147,32063,download 36 | 1478,169.702681,1478605,3.46,27.032613,3.460656,116,32470,download 37 | 1477,176.019885,1477097,7.81,42.118208,7.798086,134,32063,download 38 | 1473,187.6113,1473730,8.78,44.930425,8.768073,144,33923,download 39 | 1478,169.676162,1478605,8.72,52.018973,8.70788,132,32470,download 40 | 1478,169.676162,1478605,11.77,64.743449,11.758874,75,32063,download 41 | 1497,64.505814,1497112,5.17,51.486265,5.16653,8,30078,download 42 | 1497,64.505814,1497112,1.69,9.622216,1.693,5,30078,download 43 | 1497,64.505814,1497112,13.65,143.600027,13.64037,11,30078,download 44 | 1497,64.505814,1497112,12.82,201.985712,12.806766,9,30078,download 45 | 1497,64.505814,1497112,9.81,146.861876,9.800159,8,30078,download 46 | 1497,64.505814,1497112,1.75,9.851606,1.749569,13,15870,download 47 | 1501,121.041315,1501456,13.4,90.606818,13.387442,19,15614,download 48 | 1497,64.505814,1497112,15.56,78.844509,15.547135,5,30078,download 49 | 1497,64.505814,1497112,1.83,12.035095,1.826839,12,15614,download 50 | 1495,78.898669,1495672,10.55,197.035875,10.539417,6,30077,download 51 | 1498,79.151753,1498560,14.04,90.741846,14.030305,28,15870,download 52 | 1495,78.898669,1495672,26.79,120.031163,26.762196,3,30077,download 53 | 1349,304.855704,1349765,3.4,17.181276,3.398915,335,30015,download 54 | 1339,329.080537,1339545,3.63,23.71905,3.630042,318,30015,download 55 | 1349,323.596972,1349481,3.57,22.584956,3.565154,314,30015,download 56 | 1346,336.723923,1346561,3.38,18.54817,3.37802,321,30015,download 57 | 1409,258.644544,1409625,3.49,17.605348,3.482752,239,30015,download 58 | 1372,302.172136,1372841,3.36,17.921851,3.358954,265,30015,download 59 | 1367,317.628714,1367285,3.34,18.362399,3.339075,280,30015,download 60 | 1345,325.582555,1345385,3.65,23.145828,3.643572,329,30015,download 61 | 1497,64.505814,1497112,2.12,14.47037,2.120152,6,30206,download 62 | 1497,64.505814,1497112,2.1,14.352669,2.095074,6,30206,download 63 | 1494,127.17311,1494477,7.67,51.079817,7.661312,110,32866,download 64 | 1406,274.326448,1406113,17.29,334.519436,17.269755,247,30015,download 65 | 1444,221.734075,1444078,12.53,153.311849,12.518223,216,30015,download 66 | 1353,324.094122,1353577,3.58,18.347561,3.577944,304,30015,download 67 | 1340,321.445174,1340721,3.37,18.057175,3.366767,347,30015,download 68 | 1335,354.335999,1335165,3.36,16.137714,3.354972,326,30015,download 69 | 1364,298.392359,1364334,6.17,69.205024,6.166573,288,30015,download 70 | 1353,314.885694,1353293,3.37,16.818087,3.367506,324,30015,download 71 | 1352,318.576521,1352685,3.38,19.363709,3.3809,307,30015,download 72 | 1334,347.263589,1334881,3.63,22.286967,3.627682,342,30015,download 73 | 1496,59.941638,1496416,4.72,15.042331,4.71886,7,66501,download 74 | 1496,61.927377,1496416,2.03,10.085781,2.031966,5,66501,download 75 | 1496,59.941638,1496416,2.94,10.562565,2.936055,7,66501,download 76 | 1497,64.505814,1497112,1.04,1.217992,1.041424,20,30046,download 77 | 1498,45.508241,1498560,7.06,163.914491,7.057065,1,14591,download 78 | 1498,45.508241,1498560,0.65,0.552034,0.645153,7,14591,download 79 | 1498,45.508241,1498560,0.84,2.236537,0.837878,8,14591,download 80 | 1485,134.309344,1485844,20.72,408.685682,20.70117,108,34250,download 81 | 1482,145.512886,1482720,15.88,233.181987,15.868866,127,35020,download 82 | 1491,107.582526,1491167,6.6,33.935473,6.594266,126,31082,download 83 | 1484,136.326813,1484491,6.31,32.617606,6.301334,124,31082,download 84 | 1409,243.569292,1409577,11,53.608716,10.993988,191,30241,download 85 | 1490,93.220169,1490624,7.49,29.573041,7.485322,5,66501,download 86 | 1494,83.324666,1494460,2.15,14.041235,2.148821,20,15614,download 87 | 1497,87.8123,1497180,6.12,28.284928,6.114954,21,32219,download 88 | 1494,84.059503,1494755,1.52,7.589286,1.519441,30,20470,download 89 | 1487,107.484883,1487628,7.75,30.0687,7.744,21,65103,download 90 | 1497,64.505814,1497112,2.36,17.434551,2.360933,10,15614,download 91 | 1497,64.505814,1497112,1.49,7.023166,1.489847,21,15870,download 92 | 1240,431.420908,1240265,33.45,91.077643,33.421052,428,30155,download 93 | 1243,435.022988,1243185,46.25,286.171425,46.205395,463,30185,download 94 | 1270,402.140523,1270925,25.23,66.857008,25.205373,403,30280,download 95 | 1258,413.64961,1258961,30.79,71.822813,30.754865,421,30340,download 96 | 1219,444.59982,1219541,39.04,85.84582,38.999726,449,30364,download 97 | 1227,435.201103,1227125,43.34,145.655499,43.299839,445,30238,download 98 | 1497,64.505814,1497112,1.53,6.260817,1.532068,14,16254,download 99 | 1275,388.461066,1275305,29.63,124.881912,29.596964,410,30149,download 100 | 1276,387.749919,1276481,24.12,66.567913,24.094718,411,30007,download 101 | 1317,334.732729,1317895,15.96,71.115951,15.944007,367,30270,download 102 | 1225,437.91095,1225665,41.21,107.562762,41.164166,446,29970,download 103 | 1242,427.20721,1242617,32.25,72.0488,32.215167,430,30616,download 104 | 1260,410.524055,1260705,29.68,74.256089,29.654402,426,30532,download 105 | 1235,432.758593,1235601,32.3,93.070741,32.263887,429,30574,download 106 | 1258,407.791613,1258961,27.24,68.843611,27.215955,436,29919,download 107 | 1256,408.582917,1256325,25.44,64.923661,25.419247,426,30007,download 108 | 1303,348.132159,1303653,15.31,54.60482,15.296668,375,30051,download 109 | 1317,335.886886,1317645,13.99,52.579612,13.972174,376,30095,download 110 | 1310,339.576206,1310345,12.1,40.369156,12.089499,376,30314,download 111 | 1497,64.505814,1497112,18.4,522.288699,18.376781,6,15550,download 112 | 1376,282.895741,1376918,6.42,34.567938,6.411934,290,30015,download 113 | 1352,313.068683,1352666,5.46,32.318419,5.458666,335,30015,download 114 | 1355,290.654434,1355586,8.83,44.667751,8.817161,328,30015,download 115 | 1361,299.360986,1361142,3.02,13.160687,3.018838,316,30015,download 116 | 1365,279.427987,1365522,3.43,15.266183,3.424326,306,30015,download 117 | 1390,254.621287,1390626,4.03,20.263612,4.025568,260,30015,download 118 | 1371,290.394559,1371078,8.68,183.19181,8.673066,321,30015,download 119 | 1368,308.204478,1368482,3.61,19.650334,3.610635,328,30015,download 120 | 1346,313.2906,1346826,5.99,34.086814,5.980685,335,30015,download 121 | 1368,294.562387,1368442,10.83,58.880043,10.815061,304,30015,download 122 | 1355,294.625186,1355302,9.55,47.496042,9.538086,329,30015,download 123 | 1492,100.846418,1492858,6.72,29.763177,6.71468,128,31294,download 124 | 1492,100.846418,1492858,11.14,47.290346,11.132655,120,30945,download 125 | 1503,171.449701,1503078,7.95,51.942199,7.944366,121,31313,download 126 | 1492,100.846418,1492858,8.78,59.069102,8.776075,104,31592,download 127 | 1397,354.235797,1397114,35.08,922.638969,35.049826,69,64240,download 128 | 1471,171.944759,1471552,7.09,134.282527,7.083542,69,40708,download 129 | 1469,157.047763,1469030,11.39,304.256073,11.375561,72,65352,download 130 | 1387,253.576418,1387441,3.48,16.091747,3.480679,267,30015,download 131 | 1365,302.930685,1365257,3.47,16.31072,3.468434,344,30015,download 132 | 1379,253.531063,1379857,4.34,30.591109,4.339608,282,30015,download 133 | 1394,233.899551,1394381,4.82,36.755485,4.817061,291,29936,download 134 | 1429,216.476327,1429705,8.3,46.695646,8.291302,191,30015,download 135 | 1449,163.153302,1449981,7.66,43.718377,7.654799,154,30159,download 136 | 1493,95.676538,1493051,1.27,5.608993,1.264897,65,33149,download 137 | 1493,94.138196,1493465,2.5,42.388235,2.497865,31,32811,download 138 | 1493,94.138196,1493465,2.55,47.041877,2.551207,26,32274,download 139 | 1491,106.131993,1491591,1.47,9.16176,1.468478,47,32295,download 140 | 1491,106.131993,1491591,1.24,4.228249,1.242677,65,32872,download 141 | 1490,113.758516,1490131,6.33,27.997491,6.327568,270,33122,download 142 | 1493,94.138196,1493465,1.09,1.858695,1.087619,31,32989,download 143 | 1493,94.138196,1493465,1.13,2.476977,1.129309,29,32542,download 144 | 1493,94.138196,1493465,1.13,2.426022,1.124311,29,32628,download 145 | 1478,158.347719,1478865,1.54,7.888264,1.542636,30,32432,download 146 | 1487,123.052834,1487625,1.45,2.009913,1.444097,28,32811,download 147 | 1494,104.938077,1494925,2.62,43.254379,2.614185,29,32015,download 148 | 1494,82.146211,1494925,1.04,1.192654,1.043079,30,32906,download 149 | 1493,94.138196,1493465,1.11,2.094416,1.103926,29,33129,download 150 | 1494,82.146211,1494925,1.06,1.510592,1.057499,29,32345,download 151 | 1493,94.138196,1493465,1.13,2.702187,1.12809,25,31737,download 152 | 1494,82.146211,1494925,1.03,1.096119,1.030437,29,31308,download 153 | 1494,82.146211,1494925,1.06,1.569319,1.059378,32,32628,download 154 | 1494,82.146211,1494925,1.05,1.237533,1.048033,29,32628,download 155 | 1494,82.146211,1494925,1.04,1.176038,1.040726,31,31793,download 156 | 1494,82.146211,1494925,1.07,1.635688,1.067277,31,32628,download 157 | 1492,102.68885,1492005,1.32,7.772959,1.319786,28,31308,download 158 | 1494,82.146211,1494925,1.04,1.463955,1.038178,33,32349,download 159 | 1491,106.131993,1491591,2.68,36.005407,2.679541,62,32594,download 160 | 1479,148.83548,1479911,6.69,31.381093,6.687349,275,33122,download 161 | 1493,94.138196,1493465,2.29,37.993387,2.285769,29,32711,download 162 | 1492,101.975487,1492218,2.76,53.088214,2.754708,28,32934,download 163 | 1492,102.68885,1492005,1.11,2.139815,1.109848,27,31964,download 164 | 1478,160.433787,1478451,6.8,34.771483,6.789516,271,32027,download 165 | 1490,109.859001,1490685,2.29,30.578043,2.287092,71,32804,download 166 | 1487,116.828935,1487694,4.58,72.865457,4.577261,44,32542,download 167 | 1493,94.270886,1493300,7.56,205.217344,7.552699,27,32649,download 168 | 1491,106.131993,1491591,2.29,33.034379,2.292182,54,32340,download 169 | 1493,94.138196,1493465,2.39,41.879571,2.384607,24,32628,download 170 | 1492,102.68885,1492005,2.86,51.760892,2.855866,33,32962,download 171 | 1493,94.138196,1493465,1.08,1.746066,1.076941,29,32542,download 172 | 1493,94.138196,1493465,1.08,1.738683,1.08178,27,32015,download 173 | 1491,106.131993,1491591,2.61,39.943757,2.605132,74,31602,download 174 | 1491,106.442473,1491324,2.56,34.480821,2.561623,73,32260,download 175 | 1493,94.138196,1493465,1.14,2.643324,1.14342,25,31695,download 176 | 1493,94.138196,1493465,1.1,1.958521,1.096509,26,32274,download 177 | 1493,94.138196,1493465,1.07,1.643684,1.064366,27,32488,download 178 | 1493,94.138196,1493465,1.09,1.902546,1.0906,30,32516,download 179 | 1494,82.146211,1494925,1.06,1.604736,1.054815,33,32572,download 180 | 1493,94.678403,1493139,2.53,46.43732,2.531649,23,32542,download 181 | 1493,94.138196,1493465,2.31,38.996246,2.307715,24,31459,download 182 | 1493,94.138196,1493465,1.07,1.729928,1.073342,29,32005,download 183 | 1493,94.138196,1493465,1.13,2.405453,1.127494,31,32015,download 184 | 1494,82.146211,1494925,1.03,1.127384,1.032542,24,32143,download 185 | 1494,82.987951,1494599,1.04,1.412834,1.035321,13,32107,download 186 | 1493,94.688965,1493151,2.13,32.410407,2.128081,13,32361,download 187 | 1494,82.987951,1494599,1.07,2.117649,1.067001,12,32234,download 188 | 1494,82.987951,1494599,1.03,1.294592,1.02585,16,32488,download 189 | 1494,82.987951,1494599,2.53,15.582145,2.528132,12,32361,download 190 | 1494,82.987951,1494599,2.47,15.406475,2.468976,12,32488,download 191 | 1494,82.987951,1494599,2.46,15.211052,2.459156,11,32488,download 192 | 1489,117.749735,1489294,2.48,44.456443,2.479821,12,32488,download 193 | 1493,94.688965,1493151,4.07,93.902124,4.066539,13,32488,download 194 | 1494,82.987951,1494599,1.06,1.917338,1.056998,14,32361,download 195 | 1494,82.987951,1494599,1.08,2.239855,1.076038,13,32234,download 196 | 1496,131.848398,1496047,1.11,2.359666,1.10936,11,32107,download 197 | 1494,82.987951,1494599,1.03,1.555012,1.033198,13,32361,download 198 | 1494,82.987951,1494599,1.07,1.984666,1.071095,16,32361,download 199 | 1494,82.987951,1494599,1.05,1.358848,1.050384,15,32488,download 200 | 1493,94.688965,1493151,2.6,32.476099,2.593668,15,32361,download 201 | 1494,82.987951,1494599,1.08,2.114386,1.075734,12,32488,download 202 | 1494,82.987951,1494599,1.04,0.807713,1.040095,13,32361,download 203 | 1494,82.987951,1494599,1.03,0.714549,1.027412,11,32234,download 204 | 1494,82.987951,1494599,1.07,1.960866,1.068482,15,32361,download 205 | 1493,94.138196,1493465,1.09,1.962322,1.085386,25,31737,download 206 | 1493,94.138196,1493465,1.1,2.297179,1.099173,28,31755,download 207 | 1493,94.138196,1493465,1.11,2.063588,1.108228,26,31725,download 208 | 1492,103.778611,1492055,1.06,1.679203,1.062876,49,32597,download 209 | 1492,100.632997,1492715,1.03,1.079559,1.027214,49,32570,download 210 | 1492,101.024749,1492550,1.24,6.527712,1.240418,67,32955,download 211 | 1452,191.261601,1452872,13.1,59.911152,13.08506,149,32117,download 212 | 1457,189.98421,1457835,4.46,21.176604,4.45663,158,31392,download 213 | 1454,183.893991,1454940,10.06,44.913916,10.052061,142,32117,download 214 | 1452,184.488482,1452710,10.07,47.367086,10.060319,180,31831,download 215 | 1482,123.588025,1482653,14.97,68.498764,14.950398,157,31576,download 216 | 1468,152.636824,1468335,9.33,41.263348,9.319966,160,31140,download 217 | 1465,171.717792,1465413,7.38,34.3519,7.371903,169,31208,download 218 | 1474,155.122532,1474009,5.29,27.582522,5.28931,157,31208,download 219 | 1475,144.858552,1475633,23.97,98.655042,23.94342,147,31392,download 220 | 1460,187.624625,1460992,18.19,71.32733,18.16926,174,32117,download 221 | 1492,102.60117,1492220,1.07,2.286963,1.071954,49,32540,download 222 | 1492,100.508706,1492880,1.03,0.490297,1.024497,39,32972,download 223 | 1492,100.508706,1492880,1.03,0.587631,1.028375,37,32941,download 224 | 1487,132.623527,1487001,1.07,1.697751,1.069537,42,32495,download 225 | 1489,118.004237,1489965,1.03,0.5956,1.02945,39,32425,download 226 | 1492,100.508706,1492880,1.36,7.023717,1.360546,80,32941,download 227 | 1491,105.806427,1491395,1.06,1.626176,1.061835,48,34022,download 228 | 1491,106.315568,1491395,1.06,1.610872,1.056009,51,32941,download 229 | 1439,214.758003,1439693,7.75,46.717745,7.741227,231,30015,download 230 | 1439,207.282416,1439977,7.93,42.286674,7.922184,165,30015,download 231 | 1351,313.996815,1351201,6.64,36.444602,6.630371,390,30015,download 232 | 1323,361.095555,1323177,7.81,74.939808,7.800651,377,30015,download 233 | 1386,248.901587,1386513,3.38,16.858744,3.378879,282,30658,download 234 | 1498,45.508241,1498560,1.05,1.687868,1.044356,6,14591,download 235 | 1498,45.508241,1498560,1.05,1.666458,1.052415,7,14591,download 236 | 1498,45.508241,1498560,1.05,1.583136,1.051055,7,14591,download 237 | 1498,45.508241,1498560,1.02,1.140703,1.015094,7,14591,download 238 | 1498,45.508241,1498560,1.04,1.451395,1.039655,6,14591,download 239 | 1498,45.508241,1498560,1.06,1.643857,1.056432,6,14591,download 240 | 1498,45.508241,1498560,1.02,0.968121,1.0143,6,14591,download 241 | 1498,45.508241,1498560,1.42,1.954884,1.421362,0,14591,download 242 | 1498,45.508241,1498560,1.04,1.557181,1.043233,6,14591,download 243 | 1498,45.508241,1498560,1.1,2.559783,1.095765,6,14591,download 244 | 1498,45.508241,1498560,1.07,1.891264,1.068642,7,14591,download 245 | 1498,45.508241,1498560,1.03,1.148869,1.025506,8,14591,download 246 | 1498,45.508241,1498560,1.25,3.479148,1.253654,9,14591,download 247 | 1498,45.508241,1498560,1.15,4.760765,1.152475,7,14591,download 248 | 1498,45.508241,1498560,1.03,1.099324,1.029717,6,14591,download 249 | 1498,45.508241,1498560,1.09,1.374182,1.09037,13,14591,download 250 | 1498,45.508241,1498560,1.92,28.053481,1.919954,0,14591,download 251 | 1483,112.414412,1483067,1.7,16.411095,1.700286,70,65352,download 252 | 1419,229.253135,1419229,9.68,47.483396,9.671814,183,30015,download 253 | 1420,234.316026,1420973,9.4,47.616605,9.395337,177,30015,download 254 | 1491,105.688221,1491560,1.03,1.207177,1.030707,51,33596,download 255 | 1362,270.545745,1362945,3.62,18.013051,3.61556,315,30532,download 256 | 1432,233.893138,1432961,8.54,89.477567,8.530965,179,30015,download 257 | 1405,212.708721,1405245,4.14,22.417059,4.140598,255,30015,download 258 | 1377,278.713114,1377505,4.08,32.122923,4.075862,317,30015,download 259 | 1380,259.919218,1380425,3.63,22.396551,3.6312,283,29970,download 260 | 1381,324.365535,1381866,5.75,29.673321,5.743234,532,30015,download 261 | 1492,82.764727,1492777,1.13,3.153927,1.125994,258,1013,multimedia 262 | 1497,43.416587,1497422,1.2,2.355144,1.197123,263,1443,multimedia 263 | 1499,3.605551,1499887,1.16,1.806755,1.162264,343,1713,multimedia 264 | 1499,21.886069,1499082,1.07,1.359235,1.06756,435,2173,multimedia 265 | 1499,26.286879,1499168,1.01,0.716641,1.010336,416,2590,multimedia 266 | 1497,43.02325,1497343,1.01,0.818255,1.013378,427,2994,multimedia 267 | 1495,63.071388,1495598,1.18,5.307479,1.17751,15,688,multimedia 268 | 1499,64.776539,1499955,1.47,4.879571,1.46583,8,925,multimedia 269 | 1498,45.760245,1498552,1.31,6.858506,1.303902,2,1320,multimedia 270 | 1498,45.760245,1498552,3.14,9.357512,3.134687,2,1320,multimedia 271 | 1492,92.714616,1492341,1.35,6.379525,1.349509,264,1189,multimedia 272 | 1271,515.521096,1271196,13.95,65.696436,13.934555,289,3694,multimedia 273 | 1495,76.902536,1495158,3.26,45.271873,3.257591,385,3815,multimedia 274 | 1439,215.891176,1439569,1.9,8.850682,1.897009,216,30015,multimedia 275 | 1441,211.165812,1441137,6.08,84.447977,6.070486,252,30015,multimedia 276 | 1371,293.40927,1371873,2.19,17.960592,2.184532,390,30015,multimedia 277 | 1395,278.478006,1395653,2.24,17.294851,2.234914,408,30015,multimedia 278 | 1495,72.876608,1495558,1.39,11.82425,1.387492,4,30015,multimedia 279 | 1495,73.790243,1495376,1.37,10.364494,1.367851,4,30015,multimedia 280 | 1493,80.262071,1493997,1.03,1.00534,1.027527,10,30015,multimedia 281 | 1403,273.150142,1403305,6.34,33.679481,6.335821,218,30015,multimedia 282 | 1412,237.004219,1412065,6.9,42.227913,6.888412,246,30015,multimedia 283 | 1399,247.376232,1399209,6.71,34.283239,6.708007,229,30015,multimedia 284 | 1394,274.472221,1394543,6.56,34.720606,6.552577,238,30015,multimedia 285 | 1377,281.827962,1377972,2.36,10.332324,2.3596,280,30015,multimedia 286 | 1390,269.862928,1390828,5.29,103.093592,5.289134,244,30015,multimedia 287 | 1415,262.705158,1415935,6.15,37.666621,6.146826,173,30015,multimedia 288 | 1388,243.092575,1388488,2.99,25.092675,2.990609,279,30015,multimedia 289 | 1370,308.074666,1370678,6.19,93.121165,6.184366,278,30015,multimedia 290 | 1385,254.795997,1385274,2.3,11.858571,2.299174,285,30015,multimedia 291 | 1434,197.982322,1434040,4.32,25.546954,4.312421,170,30015,multimedia 292 | 1381,307.959413,1381290,7.01,77.605009,7.000909,253,30015,multimedia 293 | 1377,264.622372,1377448,2.35,13.048926,2.351516,320,30015,multimedia 294 | 1404,258.974902,1404252,2.39,11.993028,2.387223,240,30015,multimedia 295 | 1416,238.43238,1416887,5.41,32.964591,5.401749,211,30015,multimedia 296 | 1394,225.6125,1394032,2.11,10.871731,2.105444,275,30015,multimedia 297 | 1410,252.013889,1410420,7.4,81.263331,7.388736,210,30015,multimedia 298 | 1371,289.376917,1371825,2.34,10.348273,2.338404,311,30015,multimedia 299 | 1408,253.605994,1408636,6.11,61.749109,6.101261,222,30015,multimedia 300 | 1399,277.227344,1399876,6.88,70.694146,6.870307,249,30015,multimedia 301 | 1376,271.863937,1376272,2.38,11.088761,2.376906,288,30015,multimedia 302 | 1418,253.998031,1418288,5.64,33.694784,5.634145,173,30015,multimedia 303 | 1386,256.193286,1386732,2.36,10.66418,2.361656,297,30015,multimedia 304 | 1493,87.281155,1493997,1.03,1.181474,1.026208,14,30015,multimedia 305 | 1491,93.962759,1491077,1.06,1.785096,1.060917,13,31369,multimedia 306 | 1495,73.491496,1495619,1.26,6.655429,1.256727,25,15550,multimedia 307 | 1495,73.525506,1495618,1.08,1.66059,1.074649,29,15550,multimedia 308 | 1500,0,1500000,1.02,0.587097,1.014335,7,520,multimedia 309 | 1497,57.887823,1497059,1.22,4.82433,1.216467,8,553,multimedia 310 | 1366,328.683739,1366009,6.81,53.262513,6.799303,246,30015,multimedia 311 | 1418,238.939323,1418605,4.67,62.440595,4.663947,194,30015,multimedia 312 | 1413,256.937736,1413674,5.97,50.210885,5.968278,173,30015,multimedia 313 | 1492,84.888162,1492919,1.1,2.235319,1.093916,10,30015,multimedia 314 | 1494,100.294566,1494281,1.09,2.417711,1.091144,11,30015,multimedia 315 | 1490,91.940198,1490738,1.14,3.801498,1.140696,19,30015,multimedia 316 | 1494,83.420621,1494281,1.44,13.430459,1.44063,30,30015,multimedia 317 | 1490,98.70157,1490793,1.75,17.879204,1.750342,21,30015,multimedia 318 | 1491,91.471307,1491117,1.63,19.392055,1.626311,16,30015,multimedia 319 | 1494,133.082681,1494090,1.36,10.692689,1.355,19,30015,multimedia 320 | 1495,73.409809,1495274,1.17,2.742526,1.165823,4,30015,multimedia 321 | 1495,73.857972,1495173,1.35,8.640052,1.353239,5,30015,multimedia 322 | 1494,83.192548,1494281,1.71,21.632654,1.711173,8,30015,multimedia 323 | 1412,242.925915,1412713,5.99,33.607124,5.984702,207,30015,multimedia 324 | 1494,81.79242,1494128,1.14,4.291463,1.142688,10,30015,multimedia 325 | 1493,83.952367,1493997,1.63,17.384045,1.632028,22,30015,multimedia 326 | 1495,72.332565,1495457,4.22,69.884177,4.21735,4,30015,multimedia 327 | 1441,221.406865,1441857,3.11,49.976484,3.107638,126,30015,multimedia 328 | 1492,89.783072,1492253,1.07,1.859651,1.065344,21,30015,multimedia 329 | 1385,271.563989,1385981,1.68,9.226274,1.679329,244,30564,multimedia 330 | 1386,252.130918,1386265,1.54,6.563954,1.543279,289,30224,multimedia 331 | 1340,346.724675,1340417,14.21,54.203982,14.195789,303,30553,multimedia 332 | 1416,219.940901,1416925,1.41,3.888611,1.407084,215,30868,multimedia 333 | 1378,290.785144,1378965,1.5,4.986901,1.500727,257,30868,multimedia 334 | 1310,343.47489,1310312,20.85,64.129036,20.826634,402,30104,multimedia 335 | 1385,246.679955,1385643,6.24,28.300261,6.238239,276,30185,multimedia 336 | 1391,237.953777,1391538,6.44,34.177877,6.431803,271,30261,multimedia 337 | 1389,249.495491,1389152,7.59,39.536441,7.580401,267,30191,multimedia 338 | 1393,238.266657,1393250,6.45,31.607998,6.446288,268,29834,multimedia 339 | 1367,302.220118,1367537,5.38,28.100064,5.376338,292,30015,multimedia 340 | 1367,262.137369,1367861,7.43,32.859041,7.426304,309,30015,multimedia 341 | 1404,240.054161,1404929,5.52,25.305437,5.517661,219,30015,multimedia 342 | 1367,267.243335,1367249,4.17,19.047989,4.16628,311,30016,multimedia 343 | 1402,268.333747,1402577,5.46,27.953045,5.455989,249,30015,multimedia 344 | 1500,0,1500000,1.08,1.705196,1.080347,7,1238,multimedia 345 | 1500,0,1500000,1.07,1.3222,1.072345,18,1006,multimedia 346 | 1493,87.658428,1493533,1.12,1.872725,1.120476,17,129983,multimedia 347 | 1491,100.781943,1491384,1.08,1.443475,1.077547,20,129983,multimedia 348 | 1494,84.492603,1494224,1.08,1.953515,1.076772,15,129983,multimedia 349 | 1489,114.162165,1489995,1.09,1.326303,1.092562,18,129983,multimedia 350 | 1496,71.895758,1496105,1.32,5.695249,1.319611,18,30046,multimedia 351 | 1497,64.505814,1497112,1.06,1.196824,1.061148,20,30078,multimedia 352 | 1498,73.803794,1498505,1.04,1.52402,1.037414,19,1007,multimedia 353 | 1498,45.760245,1498552,9.79,263.282381,9.781477,7,973,multimedia 354 | 1490,108.355895,1490699,2.02,18.616019,2.021396,32,32934,multimedia 355 | 1490,110.158976,1490903,2.49,28.463946,2.484656,42,32923,multimedia 356 | 1493,85.428333,1493589,1.02,1.218743,1.022424,5,30015,multimedia 357 | 1495,71.658914,1495418,1.39,3.444197,1.387538,4,30015,multimedia 358 | 1495,73.095828,1495298,1.72,4.420269,1.717298,4,30015,multimedia 359 | 1496,56.780278,1496758,1.1,2.112313,1.100355,4,30015,multimedia 360 | 1495,71.658914,1495418,1.22,2.235784,1.214787,4,30015,multimedia 361 | 1495,74.23611,1495212,1.08,1.415336,1.074007,4,30015,multimedia 362 | 1495,71.658914,1495418,1.17,1.602487,1.170019,4,30015,multimedia 363 | 1493,87.749644,1493469,3.01,6.503391,3.007699,6,30015,multimedia 364 | 1495,74.23611,1495212,1.91,2.47945,1.904696,4,30015,multimedia 365 | 1495,72.415468,1495353,2.37,8.476035,2.369055,5,30015,multimedia 366 | 1495,73.184698,1495741,1.42,2.174551,1.421398,4,30015,multimedia 367 | 1498,39.255573,1498256,1.63,2.128293,1.629941,5,30016,multimedia 368 | 1481,148.040535,1481654,21.68,100.475386,21.662332,254,32714,multimedia 369 | 1475,170.789344,1475880,6.06,49.772151,6.057753,342,33575,multimedia 370 | 1487,119.979165,1487867,26.02,87.560361,25.991124,332,34554,multimedia 371 | 1482,146.106126,1482234,10.82,73.196113,10.808546,481,33136,multimedia 372 | 1475,173.346474,1475764,5.74,23.896797,5.733882,271,33324,multimedia 373 | 1479,161.694156,1479182,6.89,38.033633,6.888043,240,33502,multimedia 374 | 1480,154.502427,1480519,11.12,72.662593,11.104246,525,32892,multimedia 375 | 1478,161.254457,1478340,4.61,22.58708,4.605928,410,33156,multimedia 376 | 1478,166.024095,1478051,4.8,20.676119,4.791315,482,33105,multimedia 377 | 1496,54.836119,1496883,1.17,1.84903,1.171683,4,30015,multimedia 378 | 1495,71.056316,1495707,1.03,1.246175,1.033447,3,30015,multimedia 379 | 1494,83.402638,1494321,1.09,1.331197,1.088043,4,30015,multimedia 380 | 1494,76.393717,1494815,1.04,1.502132,1.037193,4,30015,multimedia 381 | 1493,84.599054,1493993,1.07,1.633712,1.071484,5,30015,multimedia 382 | 1495,71.056316,1495707,1.06,1.478116,1.054515,3,30015,multimedia 383 | 1495,71.603073,1495423,1.25,1.837383,1.252678,4,30015,multimedia 384 | 1495,71.603073,1495423,1.13,1.566578,1.132377,4,30015,multimedia 385 | 1495,71.246053,1495537,1.06,1.897163,1.063292,4,30015,multimedia 386 | 1494,76.170861,1494361,1.2,1.735736,1.197244,7,30015,multimedia 387 | 1495,71.056316,1495707,1.05,1.272715,1.046324,3,30015,multimedia 388 | 1495,71.056316,1495707,1.04,1.597571,1.034899,3,30015,multimedia 389 | 1495,71.056316,1495707,1.26,4.329797,1.25847,3,30015,multimedia 390 | 1495,71.603073,1495423,1.1,1.474395,1.103746,4,30015,multimedia 391 | 1495,71.603073,1495423,1.49,12.253225,1.489704,4,30015,multimedia 392 | 1495,71.056316,1495707,1.1,1.86129,1.099353,3,30015,multimedia 393 | 1494,78,1494685,1.11,1.668015,1.10794,4,30015,multimedia 394 | 1494,74.746237,1494969,1.09,2.122404,1.093342,4,30015,multimedia 395 | 1493,81.473922,1493185,1.22,2.058595,1.222905,9,30015,multimedia 396 | 1495,71.603073,1495423,1.08,1.40451,1.07541,4,30015,multimedia 397 | 1495,71.056316,1495707,1.09,1.440547,1.087296,3,30015,multimedia 398 | 1495,71.603073,1495423,1.13,2.199093,1.129739,4,30015,multimedia 399 | 1495,71.105555,1495617,1.16,4.046448,1.160764,4,30015,multimedia 400 | 1495,71.056316,1495707,1.19,3.776663,1.184464,3,30015,multimedia 401 | 1495,71.603073,1495423,1.45,3.474218,1.446343,4,30015,multimedia 402 | 1495,71.603073,1495423,1.07,1.674709,1.071221,4,30015,multimedia 403 | 1495,71.056316,1495707,1.27,2.191704,1.273069,3,30015,multimedia 404 | 1495,71.056316,1495707,1.16,1.970656,1.161644,3,30015,multimedia 405 | 1495,71.603073,1495423,2.02,10.991621,2.020092,4,30015,multimedia 406 | 1495,71.603073,1495423,1.14,1.842939,1.141315,4,30015,multimedia 407 | 1493,84.36824,1493913,1.08,2.16287,1.08264,5,30015,multimedia 408 | 1495,71.603073,1495423,1.24,2.287755,1.234503,4,30015,multimedia 409 | 1495,71.603073,1495423,1.12,1.886087,1.11816,4,30015,multimedia 410 | 1495,71.644958,1495419,1.25,2.408613,1.243951,4,30015,multimedia 411 | 1493,84.752581,1493469,1.16,2.199566,1.155535,7,30015,multimedia 412 | 1495,71.098523,1495703,1.08,1.783855,1.081036,3,30015,multimedia 413 | 1495,72.477583,1495253,1.08,1.622598,1.078423,4,30015,multimedia 414 | 1493,86.145226,1493185,1.2,1.607652,1.195677,7,30015,multimedia 415 | 1495,71.098523,1495703,1.63,17.965574,1.630511,3,30015,multimedia 416 | 1493,84.752581,1493469,1.51,10.539133,1.506932,7,30015,multimedia 417 | 1496,66.332496,1496516,1.76,5.591617,1.76012,2,30015,multimedia 418 | 1494,74.074287,1494765,1.23,1.933487,1.230471,5,30015,multimedia 419 | 1495,71.098523,1495703,1.07,1.541751,1.069665,3,30015,multimedia 420 | 1494,75.571159,1494889,1.06,1.625669,1.057327,4,30015,multimedia 421 | 1495,71.644958,1495419,1.1,1.702295,1.099315,4,30015,multimedia 422 | 1495,71.644958,1495419,1.23,1.805252,1.231763,4,30015,multimedia 423 | 1495,71.644958,1495419,1.09,1.520986,1.087183,4,30015,multimedia 424 | 1495,71.644958,1495419,1.08,1.448742,1.083562,4,30015,multimedia 425 | 1491,96.353516,1491514,4.32,48.195777,4.315242,39,38247,multimedia 426 | 1488,123.024388,1488281,3.11,26.667146,3.110412,35,35059,multimedia 427 | 1497,57.827329,1497001,4.14,31.294114,4.138528,27,40498,multimedia 428 | 1497,54.881691,1497568,4.35,33.523635,4.348532,50,40110,multimedia 429 | 1467,199.183333,1467878,56.77,432.761807,56.714458,70,40313,multimedia 430 | 1483,144.010416,1483488,19.27,137.868767,19.249775,68,35084,multimedia 431 | 1483,142.982516,1483159,2.79,22.283189,2.787187,37,39933,multimedia 432 | 1491,100.84146,1491034,3.44,32.309249,3.434045,36,40522,multimedia 433 | 1491,95.535334,1491455,3.05,31.674388,3.046755,32,39495,multimedia 434 | 1489,103.92786,1489788,3.69,35.469919,3.682514,41,40004,multimedia 435 | 1494,75.432089,1494855,4.13,57.143487,4.126955,33,38292,multimedia 436 | 1497,47.602521,1497484,3.21,10.107311,3.211496,33,39533,multimedia 437 | 1481,152.787434,1481441,9.15,91.14243,9.145636,9,41673,multimedia 438 | 1486,131.167831,1486081,2.19,11.346707,2.186142,8,45423,multimedia 439 | 1492,99.141313,1492369,2.44,20.651338,2.440219,24,31227,multimedia 440 | 1492,103.126136,1492050,2.98,42.22377,2.978582,19,31291,multimedia 441 | 1494,103.547091,1494929,8.87,230.018269,8.864883,23,31227,multimedia 442 | 1492,98.239503,1492033,3.23,25.238771,3.230145,29,31195,multimedia 443 | 1490,107.275347,1490585,3.72,41.360723,3.717357,36,31163,multimedia 444 | 1493,113.044239,1493489,1.83,18.718584,1.830932,21,31097,multimedia 445 | 1489,109.836242,1489137,5.67,32.144605,5.667834,57,31227,multimedia 446 | 1493,87.275426,1493997,1.34,9.797804,1.343188,8,29999,multimedia 447 | 1441,215.99537,1441846,6.88,37.7068,6.870824,169,35031,multimedia 448 | 1492,88.430764,1492821,1.88,25.50569,1.874618,17,30241,multimedia 449 | 1488,119.549153,1488770,6.87,33.83472,6.86436,6,30262,multimedia 450 | 1479,168.718701,1479442,8.58,36.343231,8.575316,8,30055,multimedia 451 | 1492,91.640602,1492866,6.45,67.653044,6.439185,5,30210,multimedia 452 | 1488,129.197523,1488787,5.89,39.337159,5.880916,13,30156,multimedia 453 | 1479,153.642442,1479442,17.52,307.158633,17.506671,20,30314,multimedia 454 | 1486,116.266934,1486742,22.9,562.866734,22.87785,37,30314,multimedia 455 | 1482,137.138616,1482930,18.18,388.178766,18.1628,38,30262,multimedia 456 | 1484,134.777595,1484789,73.22,1556.441149,73.144877,38,16697,multimedia 457 | 1478,148.155324,1478570,8.39,37.536379,8.384159,54,15774,multimedia 458 | 1482,130.6943,1482962,6.82,32.249482,6.808282,44,15646,multimedia 459 | 1484,134.037308,1484795,90.45,1785.681688,90.35878,45,16857,multimedia 460 | 1476,163.257465,1476909,104.01,2016.882342,103.901993,44,16792,multimedia 461 | 1477,152.065775,1477966,8.65,36.978566,8.641191,56,15806,multimedia 462 | 1471,177.3302,1471319,108.3,2029.31222,108.187904,57,16919,multimedia 463 | 1480,146.010274,1480533,8.93,38.630075,8.924049,40,15774,multimedia 464 | 1495,73.641021,1495501,1.06,0.99755,1.057327,10,29885,multimedia 465 | 1493,90.343788,1493149,1.02,0.851743,1.019308,10,29834,multimedia 466 | 1494,78.803553,1494609,6.22,164.07549,6.211511,9,30140,multimedia 467 | 1494,82.419658,1494325,7.96,218.807554,7.954655,8,30210,multimedia 468 | 1491,93.898882,1491837,19.97,597.733451,19.947261,33,31288,multimedia 469 | 1489,100.299551,1489809,1.07,2.256569,1.073174,16,31346,multimedia 470 | 1488,108.115679,1488917,1.09,2.479406,1.092326,43,31259,multimedia 471 | 1488,108.115679,1488917,1.08,2.481935,1.076338,16,31173,multimedia 472 | 1488,108.452755,1488633,1.08,2.229744,1.081224,38,31346,multimedia 473 | 1488,105.744976,1488917,27.35,831.336266,27.318915,20,31173,multimedia 474 | 1494,100.15488,1494757,1.17,3.337089,1.173218,22,30294,multimedia 475 | 1490,98.615415,1490377,1.21,5.958248,1.207303,36,31201,multimedia 476 | 1492,89.638162,1492729,1.3,4.008392,1.296963,7,30294,multimedia 477 | 1488,108.452755,1488633,1.1,2.679042,1.096379,27,31173,multimedia 478 | 1492,90.06109,1492445,16.1,473.011511,16.088273,18,31317,multimedia 479 | 1487,114.847725,1487173,1.1,2.796695,1.103607,15,31144,multimedia 480 | 1489,106.855042,1489809,1.09,2.249687,1.088063,24,31288,multimedia 481 | 1490,101.631688,1490093,1.4,10.685392,1.402185,26,31317,multimedia 482 | 1491,90.906545,1491877,1.12,2.317844,1.118436,13,31346,multimedia 483 | 1492,90.482042,1492161,1.22,3.039263,1.223533,11,31230,multimedia 484 | 1488,108.793382,1488349,1.19,2.659181,1.19137,26,31230,multimedia 485 | 1490,91.716956,1490985,1.13,3.505086,1.132431,15,31346,multimedia 486 | 1490,93.091353,1490377,1.25,7.121406,1.244207,19,31346,multimedia 487 | 1494,84.243694,1494189,1.11,2.112904,1.107379,20,30294,multimedia 488 | 1487,112.294256,1487457,1.09,2.442863,1.092944,45,31346,multimedia 489 | 1490,101.262036,1490377,2.16,36.118031,2.153831,38,31346,multimedia 490 | 1491,96.560862,1491837,1.13,3.628914,1.125603,32,31288,multimedia 491 | 1493,89.207623,1493013,1.08,2.058472,1.080841,28,31317,multimedia 492 | 1491,91.73876,1491269,1.11,3.157134,1.109064,28,30294,multimedia 493 | 1490,96.963911,1490377,1.14,4.139076,1.138598,17,31317,multimedia 494 | 1491,92.043468,1491837,1.67,20.500301,1.666391,37,30294,multimedia 495 | 1491,94.302704,1491553,1.13,2.398533,1.129407,26,30294,multimedia 496 | 1488,108.793382,1488349,1.09,2.308071,1.08903,29,31346,multimedia 497 | 1491,92.455395,1491553,1.35,10.355886,1.34893,17,30294,multimedia 498 | 1489,97.73945,1489809,1.4,12.215559,1.399254,22,31346,multimedia 499 | 1490,97.349884,1490093,1.12,3.357555,1.123059,30,31346,multimedia 500 | 1491,92.455395,1491553,1.09,2.410626,1.088747,27,30294,multimedia 501 | 1488,108.452755,1488633,1.07,2.150171,1.073328,33,30294,multimedia 502 | 1488,106.503521,1488917,1.07,2.030344,1.070909,22,31230,multimedia 503 | 1490,103.73524,1490377,1.21,5.897484,1.209749,15,30294,multimedia 504 | 1490,96.963911,1490377,1.1,2.782497,1.097781,32,30294,multimedia 505 | 1491,93.898882,1491837,1.39,5.75217,1.388624,23,31201,multimedia 506 | 1491,97.339612,1491269,13.91,406.309292,13.896006,24,31201,multimedia 507 | 1492,90.06109,1492445,1.42,12.872594,1.421846,13,31317,multimedia 508 | 1490,98.498731,1490377,1.23,6.840157,1.228564,31,30294,multimedia 509 | 1489,99.889939,1489809,1.96,6.849811,1.957674,27,30294,multimedia 510 | 1488,108.452755,1488633,1.36,10.56042,1.358032,15,30294,multimedia 511 | 1490,98.498731,1490377,1.09,2.58214,1.093087,39,31201,multimedia 512 | 1488,108.452755,1488633,1.11,2.884051,1.112215,30,30322,multimedia 513 | -------------------------------------------------------------------------------- /scripts/v1.0/KNN-classification-2-interface-machine/data.csv: -------------------------------------------------------------------------------- 1 | Avg Packet Size,Std. deviation of packet size,Total Bytes,AVG. IAT(ms),Std. daviation of IAT(ms),Flow duration(SECONDS),Push_flag_cnt,Avg_wind_size,Class 2 | 1426,210.741547873,1426529,10.86,51.682291,10.846116,185,30015,download 3 | 1400,250.792743117,1400886,4.06,22.593781,4.058345,276,30015,download 4 | 1487,143.805424098,1487074,14.71,181.206312,14.692192,123,34252,download 5 | 1420,236.822718505,1420973,10.13,49.875605,10.123397,188,30015,download 6 | 1394,254.972547542,1394665,3.46,16.541209,3.460801,305,30449,download 7 | 1490,108.434311913,1490920,30.89,78.922546,30.855365,32,31078,download 8 | 1487,129.973074135,1487350,10.74,73.107948,10.733989,113,33195,download 9 | 1390,272.814955602,1390626,3.12,13.746667,3.121458,267,30015,download 10 | 1407,239.386716423,1407833,9.97,49.548553,9.962068,214,30015,download 11 | 1342,312.152206463,1342493,5.1,29.318478,5.096614,333,30185,download 12 | 1385,243.993852382,1385697,3.9,21.376979,3.892976,277,30666,download 13 | 1490,110.864782506,1490040,65.91,167.838689,65.840938,199,32063,download 14 | 1477,175.661606505,1477141,9.99,84.661506,9.976475,127,32470,download 15 | 1478,169.676162144,1478605,8.66,46.707235,8.654119,121,32063,download 16 | 1487,127.624449068,1487101,2.04,13.995727,2.034379,241,33926,download 17 | 1488,121.144541767,1488446,2.25,11.673709,2.252602,235,33817,download 18 | 1490,106.023582282,1490938,6.09,24.329,6.082775,213,32063,download 19 | 1492,103.489129864,1492197,1.24,4.284511,1.243682,33,32063,download 20 | 1492,103.489129864,1492197,1.49,10.416141,1.490793,27,32063,download 21 | 1492,103.489129864,1492197,1.29,4.476159,1.285848,25,32063,download 22 | 1480,199.085408807,1480017,5.73,49.442771,5.722929,129,32063,download 23 | 1478,170.06175349,1478557,4.37,27.04507,4.367009,147,32063,download 24 | 1478,169.702681181,1478605,3.46,27.032613,3.460656,116,32470,download 25 | 1477,176.01988524,1477097,7.81,42.118208,7.798086,134,32063,download 26 | 1473,187.611300299,1473730,8.78,44.930425,8.768073,144,33923,download 27 | 1478,169.676162144,1478605,8.72,52.018973,8.70788,132,32470,download 28 | 1478,169.676162144,1478605,11.77,64.743449,11.758874,75,32063,download 29 | 1497,64.5058136915,1497112,5.17,51.486265,5.16653,8,30078,download 30 | 1497,64.5058136915,1497112,1.69,9.622216,1.693,5,30078,download 31 | 1497,64.5058136915,1497112,13.65,143.600027,13.64037,11,30078,download 32 | 1497,64.5058136915,1497112,12.82,201.985712,12.806766,9,30078,download 33 | 1497,64.5058136915,1497112,9.81,146.861876,9.800159,8,30078,download 34 | 1497,64.5058136915,1497112,1.75,9.851606,1.749569,13,15870,download 35 | 1501,121.041315261,1501456,13.4,90.606818,13.387442,19,15614,download 36 | 1497,64.5058136915,1497112,15.56,78.844509,15.547135,5,30078,download 37 | 1497,64.5058136915,1497112,1.83,12.035095,1.826839,12,15614,download 38 | 1495,78.8986691903,1495672,10.55,197.035875,10.539417,6,30077,download 39 | 1498,79.1517529812,1498560,14.04,90.741846,14.030305,28,15870,download 40 | 1495,78.8986691903,1495672,26.79,120.031163,26.762196,3,30077,download 41 | 1349,304.855703571,1349765,3.4,17.181276,3.398915,335,30015,download 42 | 1339,329.080537255,1339545,3.63,23.71905,3.630042,318,30015,download 43 | 1349,323.596971556,1349481,3.57,22.584956,3.565154,314,30015,download 44 | 1346,336.723922524,1346561,3.38,18.54817,3.37802,321,30015,download 45 | 1409,258.644543727,1409625,3.49,17.605348,3.482752,239,30015,download 46 | 1372,302.172136373,1372841,3.36,17.921851,3.358954,265,30015,download 47 | 1367,317.628714067,1367285,3.34,18.362399,3.339075,280,30015,download 48 | 1345,325.582554815,1345385,3.65,23.145828,3.643572,329,30015,download 49 | 1497,64.5058136915,1497112,2.12,14.47037,2.120152,6,30206,download 50 | 1497,64.5058136915,1497112,2.1,14.352669,2.095074,6,30206,download 51 | 1494,127.173110365,1494477,7.67,51.079817,7.661312,110,32866,download 52 | 1406,274.326447868,1406113,17.29,334.519436,17.269755,247,30015,download 53 | 1444,221.734074964,1444078,12.53,153.311849,12.518223,216,30015,download 54 | 1353,324.094122131,1353577,3.58,18.347561,3.577944,304,30015,download 55 | 1340,321.445174174,1340721,3.37,18.057175,3.366767,347,30015,download 56 | 1335,354.335998736,1335165,3.36,16.137714,3.354972,326,30015,download 57 | 1364,298.392359152,1364334,6.17,69.205024,6.166573,288,30015,download 58 | 1353,314.885693546,1353293,3.37,16.818087,3.367506,324,30015,download 59 | 1352,318.57652142,1352685,3.38,19.363709,3.3809,307,30015,download 60 | 1334,347.263588647,1334881,3.63,22.286967,3.627682,342,30015,download 61 | 1496,59.9416382826,1496416,4.72,15.042331,4.71886,7,66501,download 62 | 1496,61.9273768216,1496416,2.03,10.085781,2.031966,5,66501,download 63 | 1496,59.9416382826,1496416,2.94,10.562565,2.936055,7,66501,download 64 | 1497,64.5058136915,1497112,1.04,1.217992,1.041424,20,30046,download 65 | 1498,45.5082410119,1498560,7.06,163.914491,7.057065,1,14591,download 66 | 1498,45.5082410119,1498560,0.65,0.552034,0.645153,7,14591,download 67 | 1498,45.5082410119,1498560,0.84,2.236537,0.837878,8,14591,download 68 | 1485,134.309344425,1485844,20.72,408.685682,20.70117,108,34250,download 69 | 1482,145.512886027,1482720,15.88,233.181987,15.868866,127,35020,download 70 | 1491,107.582526462,1491167,6.6,33.935473,6.594266,126,31082,download 71 | 1484,136.32681321,1484491,6.31,32.617606,6.301334,124,31082,download 72 | 1409,243.569291989,1409577,11,53.608716,10.993988,191,30241,download 73 | 1490,93.2201694914,1490624,7.49,29.573041,7.485322,5,66501,download 74 | 1494,83.324666216,1494460,2.15,14.041235,2.148821,20,15614,download 75 | 1497,87.8122998218,1497180,6.12,28.284928,6.114954,21,32219,download 76 | 1494,84.0595027347,1494755,1.52,7.589286,1.519441,30,20470,download 77 | 1487,107.484882658,1487628,7.75,30.0687,7.744,21,65103,download 78 | 1497,64.5058136915,1497112,2.36,17.434551,2.360933,10,15614,download 79 | 1497,64.5058136915,1497112,1.49,7.023166,1.489847,21,15870,download 80 | 1240,431.420908163,1240265,33.45,91.077643,33.421052,428,30155,download 81 | 1243,435.022987898,1243185,46.25,286.171425,46.205395,463,30185,download 82 | 1270,402.140522703,1270925,25.23,66.857008,25.205373,403,30280,download 83 | 1258,413.649610178,1258961,30.79,71.822813,30.754865,421,30340,download 84 | 1219,444.599820063,1219541,39.04,85.84582,38.999726,449,30364,download 85 | 1227,435.20110294,1227125,43.34,145.655499,43.299839,445,30238,download 86 | 1497,64.5058136915,1497112,1.53,6.260817,1.532068,14,16254,download 87 | 1275,388.46106626,1275305,29.63,124.881912,29.596964,410,30149,download 88 | 1276,387.749919407,1276481,24.12,66.567913,24.094718,411,30007,download 89 | 1317,334.732729203,1317895,15.96,71.115951,15.944007,367,30270,download 90 | 1225,437.910949852,1225665,41.21,107.562762,41.164166,446,29970,download 91 | 1242,427.207209677,1242617,32.25,72.0488,32.215167,430,30616,download 92 | 1260,410.524055324,1260705,29.68,74.256089,29.654402,426,30532,download 93 | 1235,432.758593213,1235601,32.3,93.070741,32.263887,429,30574,download 94 | 1258,407.79161345,1258961,27.24,68.843611,27.215955,436,29919,download 95 | 1256,408.582916921,1256325,25.44,64.923661,25.419247,426,30007,download 96 | 1303,348.132158813,1303653,15.31,54.60482,15.296668,375,30051,download 97 | 1317,335.886885722,1317645,13.99,52.579612,13.972174,376,30095,download 98 | 1310,339.576206469,1310345,12.1,40.369156,12.089499,376,30314,download 99 | 1497,64.5058136915,1497112,18.4,522.288699,18.376781,6,15550,download 100 | 1376,282.895740512,1376918,6.42,34.567938,6.411934,290,30015,download 101 | 1352,313.06868256,1352666,5.46,32.318419,5.458666,335,30015,download 102 | 1355,290.654433993,1355586,8.83,44.667751,8.817161,328,30015,download 103 | 1361,299.360986102,1361142,3.02,13.160687,3.018838,316,30015,download 104 | 1365,279.427987145,1365522,3.43,15.266183,3.424326,306,30015,download 105 | 1390,254.621287405,1390626,4.03,20.263612,4.025568,260,30015,download 106 | 1371,290.394559178,1371078,8.68,183.19181,8.673066,321,30015,download 107 | 1368,308.204477579,1368482,3.61,19.650334,3.610635,328,30015,download 108 | 1346,313.290599923,1346826,5.99,34.086814,5.980685,335,30015,download 109 | 1368,294.56238728,1368442,10.83,58.880043,10.815061,304,30015,download 110 | 1355,294.625185617,1355302,9.55,47.496042,9.538086,329,30015,download 111 | 1492,100.846417884,1492858,6.72,29.763177,6.71468,128,31294,download 112 | 1492,100.846417884,1492858,11.14,47.290346,11.132655,120,30945,download 113 | 1503,171.449701079,1503078,7.95,51.942199,7.944366,121,31313,download 114 | 1492,100.846417884,1492858,8.78,59.069102,8.776075,104,31592,download 115 | 1397,354.235797175,1397114,35.08,922.638969,35.049826,69,64240,download 116 | 1471,171.944758571,1471552,7.09,134.282527,7.083542,69,40708,download 117 | 1469,157.047763435,1469030,11.39,304.256073,11.375561,72,65352,download 118 | 1387,253.576418462,1387441,3.48,16.091747,3.480679,267,30015,download 119 | 1365,302.930685141,1365257,3.47,16.31072,3.468434,344,30015,download 120 | 1379,253.531063186,1379857,4.34,30.591109,4.339608,282,30015,download 121 | 1394,233.89955109,1394381,4.82,36.755485,4.817061,291,29936,download 122 | 1429,216.47632665,1429705,8.3,46.695646,8.291302,191,30015,download 123 | 1449,163.153302142,1449981,7.66,43.718377,7.654799,154,30159,download 124 | 1493,95.6765383989,1493051,1.27,5.608993,1.264897,65,33149,download 125 | 1493,94.1381962861,1493465,2.5,42.388235,2.497865,31,32811,download 126 | 1493,94.1381962861,1493465,2.55,47.041877,2.551207,26,32274,download 127 | 1491,106.131993291,1491591,1.47,9.16176,1.468478,47,32295,download 128 | 1491,106.131993291,1491591,1.24,4.228249,1.242677,65,32872,download 129 | 1490,113.758516165,1490131,6.33,27.997491,6.327568,270,33122,download 130 | 1493,94.1381962861,1493465,1.09,1.858695,1.087619,31,32989,download 131 | 1493,94.1381962861,1493465,1.13,2.476977,1.129309,29,32542,download 132 | 1493,94.1381962861,1493465,1.13,2.426022,1.124311,29,32628,download 133 | 1478,158.347718645,1478865,1.54,7.888264,1.542636,30,32432,download 134 | 1487,123.052834181,1487625,1.45,2.009913,1.444097,28,32811,download 135 | 1494,104.938076979,1494925,2.62,43.254379,2.614185,29,32015,download 136 | 1494,82.1462111117,1494925,1.04,1.192654,1.043079,30,32906,download 137 | 1493,94.1381962861,1493465,1.11,2.094416,1.103926,29,33129,download 138 | 1494,82.1462111117,1494925,1.06,1.510592,1.057499,29,32345,download 139 | 1493,94.1381962861,1493465,1.13,2.702187,1.12809,25,31737,download 140 | 1494,82.1462111117,1494925,1.03,1.096119,1.030437,29,31308,download 141 | 1494,82.1462111117,1494925,1.06,1.569319,1.059378,32,32628,download 142 | 1494,82.1462111117,1494925,1.05,1.237533,1.048033,29,32628,download 143 | 1494,82.1462111117,1494925,1.04,1.176038,1.040726,31,31793,download 144 | 1494,82.1462111117,1494925,1.07,1.635688,1.067277,31,32628,download 145 | 1492,102.688850417,1492005,1.32,7.772959,1.319786,28,31308,download 146 | 1494,82.1462111117,1494925,1.04,1.463955,1.038178,33,32349,download 147 | 1491,106.131993291,1491591,2.68,36.005407,2.679541,62,32594,download 148 | 1479,148.835479641,1479911,6.69,31.381093,6.687349,275,33122,download 149 | 1493,94.1381962861,1493465,2.29,37.993387,2.285769,29,32711,download 150 | 1492,101.975487251,1492218,2.76,53.088214,2.754708,28,32934,download 151 | 1492,102.688850417,1492005,1.11,2.139815,1.109848,27,31964,download 152 | 1478,160.433786965,1478451,6.8,34.771483,6.789516,271,32027,download 153 | 1490,109.859000542,1490685,2.29,30.578043,2.287092,71,32804,download 154 | 1487,116.828934772,1487694,4.58,72.865457,4.577261,44,32542,download 155 | 1493,94.2708862799,1493300,7.56,205.217344,7.552699,27,32649,download 156 | 1491,106.131993291,1491591,2.29,33.034379,2.292182,54,32340,download 157 | 1493,94.1381962861,1493465,2.39,41.879571,2.384607,24,32628,download 158 | 1492,102.688850417,1492005,2.86,51.760892,2.855866,33,32962,download 159 | 1493,94.1381962861,1493465,1.08,1.746066,1.076941,29,32542,download 160 | 1493,94.1381962861,1493465,1.08,1.738683,1.08178,27,32015,download 161 | 1491,106.131993291,1491591,2.61,39.943757,2.605132,74,31602,download 162 | 1491,106.442472726,1491324,2.56,34.480821,2.561623,73,32260,download 163 | 1493,94.1381962861,1493465,1.14,2.643324,1.14342,25,31695,download 164 | 1493,94.1381962861,1493465,1.1,1.958521,1.096509,26,32274,download 165 | 1493,94.1381962861,1493465,1.07,1.643684,1.064366,27,32488,download 166 | 1493,94.1381962861,1493465,1.09,1.902546,1.0906,30,32516,download 167 | 1494,82.1462111117,1494925,1.06,1.604736,1.054815,33,32572,download 168 | 1493,94.6784030284,1493139,2.53,46.43732,2.531649,23,32542,download 169 | 1493,94.1381962861,1493465,2.31,38.996246,2.307715,24,31459,download 170 | 1493,94.1381962861,1493465,1.07,1.729928,1.073342,29,32005,download 171 | 1493,94.1381962861,1493465,1.13,2.405453,1.127494,31,32015,download 172 | 1494,82.1462111117,1494925,1.03,1.127384,1.032542,24,32143,download 173 | 1494,82.9879509327,1494599,1.04,1.412834,1.035321,13,32107,download 174 | 1493,94.6889645101,1493151,2.13,32.410407,2.128081,13,32361,download 175 | 1494,82.9879509327,1494599,1.07,2.117649,1.067001,12,32234,download 176 | 1494,82.9879509327,1494599,1.03,1.294592,1.02585,16,32488,download 177 | 1494,82.9879509327,1494599,2.53,15.582145,2.528132,12,32361,download 178 | 1494,82.9879509327,1494599,2.47,15.406475,2.468976,12,32488,download 179 | 1494,82.9879509327,1494599,2.46,15.211052,2.459156,11,32488,download 180 | 1489,117.749734607,1489294,2.48,44.456443,2.479821,12,32488,download 181 | 1493,94.6889645101,1493151,4.07,93.902124,4.066539,13,32488,download 182 | 1494,82.9879509327,1494599,1.06,1.917338,1.056998,14,32361,download 183 | 1494,82.9879509327,1494599,1.08,2.239855,1.076038,13,32234,download 184 | 1496,131.848397791,1496047,1.11,2.359666,1.10936,11,32107,download 185 | 1494,82.9879509327,1494599,1.03,1.555012,1.033198,13,32361,download 186 | 1494,82.9879509327,1494599,1.07,1.984666,1.071095,16,32361,download 187 | 1494,82.9879509327,1494599,1.05,1.358848,1.050384,15,32488,download 188 | 1493,94.6889645101,1493151,2.6,32.476099,2.593668,15,32361,download 189 | 1494,82.9879509327,1494599,1.08,2.114386,1.075734,12,32488,download 190 | 1494,82.9879509327,1494599,1.04,0.807713,1.040095,13,32361,download 191 | 1494,82.9879509327,1494599,1.03,0.714549,1.027412,11,32234,download 192 | 1494,82.9879509327,1494599,1.07,1.960866,1.068482,15,32361,download 193 | 1493,94.1381962861,1493465,1.09,1.962322,1.085386,25,31737,download 194 | 1493,94.1381962861,1493465,1.1,2.297179,1.099173,28,31755,download 195 | 1493,94.1381962861,1493465,1.11,2.063588,1.108228,26,31725,download 196 | 1492,103.778610513,1492055,1.06,1.679203,1.062876,49,32597,download 197 | 1492,100.632996577,1492715,1.03,1.079559,1.027214,49,32570,download 198 | 1492,101.024749443,1492550,1.24,6.527712,1.240418,67,32955,download 199 | 1452,191.261600955,1452872,13.1,59.911152,13.08506,149,32117,download 200 | 1457,189.98420987,1457835,4.46,21.176604,4.45663,158,31392,download 201 | 1454,183.893991201,1454940,10.06,44.913916,10.052061,142,32117,download 202 | 1452,184.488482025,1452710,10.07,47.367086,10.060319,180,31831,download 203 | 1482,123.58802531,1482653,14.97,68.498764,14.950398,157,31576,download 204 | 1468,152.636823866,1468335,9.33,41.263348,9.319966,160,31140,download 205 | 1465,171.71779174,1465413,7.38,34.3519,7.371903,169,31208,download 206 | 1474,155.122532212,1474009,5.29,27.582522,5.28931,157,31208,download 207 | 1475,144.858551698,1475633,23.97,98.655042,23.94342,147,31392,download 208 | 1460,187.624625249,1460992,18.19,71.32733,18.16926,174,32117,download 209 | 1492,102.601169584,1492220,1.07,2.286963,1.071954,49,32540,download 210 | 1492,100.508706091,1492880,1.03,0.490297,1.024497,39,32972,download 211 | 1492,100.508706091,1492880,1.03,0.587631,1.028375,37,32941,download 212 | 1487,132.623527325,1487001,1.07,1.697751,1.069537,42,32495,download 213 | 1489,118.004237212,1489965,1.03,0.5956,1.02945,39,32425,download 214 | 1492,100.508706091,1492880,1.36,7.023717,1.360546,80,32941,download 215 | 1491,105.806427026,1491395,1.06,1.626176,1.061835,48,34022,download 216 | 1491,106.315568004,1491395,1.06,1.610872,1.056009,51,32941,download 217 | 1439,214.758003343,1439693,7.75,46.717745,7.741227,231,30015,download 218 | 1439,207.282416041,1439977,7.93,42.286674,7.922184,165,30015,download 219 | 1351,313.99681527,1351201,6.64,36.444602,6.630371,390,30015,download 220 | 1323,361.09555522,1323177,7.81,74.939808,7.800651,377,30015,download 221 | 1386,248.901586978,1386513,3.38,16.858744,3.378879,282,30658,download 222 | 1498,45.5082410119,1498560,1.05,1.687868,1.044356,6,14591,download 223 | 1498,45.5082410119,1498560,1.05,1.666458,1.052415,7,14591,download 224 | 1498,45.5082410119,1498560,1.05,1.583136,1.051055,7,14591,download 225 | 1498,45.5082410119,1498560,1.02,1.140703,1.015094,7,14591,download 226 | 1498,45.5082410119,1498560,1.04,1.451395,1.039655,6,14591,download 227 | 1498,45.5082410119,1498560,1.06,1.643857,1.056432,6,14591,download 228 | 1498,45.5082410119,1498560,1.02,0.968121,1.0143,6,14591,download 229 | 1498,45.5082410119,1498560,1.42,1.954884,1.421362,0,14591,download 230 | 1498,45.5082410119,1498560,1.04,1.557181,1.043233,6,14591,download 231 | 1498,45.5082410119,1498560,1.1,2.559783,1.095765,6,14591,download 232 | 1498,45.5082410119,1498560,1.07,1.891264,1.068642,7,14591,download 233 | 1498,45.5082410119,1498560,1.03,1.148869,1.025506,8,14591,download 234 | 1498,45.5082410119,1498560,1.25,3.479148,1.253654,9,14591,download 235 | 1498,45.5082410119,1498560,1.15,4.760765,1.152475,7,14591,download 236 | 1498,45.5082410119,1498560,1.03,1.099324,1.029717,6,14591,download 237 | 1498,45.5082410119,1498560,1.09,1.374182,1.09037,13,14591,download 238 | 1498,45.5082410119,1498560,1.92,28.053481,1.919954,0,14591,download 239 | 1483,112.414411887,1483067,1.7,16.411095,1.700286,70,65352,download 240 | 1419,229.253135202,1419229,9.68,47.483396,9.671814,183,30015,download 241 | 1420,234.316025914,1420973,9.4,47.616605,9.395337,177,30015,download 242 | 1491,105.688220725,1491560,1.03,1.207177,1.030707,51,33596,download 243 | 1362,270.545744746,1362945,3.62,18.013051,3.61556,315,30532,download 244 | 1432,233.893137993,1432961,8.54,89.477567,8.530965,179,30015,download 245 | 1405,212.708721025,1405245,4.14,22.417059,4.140598,255,30015,download 246 | 1377,278.713114151,1377505,4.08,32.122923,4.075862,317,30015,download 247 | 1380,259.91921822,1380425,3.63,22.396551,3.6312,283,29970,download 248 | 1381,324.365534544,1381866,5.75,29.673321,5.743234,532,30015,download 249 | 1492,82.7647267862,1492777,1.13,3.153927,1.125994,258,1013,multimedia 250 | 1497,43.4165866922,1497422,1.2,2.355144,1.197123,263,1443,multimedia 251 | 1499,3.6055512755,1499887,1.16,1.806755,1.162264,343,1713,multimedia 252 | 1499,21.8860686282,1499082,1.07,1.359235,1.06756,435,2173,multimedia 253 | 1499,26.2868788562,1499168,1.01,0.716641,1.010336,416,2590,multimedia 254 | 1497,43.0232495286,1497343,1.01,0.818255,1.013378,427,2994,multimedia 255 | 1495,63.0713881249,1495598,1.18,5.307479,1.17751,15,688,multimedia 256 | 1499,64.7765389628,1499955,1.47,4.879571,1.46583,8,925,multimedia 257 | 1498,45.7602447546,1498552,1.31,6.858506,1.303902,2,1320,multimedia 258 | 1498,45.7602447546,1498552,3.14,9.357512,3.134687,2,1320,multimedia 259 | 1492,92.714615892,1492341,1.35,6.379525,1.349509,264,1189,multimedia 260 | 1271,515.521095592,1271196,13.95,65.696436,13.934555,289,3694,multimedia 261 | 1495,76.9025357189,1495158,3.26,45.271873,3.257591,385,3815,multimedia 262 | 1439,215.89117629,1439569,1.9,8.850682,1.897009,216,30015,multimedia 263 | 1441,211.165811627,1441137,6.08,84.447977,6.070486,252,30015,multimedia 264 | 1371,293.409270474,1371873,2.19,17.960592,2.184532,390,30015,multimedia 265 | 1395,278.478006313,1395653,2.24,17.294851,2.234914,408,30015,multimedia 266 | 1495,72.876608044,1495558,1.39,11.82425,1.387492,4,30015,multimedia 267 | 1495,73.7902432575,1495376,1.37,10.364494,1.367851,4,30015,multimedia 268 | 1493,80.2620707433,1493997,1.03,1.00534,1.027527,10,30015,multimedia 269 | 1403,273.150141863,1403305,6.34,33.679481,6.335821,218,30015,multimedia 270 | 1412,237.004219372,1412065,6.9,42.227913,6.888412,246,30015,multimedia 271 | 1399,247.37623168,1399209,6.71,34.283239,6.708007,229,30015,multimedia 272 | 1394,274.472220817,1394543,6.56,34.720606,6.552577,238,30015,multimedia 273 | 1377,281.827961707,1377972,2.36,10.332324,2.3596,280,30015,multimedia 274 | 1390,269.862928169,1390828,5.29,103.093592,5.289134,244,30015,multimedia 275 | 1415,262.705157924,1415935,6.15,37.666621,6.146826,173,30015,multimedia 276 | 1388,243.092574959,1388488,2.99,25.092675,2.990609,279,30015,multimedia 277 | 1370,308.074666274,1370678,6.19,93.121165,6.184366,278,30015,multimedia 278 | 1385,254.795996829,1385274,2.3,11.858571,2.299174,285,30015,multimedia 279 | 1434,197.982322443,1434040,4.32,25.546954,4.312421,170,30015,multimedia 280 | 1381,307.95941291,1381290,7.01,77.605009,7.000909,253,30015,multimedia 281 | 1377,264.622372448,1377448,2.35,13.048926,2.351516,320,30015,multimedia 282 | 1404,258.974902259,1404252,2.39,11.993028,2.387223,240,30015,multimedia 283 | 1416,238.432380351,1416887,5.41,32.964591,5.401749,211,30015,multimedia 284 | 1394,225.612499654,1394032,2.11,10.871731,2.105444,275,30015,multimedia 285 | 1410,252.013888506,1410420,7.4,81.263331,7.388736,210,30015,multimedia 286 | 1371,289.37691684,1371825,2.34,10.348273,2.338404,311,30015,multimedia 287 | 1408,253.60599362,1408636,6.11,61.749109,6.101261,222,30015,multimedia 288 | 1399,277.227343529,1399876,6.88,70.694146,6.870307,249,30015,multimedia 289 | 1376,271.863936557,1376272,2.38,11.088761,2.376906,288,30015,multimedia 290 | 1418,253.998031488,1418288,5.64,33.694784,5.634145,173,30015,multimedia 291 | 1386,256.193286407,1386732,2.36,10.66418,2.361656,297,30015,multimedia 292 | 1493,87.2811548961,1493997,1.03,1.181474,1.026208,14,30015,multimedia 293 | 1491,93.9627585802,1491077,1.06,1.785096,1.060917,13,31369,multimedia 294 | 1495,73.4914961067,1495619,1.26,6.655429,1.256727,25,15550,multimedia 295 | 1495,73.5255057786,1495618,1.08,1.66059,1.074649,29,15550,multimedia 296 | 1500,0,1500000,1.02,0.587097,1.014335,7,520,multimedia 297 | 1497,57.8878225536,1497059,1.22,4.82433,1.216467,8,553,multimedia 298 | 1366,328.683738569,1366009,6.81,53.262513,6.799303,246,30015,multimedia 299 | 1418,238.939322842,1418605,4.67,62.440595,4.663947,194,30015,multimedia 300 | 1413,256.937735648,1413674,5.97,50.210885,5.968278,173,30015,multimedia 301 | 1492,84.8881617188,1492919,1.1,2.235319,1.093916,10,30015,multimedia 302 | 1494,100.294566154,1494281,1.09,2.417711,1.091144,11,30015,multimedia 303 | 1490,91.940197955,1490738,1.14,3.801498,1.140696,19,30015,multimedia 304 | 1494,83.4206209519,1494281,1.44,13.430459,1.44063,30,30015,multimedia 305 | 1490,98.7015704029,1490793,1.75,17.879204,1.750342,21,30015,multimedia 306 | 1491,91.4713069766,1491117,1.63,19.392055,1.626311,16,30015,multimedia 307 | 1494,133.082681067,1494090,1.36,10.692689,1.355,19,30015,multimedia 308 | 1495,73.4098086089,1495274,1.17,2.742526,1.165823,4,30015,multimedia 309 | 1495,73.8579718108,1495173,1.35,8.640052,1.353239,5,30015,multimedia 310 | 1494,83.1925477432,1494281,1.71,21.632654,1.711173,8,30015,multimedia 311 | 1412,242.925914632,1412713,5.99,33.607124,5.984702,207,30015,multimedia 312 | 1494,81.7924201867,1494128,1.14,4.291463,1.142688,10,30015,multimedia 313 | 1493,83.9523674473,1493997,1.63,17.384045,1.632028,22,30015,multimedia 314 | 1495,72.3325652801,1495457,4.22,69.884177,4.21735,4,30015,multimedia 315 | 1441,221.406865296,1441857,3.11,49.976484,3.107638,126,30015,multimedia 316 | 1492,89.7830719011,1492253,1.07,1.859651,1.065344,21,30015,multimedia 317 | 1385,271.563988776,1385981,1.68,9.226274,1.679329,244,30564,multimedia 318 | 1386,252.130918374,1386265,1.54,6.563954,1.543279,289,30224,multimedia 319 | 1340,346.724674634,1340417,14.21,54.203982,14.195789,303,30553,multimedia 320 | 1416,219.940901153,1416925,1.41,3.888611,1.407084,215,30868,multimedia 321 | 1378,290.78514405,1378965,1.5,4.986901,1.500727,257,30868,multimedia 322 | 1310,343.474889912,1310312,20.85,64.129036,20.826634,402,30104,multimedia 323 | 1385,246.679954597,1385643,6.24,28.300261,6.238239,276,30185,multimedia 324 | 1391,237.953777024,1391538,6.44,34.177877,6.431803,271,30261,multimedia 325 | 1389,249.495490941,1389152,7.59,39.536441,7.580401,267,30191,multimedia 326 | 1393,238.26665734,1393250,6.45,31.607998,6.446288,268,29834,multimedia 327 | 1367,302.220118457,1367537,5.38,28.100064,5.376338,292,30015,multimedia 328 | 1367,262.137368568,1367861,7.43,32.859041,7.426304,309,30015,multimedia 329 | 1404,240.054160555,1404929,5.52,25.305437,5.517661,219,30015,multimedia 330 | 1367,267.243334809,1367249,4.17,19.047989,4.16628,311,30016,multimedia 331 | 1402,268.333747412,1402577,5.46,27.953045,5.455989,249,30015,multimedia 332 | 1500,0,1500000,1.08,1.705196,1.080347,7,1238,multimedia 333 | 1500,0,1500000,1.07,1.3222,1.072345,18,1006,multimedia 334 | 1493,87.6584280032,1493533,1.12,1.872725,1.120476,17,129983,multimedia 335 | 1491,100.781942827,1491384,1.08,1.443475,1.077547,20,129983,multimedia 336 | 1494,84.4926032266,1494224,1.08,1.953515,1.076772,15,129983,multimedia 337 | 1489,114.162165361,1489995,1.09,1.326303,1.092562,18,129983,multimedia 338 | 1496,71.8957578721,1496105,1.32,5.695249,1.319611,18,30046,multimedia 339 | 1497,64.5058136915,1497112,1.06,1.196824,1.061148,20,30078,multimedia 340 | 1498,73.8037939404,1498505,1.04,1.52402,1.037414,19,1007,multimedia 341 | 1498,45.7602447546,1498552,9.79,263.282381,9.781477,7,973,multimedia 342 | 1490,108.355895087,1490699,2.02,18.616019,2.021396,32,32934,multimedia 343 | 1490,110.15897603,1490903,2.49,28.463946,2.484656,42,32923,multimedia 344 | 1493,85.4283325367,1493589,1.02,1.218743,1.022424,5,30015,multimedia 345 | 1495,71.6589143094,1495418,1.39,3.444197,1.387538,4,30015,multimedia 346 | 1495,73.0958275143,1495298,1.72,4.420269,1.717298,4,30015,multimedia 347 | 1496,56.7802782663,1496758,1.1,2.112313,1.100355,4,30015,multimedia 348 | 1495,71.6589143094,1495418,1.22,2.235784,1.214787,4,30015,multimedia 349 | 1495,74.2361098119,1495212,1.08,1.415336,1.074007,4,30015,multimedia 350 | 1495,71.6589143094,1495418,1.17,1.602487,1.170019,4,30015,multimedia 351 | 1493,87.7496438739,1493469,3.01,6.503391,3.007699,6,30015,multimedia 352 | 1495,74.2361098119,1495212,1.91,2.47945,1.904696,4,30015,multimedia 353 | 1495,72.4154679609,1495353,2.37,8.476035,2.369055,5,30015,multimedia 354 | 1495,73.1846978541,1495741,1.42,2.174551,1.421398,4,30015,multimedia 355 | 1498,39.2555728528,1498256,1.63,2.128293,1.629941,5,30016,multimedia 356 | 1481,148.04053499,1481654,21.68,100.475386,21.662332,254,32714,multimedia 357 | 1475,170.78934393,1475880,6.06,49.772151,6.057753,342,33575,multimedia 358 | 1487,119.979164858,1487867,26.02,87.560361,25.991124,332,34554,multimedia 359 | 1482,146.106125813,1482234,10.82,73.196113,10.808546,481,33136,multimedia 360 | 1475,173.346473861,1475764,5.74,23.896797,5.733882,271,33324,multimedia 361 | 1479,161.694155739,1479182,6.89,38.033633,6.888043,240,33502,multimedia 362 | 1480,154.502427165,1480519,11.12,72.662593,11.104246,525,32892,multimedia 363 | 1478,161.254457303,1478340,4.61,22.58708,4.605928,410,33156,multimedia 364 | 1478,166.024094637,1478051,4.8,20.676119,4.791315,482,33105,multimedia 365 | 1496,54.8361194834,1496883,1.17,1.84903,1.171683,4,30015,multimedia 366 | 1495,71.056315694,1495707,1.03,1.246175,1.033447,3,30015,multimedia 367 | 1494,83.402637848,1494321,1.09,1.331197,1.088043,4,30015,multimedia 368 | 1494,76.3937170191,1494815,1.04,1.502132,1.037193,4,30015,multimedia 369 | 1493,84.5990543682,1493993,1.07,1.633712,1.071484,5,30015,multimedia 370 | 1495,71.056315694,1495707,1.06,1.478116,1.054515,3,30015,multimedia 371 | 1495,71.6030725598,1495423,1.25,1.837383,1.252678,4,30015,multimedia 372 | 1495,71.6030725598,1495423,1.13,1.566578,1.132377,4,30015,multimedia 373 | 1495,71.2460525222,1495537,1.06,1.897163,1.063292,4,30015,multimedia 374 | 1494,76.1708605702,1494361,1.2,1.735736,1.197244,7,30015,multimedia 375 | 1495,71.056315694,1495707,1.05,1.272715,1.046324,3,30015,multimedia 376 | 1495,71.056315694,1495707,1.04,1.597571,1.034899,3,30015,multimedia 377 | 1495,71.056315694,1495707,1.26,4.329797,1.25847,3,30015,multimedia 378 | 1495,71.6030725598,1495423,1.1,1.474395,1.103746,4,30015,multimedia 379 | 1495,71.6030725598,1495423,1.49,12.253225,1.489704,4,30015,multimedia 380 | 1495,71.056315694,1495707,1.1,1.86129,1.099353,3,30015,multimedia 381 | 1494,78,1494685,1.11,1.668015,1.10794,4,30015,multimedia 382 | 1494,74.7462373635,1494969,1.09,2.122404,1.093342,4,30015,multimedia 383 | 1493,81.4739222083,1493185,1.22,2.058595,1.222905,9,30015,multimedia 384 | 1495,71.6030725598,1495423,1.08,1.40451,1.07541,4,30015,multimedia 385 | 1495,71.056315694,1495707,1.09,1.440547,1.087296,3,30015,multimedia 386 | 1495,71.6030725598,1495423,1.13,2.199093,1.129739,4,30015,multimedia 387 | 1495,71.1055553385,1495617,1.16,4.046448,1.160764,4,30015,multimedia 388 | 1495,71.056315694,1495707,1.19,3.776663,1.184464,3,30015,multimedia 389 | 1495,71.6030725598,1495423,1.45,3.474218,1.446343,4,30015,multimedia 390 | 1495,71.6030725598,1495423,1.07,1.674709,1.071221,4,30015,multimedia 391 | 1495,71.056315694,1495707,1.27,2.191704,1.273069,3,30015,multimedia 392 | 1495,71.056315694,1495707,1.16,1.970656,1.161644,3,30015,multimedia 393 | 1495,71.6030725598,1495423,2.02,10.991621,2.020092,4,30015,multimedia 394 | 1495,71.6030725598,1495423,1.14,1.842939,1.141315,4,30015,multimedia 395 | 1493,84.36824047,1493913,1.08,2.16287,1.08264,5,30015,multimedia 396 | 1495,71.6030725598,1495423,1.24,2.287755,1.234503,4,30015,multimedia 397 | 1495,71.6030725598,1495423,1.12,1.886087,1.11816,4,30015,multimedia 398 | 1495,71.6449579524,1495419,1.25,2.408613,1.243951,4,30015,multimedia 399 | 1493,84.7525810816,1493469,1.16,2.199566,1.155535,7,30015,multimedia 400 | 1495,71.0985231914,1495703,1.08,1.783855,1.081036,3,30015,multimedia 401 | 1495,72.4775827411,1495253,1.08,1.622598,1.078423,4,30015,multimedia 402 | 1493,86.1452262171,1493185,1.2,1.607652,1.195677,7,30015,multimedia 403 | 1495,71.0985231914,1495703,1.63,17.965574,1.630511,3,30015,multimedia 404 | 1493,84.7525810816,1493469,1.51,10.539133,1.506932,7,30015,multimedia 405 | 1496,66.3324958071,1496516,1.76,5.591617,1.76012,2,30015,multimedia 406 | 1494,74.0742870367,1494765,1.23,1.933487,1.230471,5,30015,multimedia 407 | 1495,71.0985231914,1495703,1.07,1.541751,1.069665,3,30015,multimedia 408 | 1494,75.5711585196,1494889,1.06,1.625669,1.057327,4,30015,multimedia 409 | 1495,71.6449579524,1495419,1.1,1.702295,1.099315,4,30015,multimedia 410 | 1495,71.6449579524,1495419,1.23,1.805252,1.231763,4,30015,multimedia 411 | 1495,71.6449579524,1495419,1.09,1.520986,1.087183,4,30015,multimedia 412 | 1495,71.6449579524,1495419,1.08,1.448742,1.083562,4,30015,multimedia 413 | 1491,96.3535157636,1491514,4.32,48.195777,4.315242,39,38247,multimedia 414 | 1488,123.024387826,1488281,3.11,26.667146,3.110412,35,35059,multimedia 415 | 1497,57.8273291792,1497001,4.14,31.294114,4.138528,27,40498,multimedia 416 | 1497,54.881690936,1497568,4.35,33.523635,4.348532,50,40110,multimedia 417 | 1467,199.183332636,1467878,56.77,432.761807,56.714458,70,40313,multimedia 418 | 1483,144.01041629,1483488,19.27,137.868767,19.249775,68,35084,multimedia 419 | 1483,142.982516414,1483159,2.79,22.283189,2.787187,37,39933,multimedia 420 | 1491,100.841459728,1491034,3.44,32.309249,3.434045,36,40522,multimedia 421 | 1491,95.5353337776,1491455,3.05,31.674388,3.046755,32,39495,multimedia 422 | 1489,103.927859595,1489788,3.69,35.469919,3.682514,41,40004,multimedia 423 | 1494,75.4320886626,1494855,4.13,57.143487,4.126955,33,38292,multimedia 424 | 1497,47.6025209416,1497484,3.21,10.107311,3.211496,33,39533,multimedia 425 | 1481,152.787434038,1481441,9.15,91.14243,9.145636,9,41673,multimedia 426 | 1486,131.167831422,1486081,2.19,11.346707,2.186142,8,45423,multimedia 427 | 1492,99.1413132856,1492369,2.44,20.651338,2.440219,24,31227,multimedia 428 | 1492,103.126136357,1492050,2.98,42.22377,2.978582,19,31291,multimedia 429 | 1494,103.547090737,1494929,8.87,230.018269,8.864883,23,31227,multimedia 430 | 1492,98.2395032561,1492033,3.23,25.238771,3.230145,29,31195,multimedia 431 | 1490,107.275346655,1490585,3.72,41.360723,3.717357,36,31163,multimedia 432 | 1493,113.044239128,1493489,1.83,18.718584,1.830932,21,31097,multimedia 433 | 1489,109.836241742,1489137,5.67,32.144605,5.667834,57,31227,multimedia 434 | 1493,87.2754260946,1493997,1.34,9.797804,1.343188,8,29999,multimedia 435 | 1441,215.995370321,1441846,6.88,37.7068,6.870824,169,35031,multimedia 436 | 1492,88.4307638777,1492821,1.88,25.50569,1.874618,17,30241,multimedia 437 | 1488,119.549153071,1488770,6.87,33.83472,6.86436,6,30262,multimedia 438 | 1479,168.718700801,1479442,8.58,36.343231,8.575316,8,30055,multimedia 439 | 1492,91.6406023551,1492866,6.45,67.653044,6.439185,5,30210,multimedia 440 | 1488,129.197523196,1488787,5.89,39.337159,5.880916,13,30156,multimedia 441 | 1479,153.642442053,1479442,17.52,307.158633,17.506671,20,30314,multimedia 442 | 1486,116.26693425,1486742,22.9,562.866734,22.87785,37,30314,multimedia 443 | 1482,137.138616006,1482930,18.18,388.178766,18.1628,38,30262,multimedia 444 | 1484,134.777594577,1484789,73.22,1556.441149,73.144877,38,16697,multimedia 445 | 1478,148.1553239,1478570,8.39,37.536379,8.384159,54,15774,multimedia 446 | 1482,130.694299799,1482962,6.82,32.249482,6.808282,44,15646,multimedia 447 | 1484,134.037308239,1484795,90.45,1785.681688,90.35878,45,16857,multimedia 448 | 1476,163.257465373,1476909,104.01,2016.882342,103.901993,44,16792,multimedia 449 | 1477,152.065775242,1477966,8.65,36.978566,8.641191,56,15806,multimedia 450 | 1471,177.330200474,1471319,108.3,2029.31222,108.187904,57,16919,multimedia 451 | 1480,146.010273611,1480533,8.93,38.630075,8.924049,40,15774,multimedia 452 | 1495,73.6410211771,1495501,1.06,0.99755,1.057327,10,29885,multimedia 453 | 1493,90.3437878329,1493149,1.02,0.851743,1.019308,10,29834,multimedia 454 | 1494,78.8035532194,1494609,6.22,164.07549,6.211511,9,30140,multimedia 455 | 1494,82.4196578493,1494325,7.96,218.807554,7.954655,8,30210,multimedia 456 | 1491,93.8988817825,1491837,19.97,597.733451,19.947261,33,31288,multimedia 457 | 1489,100.299551345,1489809,1.07,2.256569,1.073174,16,31346,multimedia 458 | 1488,108.115678789,1488917,1.09,2.479406,1.092326,43,31259,multimedia 459 | 1488,108.115678789,1488917,1.08,2.481935,1.076338,16,31173,multimedia 460 | 1488,108.452754691,1488633,1.08,2.229744,1.081224,38,31346,multimedia 461 | 1488,105.74497624,1488917,27.35,831.336266,27.318915,20,31173,multimedia 462 | 1494,100.154880061,1494757,1.17,3.337089,1.173218,22,30294,multimedia 463 | 1490,98.6154146166,1490377,1.21,5.958248,1.207303,36,31201,multimedia 464 | 1492,89.6381615162,1492729,1.3,4.008392,1.296963,7,30294,multimedia 465 | 1488,108.452754691,1488633,1.1,2.679042,1.096379,27,31173,multimedia 466 | 1492,90.0610903776,1492445,16.1,473.011511,16.088273,18,31317,multimedia 467 | 1487,114.847725271,1487173,1.1,2.796695,1.103607,15,31144,multimedia 468 | 1489,106.855041996,1489809,1.09,2.249687,1.088063,24,31288,multimedia 469 | 1490,101.631687972,1490093,1.4,10.685392,1.402185,26,31317,multimedia 470 | 1491,90.9065454189,1491877,1.12,2.317844,1.118436,13,31346,multimedia 471 | 1492,90.4820424173,1492161,1.22,3.039263,1.223533,11,31230,multimedia 472 | 1488,108.793382152,1488349,1.19,2.659181,1.19137,26,31230,multimedia 473 | 1490,91.7169559024,1490985,1.13,3.505086,1.132431,15,31346,multimedia 474 | 1490,93.0913529819,1490377,1.25,7.121406,1.244207,19,31346,multimedia 475 | 1494,84.243694126,1494189,1.11,2.112904,1.107379,20,30294,multimedia 476 | 1487,112.294256309,1487457,1.09,2.442863,1.092944,45,31346,multimedia 477 | 1490,101.262036322,1490377,2.16,36.118031,2.153831,38,31346,multimedia 478 | 1491,96.5608616366,1491837,1.13,3.628914,1.125603,32,31288,multimedia 479 | 1493,89.2076229927,1493013,1.08,2.058472,1.080841,28,31317,multimedia 480 | 1491,91.7387595294,1491269,1.11,3.157134,1.109064,28,30294,multimedia 481 | 1490,96.9639108122,1490377,1.14,4.139076,1.138598,17,31317,multimedia 482 | 1491,92.043467992,1491837,1.67,20.500301,1.666391,37,30294,multimedia 483 | 1491,94.302704097,1491553,1.13,2.398533,1.129407,26,30294,multimedia 484 | 1488,108.793382152,1488349,1.09,2.308071,1.08903,29,31346,multimedia 485 | 1491,92.4553946506,1491553,1.35,10.355886,1.34893,17,30294,multimedia 486 | 1489,97.7394495585,1489809,1.4,12.215559,1.399254,22,31346,multimedia 487 | 1490,97.3498844375,1490093,1.12,3.357555,1.123059,30,31346,multimedia 488 | 1491,92.4553946506,1491553,1.09,2.410626,1.088747,27,30294,multimedia 489 | 1488,108.452754691,1488633,1.07,2.150171,1.073328,33,30294,multimedia 490 | 1488,106.503521069,1488917,1.07,2.030344,1.070909,22,31230,multimedia 491 | 1490,103.735239914,1490377,1.21,5.897484,1.209749,15,30294,multimedia 492 | 1490,96.9639108122,1490377,1.1,2.782497,1.097781,32,30294,multimedia 493 | 1491,93.8988817825,1491837,1.39,5.75217,1.388624,23,31201,multimedia 494 | 1491,97.3396116697,1491269,13.91,406.309292,13.896006,24,31201,multimedia 495 | 1492,90.0610903776,1492445,1.42,12.872594,1.421846,13,31317,multimedia 496 | 1490,98.4987309563,1490377,1.23,6.840157,1.228564,31,30294,multimedia 497 | 1489,99.8899394334,1489809,1.96,6.849811,1.957674,27,30294,multimedia 498 | 1488,108.452754691,1488633,1.36,10.56042,1.358032,15,30294,multimedia 499 | 1490,98.4987309563,1490377,1.09,2.58214,1.093087,39,31201,multimedia 500 | 1488,108.452754691,1488633,1.11,2.884051,1.112215,30,30322,multimedia 501 | --------------------------------------------------------------------------------