Last active
May 15, 2017 10:15
-
-
Save LatinSuD/4b64e877af325d0b83938d23b8574e0b to your computer and use it in GitHub Desktop.
Revisions
-
LatinSuD revised this gist
May 15, 2017 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,6 +5,9 @@ MTR is an enhanced traceroute tool for Linux and friends Cygwin (tested with 32 bit version, 2017-05-10). MTR built from https://github.com/traviscross/mtr Simple compiling: gcc -o procesarmtr.exe procesarmtr.c Invoke mtr using: real-mtr -b "$@" | procesarmtr.exe | cat (where real-mtr is the path to the actual mtr binary) -
LatinSuD revised this gist
May 15, 2017 . 1 changed file with 13 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,16 @@ /* MTR is an enhanced traceroute tool for Linux and friends Needs: Cygwin (tested with 32 bit version, 2017-05-10). MTR built from https://github.com/traviscross/mtr Invoke mtr using: real-mtr -b "$@" | procesarmtr.exe | cat (where real-mtr is the path to the actual mtr binary) */ #include <stdio.h> int main(int argc, char **argv) { -
LatinSuD revised this gist
May 13, 2017 . No changes.There are no files selected for viewing
-
LatinSuD revised this gist
May 13, 2017 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -28,6 +28,7 @@ int main(int argc, char **argv) { maxfilas=filas; } // Interceptar ?47h al principio para que no borre la pantalla if (a2=='\x1b' && a3=='[' && a4=='?' && a5=='4' && a6=='7' && a7=='h') { a7='l'; } -
LatinSuD revised this gist
May 13, 2017 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -28,6 +28,10 @@ int main(int argc, char **argv) { maxfilas=filas; } if (a2=='\x1b' && a3=='[' && a4=='?' && a5=='4' && a6=='7' && a7=='h') { a7='l'; } // Interceptar 2J (limpiar pantalla al final) if (a5=='[' && a6=='2' && a7=='J') { // Convertirlo en: 2C H 15B. (2C=nada, H=ir al inicio, 15B=bajar 15) -
LatinSuD created this gist
May 13, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,44 @@ #include <stdio.h> int main(int argc, char **argv) { int a1,a2,a3,a4,a5,a6,a7; int filas; int maxfilas=10; setbuf(stdout,0); do { a1=a2; a2=a3; a3=a4; a4=a5; a5=a6; a6=a7; a7=getchar(); // Contar las filas, ej: "ESC[12;5H" son 12 filas if (a1=='\x1b' && a2=='[' && a3>='0' && a3<='9' && a4>='0' && a4<='9' && a5==';' && a6=='5' && a7=='H' ) { filas = (a3-'0')*10 + a4-'0'; if (filas > maxfilas) maxfilas=filas; } // Interceptar 2J (limpiar pantalla al final) if (a5=='[' && a6=='2' && a7=='J') { // Convertirlo en: 2C H 15B. (2C=nada, H=ir al inicio, 15B=bajar 15) printf("C\x1b[H\x1b["); printf("%d",maxfilas+1); printf("B"); return 0; } if (a7 != EOF) putchar(a7); } while (a7 != EOF); }