Web 1
Snippets...Heckling the lusers
Snippets...Life Notes and Windows tips from the Olde Days
Snippets...More L.N. and W. T. F. T. O. D., Partte Twoe

% man spinthewheel 

          spinthewheel - spins the wheel after drawing it. 

          int spinthewheel (wheel, direction) 
          wheel *wheel; 
          int direction; 

          spinthewheel spins the wheel after drawing it.  The first 
          argument is a pointer to the wheel to spin; the second is 
          the direction in which to spin the wheel, and must be 
          assigned one of the following: 

          LEFT  - spin the wheel left 
          RIGHT - spin the wheel right 

     See Also 
          drawthewheel(S), rotatethewheel(S) 

          The spectral properties of spinthewheel are limited. 
          rotatethewheel provides a much better, more elaborate, 
          wheel spinner. 

The research group of IBM Corp. has developed an auditing tool that can 
monitor 802.11 wireless networks and collect security-related 
information, allowing system administrators to take proper actions to 
improve network security (// The 
Wireless Security Auditor, a prototype application running on Linux, 
enables network administrators to find vulnerable access points by 
monitoring and analyzing them in real-time and ensuring they are either 
corrected or removed so they no longer pose a security threat to the 
company network.

One person reports that disabling "BIOS shadow" (system & VIDEO), helped for him. As 
Linux doesn't 
use the BIOS, shadowing it doesn't help. Some computers may even give you 384k of extra 
RAM if 
you disable the shadowing. Just disable it, and see what happens. -- Philippe d'Offay 

dd if=/dev/random of=testfile bs=1024k count=*

dd if=/dev/HARD_DISK of=/dev/null bs=1024k count=MEGS

Change HARD_DISK to "hda" to the name of your harddisk (e.g. hda or sda. Or use "df ."). 
the MEGS to the number of megabytes of main memory that you have. This will cause the 
several megabytes of your harddisk to be read from disk, forcing the C source files and the 
binary to be reread from disk the next time you run it. Now type make again.

dd if=/dev/zero of=/tmp/lfs.disk bs=1024 count=768000
mke2fs /tmp/lfs.disk
We don't have a partition to mount. But we've got a file. Mounting a file goes
via the so-called "loop device". Now it is vitally important to check your 
actual kernel configuration for having the "CONFIG_BLK_DEV_LOOP" (Block Devices
-> Loop Device in "make [x|menu]config"). You can also do this through the 

	cat /usr/src/linux/.config | grep CONFIG_BLK_DEV_LOOP

If it says something like "CONFIG_BLK_DEV_LOOP=m" or "CONFIG_BLK_DEV_LOOP=y", 
then everything is fine and you can skip the next few steps. If it says some-
thing like "# CONFIG_BLK_DEV_LOOP is not set" then you have to compile a module
enabling the usage of loop devices for your kernel. That's

	sed s/\#\ CONFIG_BLK_DEV_LOOP\ is\ not\ set/CONFIG_BLK_DEV_LOOP=m/ \
        /usr/src/linux/.config > conf && mv conf /usr/src/linux/.config &&
        cd /usr/src/linux && make modules modules_install && insmod loop

Now that you've enabled the usage of loop devices in your kernel, you can get 
on mounting the lfs.disk file:

	mount /tmp/lfs.disk /mnt/lfs -o loop

Mount the main partition to "/mnt" in the chroot'ed environment suggesting your 
main partition is /dev/hda1, otherwise fill in what is necessary:

	mount /dev/hda1 /mnt

You'll have to get the main partition entirely clean from everything that is not

	for dirname in `ls /mnt | sed s/tmp//`; do rm -r $dirname; done &&
	for filename in `ls /mnt/tmp | sed s/lfs.disk//`; do rm $filename; done

Now it's clean for copying the LFS system. Everything but the /mnt directory,
to which the device that we are filling with LFS is mounted and the directory
/proc, in which are dynamic files written by the kernel.

	for dirname in `ls / | sed s/mnt// | sed s/proc//`; do 
	cp -a $dirname /mnt; done

Now the LFS is on your primary partition logout of the chroot'ed environment 
into the new system. Now you can perform lilo and this stuff.

Keeping in mind that an ISO is an exact image of the CD itself in a file, and linux's devices 
are but 
extensions to the filesystem, surely we should be able to mount an iso and check it out 
before the 
more permanent burn?
"All you need to use is the loopback device like this:
  mount /home/clive/isos/MyNewImage.iso /mnt/cdrom -o loop=/dev/loop3

0 1 * * * find /tmp -atime +3 -exec ls -l {} \;

This entry tells cron to fire off at 1:00 a.m. every day, execute the find program to check in 
the /tmp 
directory for any files that haven't been accessed in more than 3 days, and list them by 
executing the 
ls -l command. The {} tells exec to do this for every file found. The \ just tells exec that its 
work is 

if the superblock is gone, fetch a duplicate with the e2fsck -f -b /dev/hda1 command. 

GOBBLES@LABSLACK:/hacking/gzip$ /bin/gzip `perl -e 'print "A" x 2048'`

Next, tar the contents of the directory using the create (i.e., the "c" 
Option). Pipe the output to a tar extract (i.e., the "x" option) 
command. The tar extract should be enclosed in parentheses and contain 
two parts: 1) the cd part, which positions you in the destination 
directory, and 2) the extract part, which extracts the files and 
supplies excessive output in the process (due to the verbose, "v", 

    % tar cBf - * | (cd todir; tar xvpBf -)

12 * * * * find / -type d -name core -exec rm {} \;

One of the best uses of find that I have discovered is its ability to 
locate a string when you've no idea where it may be referenced. For 
example, if I need to locate and expunge all references to one customer 
in a directory before shipping off a tarball of files to another 
customer, I might use a command like this: 

    % find . -type f -exec grep Acme {} \; -print
    This proposal was prepared for Acme Corporation of
    <TITLE>Acme Corp</TITLE>

I've found that, by putting the print command at the end, this find 
command only lists the names of files that contain the searched for 

Since I suspected this was the problem, it was pretty easy to figure 
out where the rogue machine was.  I simply pinged all the local 
machines ('nmap -sP' will do this quickly) and then 
checked the ARP table ('arp -an') for duplicates.  I actually used the 
following very lame command to show me duplicate entries:

    $ arp -an| awk '{print $4}'| sort | uniq -c | grep -v ' 1 '
         5 F8:F0:11:15:34:51
        88 <incomplete>

Then I simply looked at the IP addresses used by that ethernet address 
in 'arp -an' output, ignoring those that were blatantly poisoned (such 
as the router) and looked up the remaining address in DNS to see which 
machine it was.  It was the desktop machine for one of the students in 
the lab.  I sent all the info I had to the school's IT security folks; 
later that day they visited the student, and not to offer him a free 
pizza.  Of course, our cleanup had only just begun.

 IN spend the majority of your time in an 8X10
     cell. AT WORK... you spend the majority of your time in a 6X8

     IN get three meals a day. AT only get
     a break for one meal and you pay for it.

     IN get time off for good behavior. AT
     get more work for good behavior.

     IN PRISON...the guard locks and unlocks all the doors for you.
     AT must carry around a security card and open all
     the doors for yourself.

     IN can watch TV and play games. AT get
     fired for watching TV and playing games.

     IN get your own toilet. AT have to
     share with some idiot who pees on the seat.

     IN PRISON...they allow your family and friends to visit. AT can't even speak to your family.

     IN PRISON...all expenses are paid by the taxpayers with no
     work required. AT get to pay all the expenses to go
     to work and then they deduct taxes from your salary to pay for

     IN spend most of your life inside bars wanting to
     get out. AT spend most of your time wanting to get
     out and go inside bars.

     IN must deal with sadistic wardens. AT
     WORK...they are called managers.

    (       (                                                                         _______
     ))     ))   .-"There's always time for a good cup of coffee"-.                   >====<--.
   C|~~|  C|~~| `----------------------------------------------------------- '       |    = |-'
   `---'  `---'  `----------------------------------------------------------- '      `--------'

Comments? Good luck!

Home  Privacy Policy  Terms of Use