2023-05-27

Split text file into smaller multiple text file using command line

You can use:

split -l 5000 filename.txt

That creates files:

xaa
xab
aac
xad
xbe
aaf

Or you can use:

split -l 5000 -d --additional-suffix=.txt $FileName file

Where:

  • -l 5000: split file into files of 5,000 lines each.
  • -d: numerical suffix. This will make the suffix go from 00 to 99 by default instead of aa to zz.
  • --additional-suffix: lets you specify the suffix, here the extension
  • $FileName: name of the file to be split.
  • file: prefix to add to the resulting files.
Use man split for more info

P.S: Borrowed from here

Happy hacking!!!

2023-05-15

NO FUNCIONAN LOS ACCESOS DIRECTOS MODO AVION Y BLOQUEO DE TOUCHPAD (VANT)

Las teclas de función F1 (inhabilitar el touchpad) y F11 (activar/desactivar el modo avión) no funcionan por defecto en Linux con cualquier hardware. Los portátiles MOOVE14, MOOVE15 y ultraMOOVE se entregan con dichas funciones activas,pero si reinstalas la distribución Linux encontrarás que no puedes activar el modo avión (pulsando +) o activar/desactivar el touchpad (pulsando +).

Para habilitar ambas funciones hay que seguir los siguientes pasos:

  • Abrir terminal y ejecutar:
    sudo nano /etc/default/grub
  • cambiar la linea
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

    por la siguiente:

    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_os_name=Linux acpi_osi="

    Grabamos los cambios (+), salimos (+) y ejecutamos en la terminal:

    sudo update-grub
    reboot
    
Y ¡listo!. Ya funciona. NOTA: Si has instalado un sistema operativo Windows en tu ordenador VANT y has instalado todos los controladores suministrados con él, dichas funciones deben funcionar correctamente desde dicho sistema operativo, ya que uno de los drivers se encarga de habilitar las funciones especiales del teclado .

Happy hacking!!!

2023-04-08

dame contexto para la frase "Temo a los griegos incluso cuando traen regalos" [ChatGPT]

Esta es una frase famosa del poema "Laocoonte" de Virgilio, que es un poeta romano del siglo I a.C. En el poema, Laocoonte, un sacerdote troyano, está advirtiendo a su pueblo sobre el caballo de madera gigante que los griegos han dejado fuera de las puertas de la ciudad de Troya como un supuesto regalo de paz. Laocoonte tiene sospechas y no confía en los griegos, y esta frase es su advertencia de que incluso cuando los griegos ofrecen algo aparentemente amistoso, deberían ser tratados con precaución y desconfianza. En la historia de la Guerra de Troya, los troyanos ignoran la advertencia de Laocoonte y aceptan el caballo de madera, lo que finalmente conduce a la caída de Troya.

2023-04-03

I want to usa a socks5 proxy, I want to install the simplest one that runs in linux. [ChatGPT]

One simple option for setting up a SOCKS5 proxy on Linux is to use the "dante" package, which provides a lightweight and easy-to-configure SOCKS server.

Here are the basic steps to install and configure dante as a SOCKS5 proxy on a Linux server:

  1. Install the dante-server package using your distribution's package manager. For example, on Ubuntu, you can run:

    sql
    sudo apt-get update sudo apt-get install dante-server
  2. Edit the /etc/socks.conf file to configure the proxy settings. Here's an example configuration file that allows connections from any IP address and requires authentication with a username and password:

    yaml
    logoutput: /var/log/socks.log internal: eth0 port = 1080 external: eth0 method: username # Require username/password authentication user.privileged: root user.notprivileged: nobody user.libwrap: nobody client pass { from: 0.0.0.0/0 to: 0.0.0.0/0 log: connect disconnect error method: username # Require username/password authentication } socksmethod: username # Require username/password authentication

    Note: You should replace eth0 with the name of the network interface that you want to use for the proxy server.

  3. Start the dante server using the command:

    sql
    sudo systemctl start danted.service

    You can also enable the service to start automatically at boot time using the command:

    bash
    sudo systemctl enable danted.service

That's it! Your SOCKS5 proxy should now be up and running on port 1080, and you can configure your applications to use it by specifying the IP address and port of the Linux server as the SOCKS proxy. For example, in a web browser, you can set the SOCKS proxy in the network settings to "127.0.0.1:1080" (assuming you're running the browser on the same machine as the proxy).

Happy hacking!!!