Grosse session de travail
This commit is contained in:
parent
a2dc8eab26
commit
86b8708e25
@ -20,5 +20,7 @@ II)
|
||||
6)tshark -i eno1 -f "host____ and host____"
|
||||
|
||||
III)
|
||||
1)
|
||||
1) tcpdump -i lo | tee log.txt
|
||||
ping -c 1 -s 9216 172.16.2.44
|
||||
|
||||
2)
|
||||
|
31
APL1.2/SCR1.2/TP14/reponses.txt
Normal file
31
APL1.2/SCR1.2/TP14/reponses.txt
Normal file
@ -0,0 +1,31 @@
|
||||
Rappel 1 : L’utilitaire tcpdump permet de visualiser le trafic sur le r ́eseau. Il donne une description
|
||||
du contenu des paquets sur une interface r ́eseau. Cet utilitaire est un standard de toutes
|
||||
les installation Linux. Son utilisation est, par d ́efaut, r ́eserv ́e `a l’utilisateur root.
|
||||
|
||||
Rappel 2 : L’application graphique wireshark permet aussi de d ́ecrire le trafic sur un r ́eseau ; tshark
|
||||
en est la version ligne de commande.
|
||||
|
||||
tar cvzf archive.targz DIR/*
|
||||
désarchiver : tar xvf devoir.tar
|
||||
tar xvzf devoir.tar.gz
|
||||
2> /sev/null renvoie les erreurs dans un fichier "poubelle"
|
||||
I -
|
||||
1) Premiere commande pour servir de server, ncat -lu 50000, pour communiquer avec, ncat -u 127.0.0.1 5000.
|
||||
2) dd if=/dev/zero of=qft-file.dat count=18
|
||||
|
||||
3) ncat -u 172.0.0.1 50000 < ft-file.dat
|
||||
ncat -l -u 50000
|
||||
non, il n'y a pas de fragmentation --> il faut regarder les champs de l'en-tête IP relatif à la fragmentation. identification,flag mf est-il levé ou pas ? lo : MTV 65536 > 9216
|
||||
4)-t pour supprimer l'affichage des temps timestamp
|
||||
b)il suffit de ne pas ajouter l'option -e
|
||||
c)(-n) pour numeric
|
||||
-v, -vv, -vvv plus de tails fournis
|
||||
5) -F
|
||||
II -
|
||||
2) tcpdump -vvv eno1 host 172.16.2.45 > traceroute-trace.txt
|
||||
3)
|
||||
4)
|
||||
a)
|
||||
b)
|
||||
c)
|
||||
d)
|
0
APL1.2/SCR1.2/TP14/traceroute-trace.txt
Normal file
0
APL1.2/SCR1.2/TP14/traceroute-trace.txt
Normal file
Binary file not shown.
@ -1,6 +1,6 @@
|
||||
public class Testdate {
|
||||
public static void main(String[] args) {
|
||||
Date date = new Date(8,2,2022);
|
||||
Date date = new Date(8,3,2022);
|
||||
Date date2 = new Date(31, 1, 2022);
|
||||
|
||||
System.out.println("Date du jour : " + date);
|
||||
|
@ -1,6 +1,6 @@
|
||||
public class Lendemain {
|
||||
public static void main(String[] args) {
|
||||
Date date = new Date(8,2,2022);
|
||||
Date date = new Date(8,3,2022);
|
||||
System.out.println("Date du jour : " + date);
|
||||
date.Lendemain();
|
||||
System.out.println("Date du lendemain : " + date);
|
||||
|
8
APL2.1/TP5/Grisaille/Grisaille.java
Normal file
8
APL2.1/TP5/Grisaille/Grisaille.java
Normal file
@ -0,0 +1,8 @@
|
||||
import java.awt.Color;
|
||||
|
||||
public class Grisaille extends Color{
|
||||
|
||||
public Grisaille(int greyByte){
|
||||
super(greyByte, greyByte, greyByte, 255);
|
||||
}
|
||||
}
|
19
APL2.1/TP5/Grisaille/TestGrisaille.java
Normal file
19
APL2.1/TP5/Grisaille/TestGrisaille.java
Normal file
@ -0,0 +1,19 @@
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
public class testGrisaille{
|
||||
|
||||
public static void main(String[] args){
|
||||
JFrame fenetre = new JFrame();
|
||||
fenetre.setSize(800,800);
|
||||
fenetre.setLocation(5,5);
|
||||
fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
|
||||
JPanel button = new JPanel();
|
||||
button.setBackground(new Grisaille(100));
|
||||
fenetre.add(button,BorderLayout.CENTER);
|
||||
|
||||
fenetre.setVisible(true);
|
||||
}
|
||||
|
||||
}
|
BIN
APL2.1/TP6/Acceuil/Accueil.class
Normal file
BIN
APL2.1/TP6/Acceuil/Accueil.class
Normal file
Binary file not shown.
52
APL2.1/TP6/Acceuil/Accueil.java
Normal file
52
APL2.1/TP6/Acceuil/Accueil.java
Normal file
@ -0,0 +1,52 @@
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
public class Accueil extends JComponent{
|
||||
|
||||
private Image logScreen;
|
||||
|
||||
public Accueil(){
|
||||
super();
|
||||
this.logScreen = Toolkit.getDefaultToolkit().getImage("logScreen.jpg");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void paintComponent(Graphics pinceau){
|
||||
Graphics secondPinceau = pinceau.create();
|
||||
if (this.isOpaque()){
|
||||
secondPinceau.setColor(this.getBackground());
|
||||
secondPinceau.fillRect(0, 0, this.getWidth(), this.getHeight());
|
||||
}
|
||||
secondPinceau.drawImage(this.logScreen,0,0, this);
|
||||
}
|
||||
|
||||
public static void main(String[] args){
|
||||
|
||||
|
||||
JFrame fenetre = new JFrame();
|
||||
|
||||
fenetre.setSize(295, 223);
|
||||
fenetre.setMinimumSize(new Dimension(295, 223));
|
||||
fenetre.setLocation(100, 100);
|
||||
fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
fenetre.setLayout(null);
|
||||
|
||||
|
||||
Accueil login = new Accueil();
|
||||
login.setLocation(0,0);
|
||||
login.setSize(278,183);
|
||||
fenetre.add(login);
|
||||
|
||||
JTextField loginArea = new JTextField();
|
||||
loginArea.setLocation(110, 90);
|
||||
loginArea.setSize(150, 25);
|
||||
fenetre.add(loginArea);
|
||||
|
||||
JTextField passwordArea = new JTextField();
|
||||
passwordArea.setLocation(110, 130);
|
||||
passwordArea.setSize(150, 25);
|
||||
fenetre.add(passwordArea);
|
||||
|
||||
fenetre.setVisible(true);
|
||||
}
|
||||
}
|
18
APL2.1/TP6/Acceuil/Accueil_test.java
Normal file
18
APL2.1/TP6/Acceuil/Accueil_test.java
Normal file
@ -0,0 +1,18 @@
|
||||
import java.lang.*;
|
||||
|
||||
public class Accueil_test extends JPanel{
|
||||
private Image menuAcc;
|
||||
public Accueil_test(){
|
||||
super();
|
||||
this.menuAcc = Toolkit.getDefaultToolkit().getImage("menuAcc.jpg");
|
||||
}
|
||||
@Override
|
||||
protected void paintComponent(Graphics pinceau){
|
||||
Graphics secondPinceau = pinceau.create();
|
||||
if (this.isOpaque()){
|
||||
secondPinceau.setColor(this.getBackground());
|
||||
secondPinceau.fillRect(0, 0, this.getWidth(), this.getHeight());
|
||||
}
|
||||
secondPinceau.drawImage(this.menuAcc,0,0, this);
|
||||
}
|
||||
}
|
0
APL2.1/TP7/Moyenne/Main.java
Normal file
0
APL2.1/TP7/Moyenne/Main.java
Normal file
13
APL2.1/TP7/Moyenne/Moyenne.java
Normal file
13
APL2.1/TP7/Moyenne/Moyenne.java
Normal file
@ -0,0 +1,13 @@
|
||||
public class Moyenne {
|
||||
int numberOfNumber;
|
||||
double total;
|
||||
public Moyenne(){
|
||||
}
|
||||
double public getAverage(){
|
||||
return this.numberOfNumber/this.total;
|
||||
}
|
||||
void public add(Number newNumber){
|
||||
this.numberOfNumber++;
|
||||
this.total+= newNumber.doubleValue();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user