This file contains 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 characters
#!/usr/bin/python3 | |
import socket | |
from elasticsearch import Elasticsearch, exceptions as es_exceptions, Transport as es_transport, ConnectionPool as es_connection_pool | |
from opensearchpy import OpenSearch, exceptions as os_exceptions, Transport as os_transport, ConnectionPool as os_connection_pool | |
import logging | |
from urllib3.connection import HTTPConnection | |
# Configuration de la journalisation | |
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') |
This file contains 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 characters
use Mojolicious::Lite; | |
use WebService::Vtiger; | |
app->config(hypnotoad => {listen => ['http://*:3002'], | |
pid_file => '/tmp/ypvtast.pid' }); | |
app->attr(vt => sub { | |
my $c = shift; |
This file contains 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 characters
#!/usr/bin/perl -w | |
# IFTTT Notification for nagios, | |
# Largely inspired from the Notify My Andoid perl code | |
use strict; | |
use LWP::UserAgent; | |
use Getopt::Long; | |
use Pod::Usage; | |
# Grab our options. |
This file contains 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 characters
#!/usr/bin/perl | |
# mail2fax_free.pl stefb69 | |
# | |
use strict; | |
use warnings; | |
use WWW::Mechanize; | |
use MIME::Parser; | |
my $baseurl = "https://subscribe.free.fr"; | |
my $username = "fbxXXXusername"; |
This file contains 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 characters
SOURCE="/" | |
DESTLABEL="backup-disk" | |
SMOUNTDIR=/mnt/source | |
DMOUNTDIR=/mnt/destination | |
EXCLUDE=/etc/save.exclude | |
[email protected] | |
DBPW="password" | |
RC=0 |
This file contains 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 characters
#!/bin/sh | |
# mail2fax reloaded | |
# modified version working 100% by stefb (for europe) | |
# This script allows you to send faxes through your HylaFAX box. | |
# It uses mpack to strip out email attachments and sendfax to do | |
# the fax delivery. | |
### Temporary dir stuff | |
RANDOMFAX=/tmp/faxtmp.$(dd if=/dev/urandom count=1 2> /dev/null | cksum | cut -f1 -d" ") |
This file contains 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 characters
function get_attachment_id_from_src ($src) { | |
global $wpdb; | |
$reg = "/(-e\d{13})?(-[0-9]+x[0-9]+)?\.(jpg|jpeg|png|gif)$/i"; | |
$src1 = preg_replace($reg,'',$src); | |
if($src1 != $src){ | |
$ext = pathinfo($src, PATHINFO_EXTENSION); | |
$src = $src1 . '.' .$ext; | |
} | |
$query = "SELECT ID FROM {$wpdb->posts} WHERE guid='$src'"; | |
$id = $wpdb->get_var($query); |
This file contains 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 characters
#Example usage | |
id=SASL_003 | |
HIT_dnsbls >= 2 | |
sasl_username =~ /^(.+)$/ | |
client_country_code !~ /^(FR|IL|US|UK|CA|BE|CH|IT)$/ | |
action = rcpt(sasl_username/3/86400/REJECT your is ip listed as trojaned, only 3 recipient per DAY for $$sasl_username) |
This file contains 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 characters
#!/usr/bin/perl | |
package LDAPAuth; | |
use nginx; | |
use Authen::Simple::LDAP; | |
use MIME::Base64; | |
sub handler { | |
my $r = shift; |