Skip to main content

Cerca

Elementi taggati con: bash


 
#oop #bash #stdlib

 

check_http_ntml – Checkeo Nagios para saber si autenticas contra un windows ntlm


https://mierda.tv/2018/08/09/check_http_ntml-checkeo-nagios-para-saber-si-autenticas-contra-un-windows-ntlm

system #bash #nagios


Es un script basado en este otro: https://exchange.nagios.org/directory/Plugins/Network-Protocols/HTTP/check_http_ntlm/details Se puede adaptar fácil a freeBSD o cualquier distro en la que esté nagios montado. Permite saber si esa web (se le pasa una url) tiene una determinada cadena en el código html que suelta. De esa forma sabemos que hemos autenticado. Se ha de cambiar el […]

 

ZigzagDownLoader

Interfaccia GRAFICA!


Si avvia usando le seguenti opzioni:
-g, --gui
Avvia l'interfaccia grafica nella directory corrente
o in quella eventualmente inserita fra gli argomenti,
attivando automaticamente zdl –daemon come "core",
se ancora non è stato attivato zdl

--path-gui
Prima di avviare zdl, apre una finestra per la selezione
della directory di destinazione, se non è indicata fra
gli argomenti del comando (utile se "zdl –gui" è avviato
da un'icona del desktop o da un'estensione del
browser web, come "External Application Button")

Consiglio di integrare ZDL ai browser web (Firefox, Chrome/Chromium, Opera), usando External Application Button. Dopo aver installato ZDL e l'estensione del browser, impostare le preferenze dell'estensione in questo modo:
- Display name: inserisci quello che vuoi, per esempio ZigzagDownLoader- Executable name: zdl- Arguments: --gui --path-gui [HREF]- Placements: seleziona tutto!
- Icona: puoi usare /usr/local/share/zdl/webui/icon-32x32.png o /usr/local/share/zdl/webui/favicon.png (che però è 16x16)
- per sicurezza, metti anche il check su Quotation

#zdl #bash #linux #cygwin #downloader #axel #wget #aria2 #gnu #free #freesoftware #softwarelibero #zigzag #zigzagdownloader #condividetevelo #sharing #streaming #hosting #filehosting #m3u8 #ffmpeg #desktop #browsers #extensioni #addon

 

¿Qué comando de terminal usas más veces en Linux?


https://www.ochobitshacenunbyte.com/2018/07/04/que-comando-de-terminal-usas-mas-veces-en-linux

#bash #comando de terminal #linux #perl #sysadmin
¿Qué comando de terminal usas más veces en Linux?

 
I decided to work a bit on my #bash prompt at work. At work I share a common home directory through many servers.

People often make a colorful prompt. I decided I wanted to reduce the amount of colors in the prompt and use them only where they help. Thus the text is black (on a bright background). I use blue for separators. I also added '$?' to the prompt to see what the previous command returned: if I use PROMPT_COMMAND (see below) anyway, why not get it for free?

I'm not happy with the way this works now. Note what I had to do with escaping and quoting and even worse: the combination of single and double quoting in the function. This also pollutes the general name-space (if I happen to e.g. use the variable name 'host' in a shell one-liner, my prompt is messed up).

Technically PS1 is the standard shell prompt (yes, there are also PS2, PS3 and PS4) and PROMPT_COMMAND, if set, is run each time before a prompt to set PS1. So this means I run 'git branch' and sed automatically every time I get a shell prompt.

Below is from my $HOME/.bashrc
black="\[\e[0m\]"
blue="\[\e[0;34m\]"
black_e='\\[\\e[0m\\]'
blue_e='\\[\\e[0;34m\\]'
#red="\[\e[0;32m\]"
#green="\[\e[0;32m\]"
#yellow="\[\e[0;33m\]"
#purple="\[\e[0;35m\]"
#l_blue="\[\e[0;36m\]"
user="${black}\\u"
host="${black}\\h"
path="${black}\\w"
tc_git_branch() {
git branch 2>/dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ '"${blue_e}(${black_e}"'\1'"${blue_e})${black_e}"'/'
}
PROMPT_COMMAND='PS1="$? ${blue}[${user}${blue}@${host} ${path}`tc_git_branch`${blue}]\\\$${black} "'

#bash prompt

 

ZigzagProxy

RELEASED the stable version 1.0


Immagine/foto

IN ITALIANO

