Donnerstag, 30. April 2009

"Phreaking wasn't about getting free calls, it was about _how_ to get them, _how_ to make them. It was about the process of _access_. Legend had it ..

that the first phreaks were blind kids who wistled free calls, tuning in to the sounds of the first vast machines and places they could never see. The phreak was to discover and master invisible electronic worlds.
Phreaks routinely complained about evil, monopolistir Ma Bell, but to understand the machine, the network, the telephone system - these were the true goals of the phreaks, a journey that would eventually lead to a better understanding of the world. The first computer hackers brought light to a closed world. Early computers were giant, cumbersome machines tended by priesthood of technicians who processed punch cards, maintained massive air-cooling systems, and replaced the occasional melted vacuum tube.
The first hackers challenged the authority of priesthood and began nudging the computers to life, teaching them to play chess, Ping-Pong, even musir. The cleverly removed superfluous commands so computers would need fewer cards. Hackers at MIT toured telephone central offices and pumped switchmen and engineers for the secrets that would enable them to ride the telephone network for free. They studied lock picking to coax open university doors to examine the computers up close (p11-12)

Freitag, 24. April 2009

abbr: AUI - Attachment User Interface - in ethernet

ethernet (802.3) was standarized in 1978 by Xerox, Intel and DEC

type ls

/ —move Back/Forward in the current window/tab's history, respectively Move between tabs using these keystrokes which may also be familiar to tabbing Vimmers. gt/ — go to the next tab gT/ — go to the previous tab g0/g$ — go to the first/last tab d — close the active tab (delete the buffer)

secure mount points: nodev, nesuid,ro,noexec. Noexec is of little use, because it can be easily bypassed by using /lib/ld-linux.so to execute binaries

chroot will not run on such system, because /dev/null and /dev/log

Both 802.11a and 802.11g support speeds up to 54Mbps. Primary difference is supported spectrum. 802.11a operates in 5.0GHz while 802.11g in 2.4GHz.

freqency assignments for 2.4GHz Band: 2.412 2.417 2.422 2.427 2.232 2.437 2.442 2.447 2.452 2.457 2.462 2.467 2.472

If you have to use Windows when scanning wireless networks disable TCP/IP stack, on Windows CE set nonstandard IP and subnet mask and gateway.

Dienstag, 21. April 2009

~/.xsession is for XDM, ~/.xinitrc is for startx.

I am sitting in front of apollo and launch programs on zeus without SSH: xhost +zeus; export DISPLAY=apollo:0.0.; after you are done type xhost -zeus.

SSH can forward X connections and there's no need for the above steps

GDM: to enable network connections change DisallowTCP=true to DisallowTCP=false
KDM or XDM: both on settings in the Xservers file. Look for a line that begins with :0. This line contains a command that KDM or XDM uses to launch the X server. If this line contains the string -nolisten tcp, remove that string from the line.
X launched from text-mode login: if you log in using text mode and type startx to launch X, you may need to modify the startx script itself, which is usually stored in /usr/bin. Search this script for a string -nolisten tcp. Chances are this string will appear in a variable assignment (such as defaultserverargs) or possibly in a direct call to the X server program. Get rid of the string.
SSH: /etc/ssh_config set ForwardX11 to yes, /etc/sshd_config set X11Forwarding to yes.

X clients are the programs that users run - xterm, xfontsel, Kmail, OpenOffice.org etc.

Sonntag, 19. April 2009

Samstag, 18. April 2009

Irrespective which start script you use (.xsession, .xinitrc or .Xclients) it must be executable. chmod u+x .xinitrc

[ file1 -ef file2 ] file 1 and file2 have the same inode and device numbers, -nt newer than, -ot older than man test

[ integer1 -ne integer2 ] integer1 not equal integer2

[ -L file ] checks whether file is a symbolic link

-r the user read permissions, -w the user has write permissions, -x the user has execute permissions, -s the size is greater than 0, -z is null

