CUPS useful commands

to add a MFC-8220 printer to CUPS v1.1.20 connected to a linksys print server via commandline:

#/usr/sbin/lpadmin -p xxxbrotherA -m BR8220_2_GPL.ppd -v lpd://192.168.xxx.5/P1 -E
***replace “xxx” with appropriate subnet
***get the PPD from openprinting.org http://openprinting.org/foomatic-db/db/source/PPD/Brother/BR8220_2_GPL.ppd

to list all currently installed printers:

# lpstat -v

to list all supported models:

# lpinfo -m

to test a PPD file for validity and compatility:

# cupstestppd /path/to/ppd

ndiswrapper with linux kernel 2.6.29.2

made the all too fatal yet all to common mistake of updating to slackware current fully and lost the ability to compile some of my favorite (virtualbox) and most used (ndiswrapper) software due too stricter code residing in the kernel. so all that aside, i HAVE to use ndiswrapper with mylow power lp-phy usb-like mini pci card…it sucks in short.

so with ndiswrapper not compiling i was giving up hope until i found this post –> read through to the last post by slh.. in it he shows a patch fix (which is pretty striaght forward to apply manually) and i have included below:

fix C syntax error and field name in conditional netdev ops struct,
triggering on kernel >= 2.6.29 and CONFIG_NET_POLL_CONTROLLER=y.

— a/driver/wrapndis.c
+++ b/driver/wrapndis.c
@@ -1744,7 +1744,7 @@ static const struct net_device_ops ndis_
.ndo_set_mac_address = ndis_set_mac_address,
.ndo_get_stats = ndis_get_stats,
#ifdef CONFIG_NET_POLL_CONTROLLER
– .poll_controller = ndis_poll_controller;
+ .ndo_poll_controller = ndis_poll_controller,
#endif
};
#endif

gmail through sendmail

first read this for a base understanding of the whys and hows

then read this for more specific instructions

i ignored everything about fetchmail as i was only interested in sending abilities, but carrying the step further should be no problem. i also recoomend building a secondary gmail account just in case the hashed file was to be compromised

metasploit and network exploration

it began as just looking into the toolsets used by the now-infamous BackTrack – a slax based live cd used for wireless network penetration testing – but knowing it was slackware based was all i needed to know that toolkits exist to add this functionality to my laptop. and the digging began….i’m only going to post findings and tools incrementally as i gain enough knowledge of them to answer at least the basic install and use questions.

and so i was brought to metasploit; an exploitation framework (probably for beginners like myself) used for penetration testing of workstations, servers, and network protocols. i found the installtion to be pretty straightforward, despite the fact that where i was looking the documentation was lacking (they probably assume that given a set of requirements the user figures out how to get there themselves).

for my vanilla slack-current, i was required to add in rubygems and then install rails:

#gem install -v=1.2.2 rails

at this point i unpacked the framework and launched the web-console (yes…pitiful to use the gui, but it was what i chose to do). i suggest getting to this point and seeing where the web interface takes you ;-)

javascript form validation library

when it comes to form validation i get frustrated too quickly to sit there and reinvent the wheel every time. my solution has been made more simple than i would have asked: TMT Validation Library from www.massimocorner.com

so easy to install.

link to libs

add call into form

define types of validation on inputs.

i would reccomend this to a friend

cron into dsl embedded

alright starts with the premise that you have the most recent version of cron.dsl from the mydsl repository.

scp that to the destination machine:
# scp /home/ben/documents/wess/zmMonitors/cron30.dsl dsl@192.168.11.201:/home/dsl/

ssh to the destination machine and do the following
# sudo mydsl-load cron.dsl
# export VISUAL=vi
# sudo crontab -e
****at this point make your cron entries…helpful link lazy man’s cron generator by robert plank*****

verify the cronjob
# sudo crontab -l

in my particualr case i rebooted while i was there…been having memory issues (in the computer, not me)