More powerful and easier to use

  • source code cleaner, structured, clear, stable, easy to maintain;
  • bilingual interface and documentation: automatically, it should recognize the language used in the bash terminal, in Italian or in English for other languages (sorry: I do not know other languages);
  • more direct approach with the remote proxy update service;
  • more intuitive and functional internet connection of commands and programs through the proxies
Now the program is complete and stable.

Go to the main page of ZigzagProxy, to discover its potential:
https://www.inventati.org/zoninoz/html/index.php?module=text&aid=67

Project page published on Savannah/GNU:
https://savannah.nongnu.org/projects/zproxy

#zproxy #zigzag #zigzagproxy #ip changer #bash #gnu #linux #proxy #privacy #italian #condividetevelo #freesoftware #free #freedom

 
Immagine/foto

Chuck Norris te dice que hackees en #GNU #Linux desde la línea de comandos | victorhckinthefreeworld


https://victorhckinthefreeworld.com/2018/06/01/chuck-norris-te-dice-que-hackees-en-linux-desde-la-linea-de-comandos/

En este artículo hackearemos con la línea de comandos de GNU/Linux, con algunas utilidades para la línea de comandos, y también “for the lulz” lo haremos con chistes sobre Chuck Norris.

#bash #hacking

 
#linux #bash #coutils #progress

 
Super impressed by ArgBash, a library for generating code to parse command line arguments in #bash. Well written, easy to use, and generates very correct code that handles nearly any kind of argument your script might need. Came in handy today.


@Gruppo Linux Como

 

Because finding the #GUID of a #Diaspora post sucks:



````
#!/bin/bash

[[ -z "${1}" ]] && {
echo 'usage: dlink ' >&2
exit 1
}
guid=$(
curl -s "${1}.json" \
| jq .guid \
| tr -d '"'
)
printf '/posts/%s\n' "${guid}"
:

eof



````

The syntax highlighting sucks, too…

Caveat: no error checking.

[ #JSON, #CLI, #bash, #useatyourownperil ]

 

Because finding the #GUID of a #Diaspora post sucks:



````
#!/bin/bash

[[ -z "${1}" ]] && {
echo 'usage: dlink ' >&2
exit 1
}
guid=$(
curl -s "${1}.json" \
| jq .guid \
| tr -d '"'
)
printf '/posts/%s\n' "${guid}"
:

eof



````

The syntax highlighting sucks, too…

Caveat: no error checking.

[ #JSON, #CLI, #bash, #useatyourownperil ]

 
Immagine/foto

Pon a prueba tus conocimientos sobre Bash | Cyberhadeshttp://www.cyberhades.com/2017/02/06/pon-a-prueba-tus-conocimientos-sobre-bash/

En cmdchallenge.com podemos encontrar, como su nombre indica, varios retos que debemos resolver usando comandos de Bash.

#bash #cmdhttp://www.cyberhades.com/2017/02/06/pon-a-prueba-tus-conocimientos-sobre-bash/
#bash #cmd

 
A nice little shell trick:

You are all probably familiar with "here documents":
cat <<EOF
line 1
line 2
EOF

This will consider the lines of text from the standard input as input for cat. It is terminated by the special marker that comes after the '<<'. This is handy, for instance, to create text files:
cat <<THEEND >newfile
a line
and another
$variables will be expanded
THEEND

I needed to write an internal document in my company. In it there were instructions for creating a certain configuration file. I wanted to be as user-friendly as possible. I initially wrote just the content of the file and its full path. But later wanted to improve the instructions. Thus wanted to use 'here documents'. But what if the users know their way already (and may have better ideas on the file name, etc.), how do I avoid getting in the way?

The first step is obvious. That file has '#' as a comment marker. Thus I wrote:

# cat <<EOF >/the/full/path
line 1
line 2
EOF

Note the last empty line. When giving instructions to copy and paste to a terminal, you should leave a final empty line for the final press of Enter.

If someone accidentally copies the first line as well, it is still a valid configuration file. But then I thought: Why not make the marker a comment line as well?

# cat <<'#EOF' >/the/full/path
line 1
line 2
#EOF

Done.

#bash #linux #scripts #shell

 
Je viens de créer un dépôt pour mes scripts buku : https://github.com/polo2ro/buku-scripts

Buku: Gestionnaire de signets en ligne de commande pour Linux



https://websetnet.com/fr/buku-command-line-bookmark-manager-linux/

#buku #bash #linux