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 characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
my $passcnt = shift || 1; # how much passwords to generate | |
my $passlen = shift || 8; # password length | |
my @alph = ('A'..'Z','a'..'z',0..9,'%','*'); | |
my $alph_size = scalar(@alph); | |
srand($$); |
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 characters
#!/bin/bash | |
# | |
# Init file for Ping server daemon | |
# | |
# chkconfig: 2345 55 25 | |
# description: Ping server daemon | |
# | |
# processname: ping | |
# pidfile: /var/run/ping.pid |
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 characters
#!/bin/sh | |
# ES3528 | |
TFTP_SERVER=${TFTP_SERVER:-"10.X.X.X"} | |
RW_COMMUNITY=${RW_COMMUNITY:-"private"} | |
PATH=/bin:/usr/bin:/usr/local/bin | |
[ -s $1 ] || { echo "No such file or file is empty: $1" >&2; exit 1; } | |
for h in `cat $1` |
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 characters
#!/bin/sh | |
# DES-35XX, DES-38XX, DES-32XX | |
TFTP_SERVER=10.X.X.X | |
RW_COMMUNITY=private | |
PATH=/bin:/usr/bin:/usr/local/bin | |
[ -s $1 ] || { echo "No such file or file is empty: $1"; exit 1; } | |
for h in `cat $1` |
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 characters
[root@virtual-pbx ~]# mkdir -p /storage/10.0.0.16 | |
[root@virtual-pbx ~]# cat /etc/auto.master | egrep -v '^(#|$)' | |
/storage /etc/auto.smb.top | |
[root@virtual-pbx ~]# cat /etc/auto.smb.top | egrep -v '^(#|$)' | |
* -fstype=autofs,-Dhost=& file:/etc/auto.smb.sub | |
[root@virtual-pbx ~]# cat /etc/auto.smb.sub | egrep -v '^(#|$)' | |
* -fstype=cifs,credentials=/root/cifs.conf,uid=0,gid=0 ://10.0.0.16/& | |
[root@virtual-pbx ~]# cat /root/cifs.conf | |
username=admin | |
password=mypassword |
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 characters
# smbclient -U admin -L //10.0.0.16/ | |
Password: | |
Domain=[DISKSTATION] OS=[Unix] Server=[Samba 3.2.8] | |
Sharename Type Comment | |
--------- ---- ------- | |
home Disk home | |
homes Disk user home | |
public Disk System default share | |
IPC$ IPC IPC Service () |
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 characters
#!/bin/sh | |
PATH=/bin:/usr/bin:/sbin:/usr/sbin | |
PIDFILE=${PIDFILE:-"/var/run/mv2smb.pid"} | |
LOCAL_DIR=${LOCAL_DIR:-"/var/lib/asterisk/records"} | |
FTP_HOST=${FTP_HOST:-""} | |
FTP_USER=${FTP_USER:-"admin"} | |
FTP_PASS=${FTP_PASS:-""} | |
REMOTE_DIR=${REMOTE_DIR:-"/homes"} |
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 characters
#!/bin/sh | |
PATH=/bin:/usr/bin:/sbin:/usr/sbin | |
PIDFILE=${PIDFILE:-"/var/run/mv2smb.pid"} | |
LOCAL_DIR=${LOCAL_DIR:-"/var/lib/asterisk/records"} | |
REMOTE_SMB=${REMOTE_SMB:-"//10.1.1.1/homes"} | |
REMOTE_SMB_AUTH=${REMOTE_SMB_AUTH:-"/path/to/mv2smb.conf"} | |
REMOTE_DIR=${REMOTE_DIR:-""} | |
if [ -f $PIDFILE ]; then |
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 characters
#!/bin/sh | |
# ES4524D | |
TFTP_SERVER=${TFTP_SERVER:-""} | |
RW_COMMUNITY=${RW_COMMUNITY:-"private"} | |
PATH=/bin:/usr/bin:/usr/local/bin | |
TFTP_SERVER_HEX=`perl -MSocket -le 'print unpack("H*", inet_aton(shift))' $TFTP_SERVER` |
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 characters
null@ubuntu:~/t$ perl -le '$_ = "test"; print y===c' | |
4 | |
null@ubuntu:~/t$ perl -MO=Deparse -le '$_ = "test"; print y===c' | |
BEGIN { $/ = "\n"; $\ = "\n"; } | |
$_ = 'test'; | |
print tr//\000-\377/c; | |
-e syntax OK | |
null@ubuntu:~/t$ |