diff --git a/.gitignore b/.gitignore index a34ed91..f2515b8 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,15 @@ code/no-op code/get-signal code/fifo-tx code/fifo-rx +code/send-osc +code/listen-osc code/plugiciel.so code/appelant +code/flydraw.png +code/flydraw.gif + +A + +D +code/flydraw.gif diff --git a/chap/OSC.tex b/chap/OSC.tex index f928456..f2ba722 100644 --- a/chap/OSC.tex +++ b/chap/OSC.tex @@ -19,7 +19,25 @@ allons voir maintenant. \section{oscdump \& oscsend} \index{oscdump}\index{oscsend} -Ecouter : + +\textbf{Envoyer :} + +Pour envoyer, il faut bien définir une destination. Une fois +de plus, le couple IP adresse/port est utilisé. Ce sont les +deux premiers paramètres. + +\begin{verbatim} +tth@debian:~$ oscsend localhost 1664 /tmp/kmem is 61 'meg, efface !' +tth@debian:~$ +\end{verbatim} + +La chaine \texttt{is} que vous voyez dans la ligne de commande +décrit le type des paramètres qui suivent~: +\texttt{i} est pour un integer et \texttt{s} pour une +chaine (notez les simples quotes pour passer les caractères +speciaux du shell). + +\textbf{Ecouter :} \begin{verbatim} tth@debian:~$ oscdump 1664 @@ -28,12 +46,7 @@ tth@debian:~$ oscdump 1664 tth@debian:~$ \end{verbatim} -Envoyer : - -\begin{verbatim} -tth@debian:~$ oscsend localhost 1664 /tmp/kmem is 61 'meg, efface !' -tth@debian:~$ -\end{verbatim} +% ------------------------------------------------ \section{Exemple de code} @@ -45,6 +58,12 @@ Envoyer : \lstinputlisting[language=c]{code/send-osc.c} +% ------------------------------------------------ +\section{En Perl} \index{Perl} + + +% ------------------------------------------------ + \section{Autres logiciels} Beaucoup d'autres logiciels peuvent être controlés par OSC, ou diff --git a/chap/graphisme.tex b/chap/graphisme.tex index cd67bb5..4ad8886 100644 --- a/chap/graphisme.tex +++ b/chap/graphisme.tex @@ -6,18 +6,42 @@ Quelques notes en vrac sur divers logiciels\dots \section{Flydraw}\index{Flydraw} +Comment faire des dessins en écrivant des lignes de codes ? + \begin{quote} flydraw is a drawing tool based on an interpreter which parses a language featuring rich graphic primitives; it uses libgd to output GIF, JPEG, or PNG\index{PNG} files. \end{quote} -% ------------------------------------------------ +\lstinputlisting{code/dessiner.fly} + +Pour le moment, les résultats ne sont pas encourageants~: +\begin{verbatim} +tth@fubar:~/Documents/TetaTricks/code$ flydraw < dessiner.fly +bad_parms -100000 +tth@fubar:~/Documents/TetaTricks/code$ +\end{verbatim} + +Mais en s'obstinant un peu au \textsl{cargocult}, il +s'avère que la documentation et le code semble ne sont +pas d'accord. Et les messages d'erreur trop +cryptiques pour moi. Donc, on y arrive. + +\begin{figure}[h] + \begin{center} + \includegraphics[scale=0.75]{code/flydraw} + \caption{Flydraw} + \end{center} +\end{figure} + +%==================================================================== \section{Povray}\index{POVray} \textbf{Persistence Of Vision} est un logiciel de raytracing qui -existe depuis plus de trente ans. +existe depuis plus de trente ans. C'est un lointain descendant +de DKBtrace. \subsection{Caméra} @@ -69,6 +93,25 @@ la commande\texttt{tail} au début du script. Ensuite les deux clauses coordonnées X et Z, dans le repère POVray, qui n'est pas le même que celui de Gnuplot. +% ------------------------------------------------ + +\subsection{Trucs à voir} + +\begin{verbatim} + +#declare VIRGINIA = +transform{ +matrix < 1, 1, 0, + 0, 1, 0, + 0, 0, 1, + 0, 0, 0 > + } + +box{0,1 +transform{VIRGINIA} +} +\end{verbatim} + % ------------------------------------------------ diff --git a/chap/reseau.tex b/chap/reseau.tex index 83af6cc..f24b4f8 100644 --- a/chap/reseau.tex +++ b/chap/reseau.tex @@ -185,7 +185,12 @@ C'est clairement aussi un outil dédié au voyeurisme à distance, puisque il permet de découvrir, avec plus ou moins de détails, les services exposés à l'extérieur par une machine distante. +Comment scanner un /24 pour y découvrir les machines ? +\begin{verbatim} +# nmap -sS 192.168.42.0/24 +\end{verbatim} +\texttt{-sS} = TCP SYN scan. % ============================================================== \section{netcat} diff --git a/chap/shell.tex b/chap/shell.tex index 2e97da2..fca7479 100644 --- a/chap/shell.tex +++ b/chap/shell.tex @@ -1,7 +1,8 @@ \chapter{Le Shell}\index{shell} \label{chap:shell} -Le \texttt{shell} est le coquillage qui isole le MC/P des yusers. +Le \texttt{shell} est le coquillage qui isole le +MC/P\footnote{Master Control Program} des yusers. En gros, hein, je vais simplifier, et me limiter aux bricolages constructifs et/ou amusant. Il y aura du gore\index{gore} aussi. @@ -12,7 +13,7 @@ choses en commun. Nous allons nous concentrer sur le \textsl{Bourne again shell}. aka \texttt{bash} qui est peut-être le plus répandu. Mais il -en exuste d'autres : sh, ksh, ash, zsh\dots +en existe d'autres : sh, ksh, ash, zsh\dots % ============================================================== diff --git a/chap/ssh.tex b/chap/ssh.tex index 9dbc784..9718eb8 100644 --- a/chap/ssh.tex +++ b/chap/ssh.tex @@ -14,9 +14,11 @@ other attacks. Additionally, OpenSSH provides secure tunneling capabilities and several authentication methods, and supports all SSH protocol versions.} +% -------------------------------------------- + \section{X11 forwarding}\index{X11} - +Option \texttt{-X} et ses implications sur la sécurité. \section{sshfs} \index{sshfs} @@ -51,5 +53,8 @@ les bons droits sur \texttt{/dev/fuse*} et un La semaine prochaine, nous verrons le \textit{mapping} entre les UID\index{UID} locaux et distants. +% -------------------------------------------- +\section{Port forwarding} +% https://tookmund.com/2021/10/ssh-port-forwarding diff --git a/chap/streaming.tex b/chap/streaming.tex index 84a1274..a5e2394 100644 --- a/chap/streaming.tex +++ b/chap/streaming.tex @@ -333,6 +333,12 @@ Voilà, c'est tout pour le moment. %==================================================================== +\section{Airtime} \index{Airtime} + +Cette partie est écrite pendant l'installation de Airtime +dans \textsf{Radio-Parasite} en octobre 2021. + +%==================================================================== \section{libshout}\index{libshout}\label{libshout} @@ -349,7 +355,8 @@ data, and prevents bad data from getting to the icecast server. \lstinputlisting[language=c]{code/microcast.c} - +Mais il reste encore pas mal de chose importante à rajouter dans +ce logiciel : par exemple la partie encodage. %==================================================================== diff --git a/chap/webcam.tex b/chap/webcam.tex index a34fb25..575ea52 100644 --- a/chap/webcam.tex +++ b/chap/webcam.tex @@ -75,3 +75,12 @@ of Code, the development continued and we are still looking for people with % -------------------------------------------------------------------- +\section{Kinect} \index{Kinect} + +Bon, voilà un nouveau gadget ;) + +À priori, la partie caméra RGB est gérée classiquement par v4l2, +mais le coté spécifique, je ne sais pas qu'en faire... + +% -------------------------------------------------------------------- + diff --git a/code/Makefile b/code/Makefile index 847cc76..f79c2ef 100644 --- a/code/Makefile +++ b/code/Makefile @@ -19,6 +19,15 @@ arguments: arguments.c Makefile no-op: no-op.c Makefile gcc -Wall $< -o $@ +#------------- OSC ----------------------- + +osc: send-osc listen-osc + +send-osc: send-osc.c Makefile + gcc -Wall $< -llo -o $@ +listen-osc: listen-osc.c Makefile + gcc -Wall $< -llo -o $@ + #------------- IPC ----------------------- get-signal: get-signal.c Makefile @@ -45,3 +54,10 @@ plugiciel.so: plugiciel.c plugiciel.h Makefile appelant: appelant.c plugiciel.h Makefile gcc -Wall $< -ldl -o $@ +#------------- GRAPHISME -------------------- + +flydraw.png: dessiner.fly + flydraw < $< + convert flydraw.gif flydraw.png + + diff --git a/code/dessiner.fly b/code/dessiner.fly new file mode 100644 index 0000000..0023210 --- /dev/null +++ b/code/dessiner.fly @@ -0,0 +1,10 @@ +comment Juste un petit dessin... + +new 640,480 + +line 10,10,300,300,red +line 12,10,302,300,red +line 14,10,304,300,red + +output flydraw.gif + diff --git a/code/listen-osc.c b/code/listen-osc.c index e6af197..8815522 100644 --- a/code/listen-osc.c +++ b/code/listen-osc.c @@ -1 +1,14 @@ /* LISTEN OSC */ + +#include +#include + +#define LOCAL_PORT "9000" + + +int main(int argc, char *argv[]) +{ + + +return 0; +} diff --git a/code/send-osc.c b/code/send-osc.c index d97b1b1..0968036 100644 --- a/code/send-osc.c +++ b/code/send-osc.c @@ -1 +1,18 @@ /* SEND OSC */ + +#include +#include + +#define REMOTE_HOST "localhost" +#define REMOTE_PORT "9000" + +int main(int argc, char *argv[]) +{ +lo_address loana; +int foo; + +loana = lo_address_new(REMOTE_HOST, REMOTE_PORT); +foo = lo_send(loana, "/dev/kmem", "is", 61, "meg, efface !"); +fprintf(stderr, "foo %d\n", foo); +return 0; +}