test -f badfile; echo $? or [ -f badfile ]; echo $? -d is a directory, -e exists, -f regular file, -n is not null

cat << theend

2>&1 -- redirect stderr to the same file to which stdout is redirected

ls file1 file2 file3 1>>ls.out 2>>ls.err

SCSI (X3.131-1986), now usually called SCSI-1. This standard has now been withdrawn. Up to 8 devices on a cable, passive termination, 8bits/ch 5MB/sec

The SCSI standard was designed for disks, but is very flexible and was used for other devices, notably scanners and slower devices such as Zip.
FCconnection used a 50 connector cable, originally with Centronics connector, but later with a 50-pin D-shell connector, similal to a DB-25 RS-232 serial connector.

RH: sndconfig

lsmod|egrep '(snd)|(Module)'

cat /proc/modules

MIDI port (MPU-401). Many sound cards have an interface to attach MIDI (Musical Instrument Digital Interface) device. MPU-401 ISA interface 0200-020F

CTS - clear to send, RTS - ready to send

dial connections: kppp, wvdial (command line), system-config-network

UART is a Universal Asynchronous Receiver Transmitter

setserial: the -G option prints the output in a format suitable for use in setting parameters with serial.

The keyboard/mouse controllel uses ports 0060 and 0064 for legacy (PS2) keyboards and mice.

If your system has legacy floppy disk controller, it will use ports 3F0-3F7

EPP stands for Enhanced Parallel port and is designed for devices such as CD-ROMs and tape drives which require large amnts of i to flow in either way

ECP stands for Enhanced capabilites port and is designed for use with printers.

Standard parallel port assignments: LPT1 378-37F 7; LPT2 278-27F 5; LP* 3BC-3BE _.

Many systems do not use interrupts for printers, so the IRQ may or may not actually be used.
It is not also uncommon to share IRQs for printing and also share IRQ 7 with a sound card (Sound Blaster compatible)
ECP stands for Enhanced capabilites port and is designed for use with printers.
EPP stands for Enhanced Parallel port and is designed for devices such as CD-ROMs and tape drives which require large amounts of information to flow in either direction.

standard IO and IRQ for serial ports: COM1 3F-3FF 4 ; COM2 2F8-2FF 3; COM3 3E8-3EF 4; COM4 2E8-2EF 3

cat /var/log/messages.log|grep "[hs]d[a-z]"

Dienstag, 14. April 2009

gpg -c letter.txt ----encrypt with a prompted password instead of your key. To read: gpg letter,gpg

f

gpg -es letter.txt receiver -u my_identity ----sign and then encrypt

g

gpg -sta message.txt -----use CLEARSIG feature: do not compress, apply signature in printable form in the end of the file.

gpg -s letter.txt -u Sergey

.

gpg -e letter.txt Alice Bob Carl

mysql: mysql -u test

mysql: select version();

mysqladmin -u root -p 'new_password'

" "- weak quoting, ' ' - strong quoting

$VISUAL is a full-screen editor, and $EDITOR - a line editor. The shell first tries $VISUAL, then $EDITOR

