Nov 22 2013

British Airways – #lookup in Piccadilly Circus

Oct 23 2013

Upgrade all perl modules via CPAN

cpan -r
or
perl -MCPAN -e 'CPAN::Shell->install(CPAN::Shell->r)'

Oct 22 2013

CellPipe 7130 – hasło admina

Ściągnięte z wątku: CellPipe 7130 – hasło admina
Wystarczy wyeksportować ustawienia (http://10.0.0.1/backupsettings.html) i przeczytać :).
Hasło w pliku jest zakodowane w base64.
Dekodowanie hasła w linuksie
echo “password” | base64 -d

Sep 6 2013

openfire logs problem

Error: java.io.FileNotFoundException: /logs/debug.log (No such file or directory)

Solution:
edit file “./lib/log4j.xml” and replace “{$openfireHome}” with absolute path to logs

Sep 4 2013

line 42: preg_match(): Compilation failed: unknown option bit(s) set at offset 0

Najprawdopodobniej niezgodność wersji pcre.

Rozwiązanie:
Przeinstalować php ze źródeł.
(można za pomocą Slackbuild-a).

Jun 27 2013

RX Signal Strength dla MikroTik

/interface wireless registration-table print oid

Pozycja strength=.1.3.6.1.4.1.14988.1.1.1.2.1.3.0.12.66.102.90.117.18 daje nam poszukiwany OID – czyli dostęp do wartości siły sygnału odbieranego na danym (numer 0) interfejsie radiowym. Zapamiętujemy ten ciąg znaków.

Polecenie:
snmpget -v 1 -Cf -c password 192.168.100.110 .1.3.6.1.4.1.14988.1.1.1.2.1.3.0.12.66.102.90.117.18

zwróci nam siłę sygnału.

Apr 12 2013

sfc -> przywracanie oryginalnych plików

Polecenie:
sfc /scannow
Skanuje chronione pliki systemowe i zastępuje niepoprawne wersje plików poprawnymi wersjami firmy MIcrosoft.

Mar 14 2013

fail2ban mysql

Dodaj kod do
/usr/share/fail2ban/server/datedetector.py

# AAMMJJ HH:MM:SS
template = DateStrptime()
template.setName("YearMonthDay Hour:Minute:Second")
template.setRegex("\d{2}\d{2}\d{2} \d{2}:\d{2}:\d{2}")
template.setPattern("%y%m%d %H:%M:%S")
self.__templates.append(template)

# cat /etc/fail2ban/filter.d/mysqld.conf

Fail2Ban configuration file
#
# Author: Darel
#

[Definition]
failregex = Access denied for user ‘.*’@’

Dec 10 2012

perl – uninstall module

perl -MCPAN -e shell
install CPANPLUS
exit

perl -MCPANPLUS -e shell
help
[General]
h | ? # display help
q # exit
v # version information
[Search]
a AUTHOR … # search by author(s)
m MODULE … # search by module(s)
f MODULE … # list all releases of a module
o [ MODULE … ] # list installed module(s) that aren’t up to date
w # display the result of your last search again
[Operations]
i MODULE | NUMBER … # install module(s), by name or by search number
i URI | … # install module(s), by URI (ie http://foo.com/X.tgz)
t MODULE | NUMBER … # test module(s), by name or by search number
u MODULE | NUMBER … # uninstall module(s), by name or by search number
d MODULE | NUMBER … # download module(s)
l MODULE | NUMBER … # display detailed information about module(s)
r MODULE | NUMBER … # display README files of module(s)
c MODULE | NUMBER … # check for module report(s) from cpan-testers
z MODULE | NUMBER … # extract module(s) and open command prompt in it
[Local Administration]
b # write a bundle file for your configuration
s program [OPT VALUE] # set program locations for this session
s conf [OPT VALUE] # set config options for this session
s mirrors # show currently selected mirrors

Dec 5 2012

mysql trigger

DELIMITER |
CREATE TRIGGER `klienci_before_insert` BEFORE INSERT ON `klienci`
FOR EACH ROW
set NEW.sha1 = sha1(NEW.klient_id+NEW.time_add);
|

DELIMITER ;