"Block mode" in terminalsthe characters you type are temporarily retained in the terminal memory (and may possibly be edited by a built-in editor at

"Block mode" in terminalsthe characters you type are temporarily retained in the terminal memory (and may possibly be edited by a built-in editor at the terminal). Then when the send key is pressed, a block of characters (sometimes just a line of characters) is send to the computer all at once. Block mode is not supported in Linux.

VDT - video display terminal

SQL does not assign unique identifiers to rows, so it is possible to have several completely identical rows in a table

SCTP (Stream Control Transmission Protocol) has higher reliability than TCP, and at the same time lower overhead from protocol headers.

RFC 3268 - An Introduction to the Stream Control Transmission Protocol
RFC 2960 - Stream Control Transmission Protocol

less and more is the same program in OpenBSD, and behaves differently depending on which way it was called

PnP: there is no one program that would handle PnP in Linux. Each device driver has its own PnP, using sw supplied by the kernel. The BIOS does PnP wh

en a PC is first powered up.

find /etc -name '*e*' -size +1k -size -1m

The wildcard must be enclosed in the quotes in order to protect it from expansion by the shell.

GIMP: image ->duplicate CTRL-D

The extent size is the same for all volumes in the volume group. The volume group maps the logical extents to physical extents.

LVM: Within a physical volume extents are refered to as physical extents, within a logical volume - as logical extents. The extent size is the same for all volumes in the volume group. The volume group maps the logical extents to physical extents.

man hier

turn off the WEP key to accept unencrypted packets when scanning: iwconfig wlan0 key off

set essid to "off" or "any" when scanning for 802.11 networks, e.g. iwconfig wlan0 essid off

make a pdf of a manual page: man -t iwconfig - > iwconfig.pdf

vim: i_CTRL-A --insert previously inserted text, i_CTRL-@ - insert previously inserted text and stop insert

GIMP: you can tear-off any context menu

Montag, 13. April 2009

x:5:once:/bin/su user0 -c "/bin/bash --login -c startx >/dev/null 2>&1"

Starting X as preferred user without logging in

A way of circumventing display managers and boot straight into preferred window manager or desktop environment is the following.
In /etc/inittab change:

id:3:initdefault:

[...]

x:5:respawn:/usr/bin/xdm -nodaemon

to

id:5:initdefault:

[...]

x:5:once:/bin/su PREFERED_USER -l -c "/bin/bash --login -c startx >/dev/null 2>&1"

Donnerstag, 9. April 2009

whatismyip: curl -s myip.dk |grep ‘”Box”‘ | egrep -o ‘[0-9.]+’

Finding out your PC’s IP in Linux is a simple matter of typing ifconfig in a Terminal shell. But what if you’re behind a router? Thanks to a simple shell script, you can display your IP in the command line by simply invoking the whatismyip command.

#!/bin/bash
curl -s myip.dk |grep ‘”Box”‘ | egrep -o ‘[0-9.]+’

sudo chmod +x /usr/bin/whatismyip

rankmirrors - choose the best mirror

Archlinux:
cd /etc/pacman.d/; cp mirrorlist mirrorlist_backup; rankmirrors -n 6 mirrorlist_backup>mirrorlist
Or simply manually put the best servers on top of mirrorlist.

Цитата #9601 de 3txt_iBash.Org.Ru xxx: Вчера я наконец понял, зачем в тюнингованных девятках ставят кучу датчиков на панель! xxx: Это все дебагеры

choosing secure password

The goal is to create easy to remember, convertible and secure passwords, so that you can be sure, that only YOU control what goes into and comes out of your different accounts.

This is an approach, you should try: Build passwords using two parts:

* the strong static part with at least 8 characters and
* the changeable part to remember the purpose of the usage


Let’s start with the Static Part:

You can make a password much more secure by mixing different types of characters. Use some uppercase letters along with lowercase letters, numbers and even special characters such as '!' or ';'. Very important is that you have to find a good way to remember it. A good way to do this is to choose the first letters of a sentence that you will remember.

e.g.

Every morning at 7; I kiss my Honey! Ema7;IkmH!
Brayn Adams - Back in the summer of '69 BA-Bitso69


The Changeable Part:

Try to find short terms for the different uses.

e.g.

Hotmail Account hot1 or hot2
Ebay Account ebay or ey
Bank Account
city or cy
My Blog
blog or bg



That’s it! “Glue” both parts together and you have nice passwords for different purposes that you can easily remember.

My bank account: cyEma7;IkmH!
My mail password: hot1Ema7;IkmH!

pacman -Qe (lists explicitely installed packages)

~/.Xresources: *dpi:75 XTerm*background: black XTerm*foreground: green

*dpi:75
XTerm*background: black
XTerm*foreground: green
XTerm*visualBell: false

Mittwoch, 8. April 2009

vim windows: z{height} - change height of the window CTRL-W _ - maximize window CTRL-W CTRL-W - change window

z{height} - change height of the window
CTRL-W _ - maximize window
CTRL-W CTRL-W - change window

vim: zt, z., zb, z{height}

zt - show current line in the center of the screen
z. - ~ in the center
zb - ~ in the bottom

setting dvorak

loadkeys dvorak/dvorak

To make this change permanent, set

KEYMAP=dvorak/dvorak

in /etc/rc.conf.

To convert to dvorak in X, type

setxkbmap dvorak

To make this change permanent, set

Option "XkbLayout" "dvorak"

in the keyboard "InputDevice" section of /etc/X11/XF86Config or /etc/X11/xorg.conf.

If you are using the input hotplugging (evdev) you'll need to make the following changes:

cp /usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi /etc/hal/fdi/policy/

Edit the resulting file and update the input.xkb.variant entry to look like:

dvorak

Lastly you'll need to set the keyboard model to evdev

setxkbmap -model evdev

/usr/bin/setleds -D +num (sets numlock on)

in rc.local:
for vc in /dev/vc/{1..3}; do /usr/bin/setleds -D +num < "$vc"; done

recovering lost partition table with gpart

Today when I switched on my Acer Aspire One (which has Archlinux installed) I was particularly pleased to discover that the SD had no valid partition table.
I was pleased because it was an gift for me to learn something new.
Recovery proved to be extremely simple:
gpart -W /dev/mmcblk0 /dev/mmcblk0

Montag, 6. April 2009

в Linux любой зомби, потерявший родителя, автоматически усыновляется PID=1 (init) и потом через него может быть убит.

MooSE(Work): трогательные строки из документации по внутреннему устройству Linux:
MooSE(Work): "в Linux любой зомби, потерявший родителя, автоматически усыновляется PID=1 (init) и потом через него может быть убит."
MooSE(Work): верх гуманизма: благотворитель init усыновляет осиротевших зомби...

Sonntag, 5. April 2009

I printed coreutils manual -221pages, and found out that most programs that accept long options recognize unambiguous abbreviations of these options.

for example:
rmdir --ignore-fail-on-none-empty
can be entered simply as rmdir --i
But this is only because there was no other option starting with 'i'. Let us look what would happen if there was. e.g. there are --verbose and --version options. If I enter
rmdir --v
I get
rmdir: option '--v' is ambiguous.

timeout(1)

Sometimes we need to test configuration of some process. And sometimes once we start the process we loose control over the system.
That is the case of Xorg. How can we test configuration?
The problem that I faced was that the keyboard in X did not work.
Solution is simple: timeout seconds command
In the case of xinit (to kill it it after 10sec)it would be:
timeout 10 xinit

Suffixes for time can be used: m, h, d.

Mittwoch, 1. April 2009

Если символ входит в таблицу ANSI, то можно его ввести так:
а) Проверьте — горит ли Num Lock (если нет — включите).
б) Нажмите и удерживайте клавишу Alt.
в) На правой цифровой («телефонной») клавиатуре наберите ANSI-код символа (если он начинается с нуля, то его тоже нужно вводить).
г) Отпустите Alt — это приведёт к вставке нужного символа в текущее текстовое поле.

Вот некоторые из полезных кодов (не забывайте — Alt+Код):

* 0150 – (тире)
* 0151 — (длинное тире)
* 0133 … (многоточие)
* 0171 «
* 0187 »
* 0170 Є
* 0160 (неразрывный пробел)
* 0149 •
* 0176 ° (знак градуса)
* 0169 ©
* 0174 ®
* 0177 ±
* 0167 §
* 0134 †
* 0135 ‡
* 0136 €
* 0137 ‹
* 0155 ›
* 0153 ™ (торговая марка)