Breaking of keys

can any tell how to break the 40 bit key ??? as found the public and private key using RSA algorithm.
pls refer it.

Try all 2^40 combinations!

Similar Messages

  • In the new Pages 5.0, what is the page break shortcut key. I cannot find the key as indicated on the drop down menu.

    in the new Pages 5.0, what is the page break shortcut key (it used to be the Fn + enter). I cannot find the (new) key as indicated on the drop down menu. Please help.

    Hi Bruce and fruhulda,
    ok, I found the keyboard viewer, it only shows the traditional symbol 'return'.  something like a sideway u-turn continued with the arrow under.  This is the Canadian or US keyboard. 
    btw thanks for your suggestion.

  • Resizing C:\ Without breaking One Key Recovery

    Hi just got a new G550 and i must say its a great laptop so far.
    My one main question is this is it possible to resize c:\ and d:\ without breaking the One Key Recovery system.
    I have made a backup of the Factory restore area but would like to decrease c:\ and increase d:\ so i can put all my 147+GB's worth of data into it so if C: is needing a reinstall i don't loose the d:?
    If not is it possible to insert my old laptop hard disc in this new laptop without voiding the warrenty. Thank you!

    You can use Norton Ghost or some other imaging product of your liking.  I use Acronis True Image - but Ghost should work as well.  Not sure what version you will need however.   Make sure you copy all of the partitions on the drive.  I know in True Image it will backup the hidden ones and show you what is out there. 
    After you do this your images will be safe on another dirve.  (Just in case you screw something up) 
    Now - you can use a partition manager to extend the size of the partition you want.  As long as you don't change the logical location or drive letter, it shouldn't care what size you make it.  The recovery program just needs to know where to go look for your backup. 
    I shrunk my backup partition because I don't plan on using it for recovery.  I will use the imaging software instead, and I would prefer to have more space on my "C" drive. 
    Hope this helps. 

  • Resuming from suspend breaks function key on laptop

    I have an Asus K40IN laptop.  Up until a few days ago, suspending worked perfectly.  However, now when I resume from suspend, my function key no longer works.  I use it for some global shortcuts like play/pause, volume up/down, brightness up/down, etc.  I checked in xev, and it's actually registering no key press at all.  However, if I press it twice quickly, it will start registering infinite presses of the d key (keycode 43).  This also completely incapacitates the keyboard -- many keys do not do what they should.  It stops if I press the actual d key once.
    I'm guessing the most likely cause is a recent update.  Here's my recent /var/log/pacman.log:
    [2010-01-08 14:45] upgraded kernel26-firmware (2.6.32.2-2 -> 2.6.32.3-1)
    [2010-01-08 14:45] >>> Updating module dependencies. Please wait ...
    [2010-01-08 14:45] >>> MKINITCPIO SETUP
    [2010-01-08 14:45] >>> ----------------
    [2010-01-08 14:45] >>> If you use LVM2, Encrypted root or software RAID,
    [2010-01-08 14:45] >>> Ensure you enable support in /etc/mkinitcpio.conf .
    [2010-01-08 14:45] >>> More information about mkinitcpio setup can be found here:
    [2010-01-08 14:45] >>> http://wiki.archlinux.org/index.php/Mkinitcpio
    [2010-01-08 14:45]
    [2010-01-08 14:45] >>> Generating initial ramdisk, using mkinitcpio. Please wait...
    [2010-01-08 14:45] ==> Building image "default"
    [2010-01-08 14:45] ==> Running command: /sbin/mkinitcpio -k 2.6.32-ARCH -c /etc/mkinitcpio.conf -g /boot/kernel26.img
    [2010-01-08 14:45] :: Begin build
    [2010-01-08 14:45] :: Parsing hook [base]
    [2010-01-08 14:45] :: Parsing hook [udev]
    [2010-01-08 14:45] :: Parsing hook [autodetect]
    [2010-01-08 14:45] :: Parsing hook [pata]
    [2010-01-08 14:45] :: Parsing hook [scsi]
    [2010-01-08 14:45] :: Parsing hook [sata]
    [2010-01-08 14:45] :: Parsing hook [lvm2]
    [2010-01-08 14:45] :: Parsing hook [filesystems]
    [2010-01-08 14:45] :: Generating module dependencies
    [2010-01-08 14:45] :: Generating image '/boot/kernel26.img'...SUCCESS
    [2010-01-08 14:45] ==> SUCCESS
    [2010-01-08 14:45] ==> Building image "fallback"
    [2010-01-08 14:45] ==> Running command: /sbin/mkinitcpio -k 2.6.32-ARCH -c /etc/mkinitcpio.conf -g /boot/kernel26-fallback.img -S autodetect
    [2010-01-08 14:45] :: Begin build
    [2010-01-08 14:45] :: Parsing hook [base]
    [2010-01-08 14:45] :: Parsing hook [udev]
    [2010-01-08 14:45] :: Parsing hook [pata]
    [2010-01-08 14:46] :: Parsing hook [scsi]
    [2010-01-08 14:46] :: Parsing hook [sata]
    [2010-01-08 14:46] :: Parsing hook [lvm2]
    [2010-01-08 14:46] :: Parsing hook [filesystems]
    [2010-01-08 14:46] :: Generating module dependencies
    [2010-01-08 14:46] :: Generating image '/boot/kernel26-fallback.img'...SUCCESS
    [2010-01-08 14:46] ==> SUCCESS
    [2010-01-08 14:46] upgraded kernel26 (2.6.32.2-2 -> 2.6.32.3-1)
    [2010-01-08 14:46] upgraded zlib (1.2.3.3-3 -> 1.2.3.4-3)
    [2010-01-09 03:18] synchronizing package lists
    [2010-01-09 03:19] starting full system upgrade
    [2010-01-09 03:44] warning: /etc/arno-iptables-firewall/firewall.conf installed as /etc/arno-iptables-firewall/firewall.conf.pacnew
    [2010-01-09 03:44] upgraded arno-iptables-firewall (1.9.2g-1 -> 1.9.2h-1)
    [2010-01-09 20:46] synchronizing package lists
    [2010-01-09 20:47] starting full system upgrade
    [2010-01-09 20:47] starting full system upgrade
    [2010-01-10 03:06] synchronizing package lists
    [2010-01-10 03:06] starting full system upgrade
    [2010-01-10 03:08] In order to use the new nvidia module, exit Xserver and unload it manually.
    [2010-01-10 03:08] upgraded nvidia (190.53-1 -> 190.53-3)
    [2010-01-10 03:32] synchronizing package lists
    [2010-01-10 03:32] starting full system upgrade
    [2010-01-10 03:32] upgraded nvidia (190.53-3 -> 190.53-3)
    [2010-01-10 16:05] synchronizing package lists
    [2010-01-10 16:06] starting full system upgrade
    [2010-01-10 22:50] synchronizing package lists
    [2010-01-10 22:50] starting full system upgrade
    [2010-01-10 22:50] starting full system upgrade
    [2010-01-10 22:50] upgraded freeglut (2.4.0-4 -> 2.6.0-1)
    [2010-01-10 22:51] upgraded kid3 (1.2-1 -> 1.3-1)
    [2010-01-10 23:16] upgraded x264-git (20100107-1 -> 20100110-1)
    [2010-01-10 23:20] upgraded ffmpeg-svn (21082-1 -> 21132-1)
    [2010-01-10 23:27] upgraded mplayer-mt-git (20100107-1 -> 20100110-1)
    [2010-01-10 23:39] upgraded amarok-git (20100107-1 -> 20100110-1)
    [2010-01-10 23:39] upgraded depot_tools-svn (35767-1 -> 35900-1)
    [2010-01-11 00:25] upgraded chromium-svn (35770-1 -> 35902-1)
    [2010-01-11 02:19] installed speedcrunch (0.10.1-1)
    [2010-01-11 06:01] synchronizing package lists
    [2010-01-11 06:01] starting full system upgrade
    [2010-01-11 15:12] synchronizing package lists
    [2010-01-11 15:13] starting full system upgrade
    [2010-01-11 15:14] upgraded x264-git (20100110-1 -> 20100111-1)
    [2010-01-11 15:16] upgraded ffmpeg-svn (21132-1 -> 21152-1)
    [2010-01-11 15:19] upgraded mplayer-mt-git (20100110-1 -> 20100111-1)
    [2010-01-11 17:04] synchronizing package lists
    [2010-01-11 17:04] starting full system upgrade
    [2010-01-11 17:04] starting full system upgrade
    [2010-01-11 17:04] upgraded qtcurve-gtk2 (1.0.0-1 -> 1.0.1-1)
    [2010-01-12 15:32] synchronizing package lists
    [2010-01-12 15:33] starting full system upgrade
    [2010-01-12 15:33] starting full system upgrade
    [2010-01-12 15:34] upgraded dhcpcd (5.1.3-1 -> 5.1.4-1)
    [2010-01-12 15:34] upgraded live-media (2009.09.28-2 -> 2010.01.11-1)
    [2010-01-12 15:34] upgraded strigi (0.7.0-1 -> 0.7.1-1)
    Any ideas?

    Well I still haven't been able to fix it, but here's what I've figured out:
    - Some of the buttons (for example brightness adjust and turn screen off) do not have keycodes.  They seem to work directly through the bios, not through the operating system.  Other buttons (like volume control) do have keycodes, and do work through the OS.
    - If I unload the kernel module asus_laptop, the OS-dependent buttons stop working, but the others continue to work.
    - When I suspend and resume, all the buttons stop working.
    - Putting asus_laptop in SUSPEND_MODULES for pm-utils does not help.
    - Using s2ram from uswsusp does not help.
    - After a suspend and resume (so the buttons are all broken), when I press a button twice and start getting infinite presses of d, I get the following message in dmesg:
    Jan 17 10:45:53 firefly kernel: atkbd.c: Unknown key released (translated set 2, code 0xe1 on isa0060/serio0).
    Jan 17 10:45:53 firefly kernel: atkbd.c: Use 'setkeycodes e061 <keycode>' to make it known.
    I tried running the suggested command using a keycode for a volume button, but it didn't help.  It did stop this message from coming up in dmesg for that particular button, but the other behaviors were the same.
    I can't think of anything else to do to fix it.  Does this mean anything to anyone?

  • Private key

    Hello people,
    i'm creating a program that needs to generate private keys,
    i've found out that java has built in libraries that support this so i've tried:
                    KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA");
                    keyGen.initialize(1024);
                    KeyPair keypair = keyGen.genKeyPair();
                    PrivateKey privateKey = keypair.getPrivate();
                    PublicKey publicKey = keypair.getPublic();but after i set the privateKey i can't find a way to retrieve the actual numbers used in the private key (probably to prevent attacks...)
    eventually, all my app really needs, is a table of , lets say, 100 private keys (each one as 2 big primes)
    is it possible for me to use the java.security to do that?
    thanks for your time.

    i still need small ones in the begining. a modolus in
    the size of 16 DWORDS is too big for me right now, i
    need something like 4.
    i guess i have no escape but to generate them myself,
    the problem is that i probably won't do it
    professionaly :(Well - nobody will generate 32-bit RSA keys "professionally", because it'd take about 2 CPU minutes to break your keys when they're that small. 512 bits was acceptable in the eighties - current best-practice, IIRC, is 2048 bit keys for anything you're serious about protecting, and 4096-bit keys for anything you want to protect for extended periods of time.
    Grant

  • [SOLVED] Dead keys on console in UTF-8 locale

    Hello,
    I want to share something interesting I found out about dead keys support on the Linux console (i.e., without X).
    I live in Canada and use the "Canadian French" keyboard, which uses dead keys for several diacritical marks (e.g., to type ê I push and release the ^ key, then type the e key). It works perfectly under X, but I was unable to type any character using dead keys on the console. On the other hand, non-ASCII characters like "é" that do not use dead keys worked perfectly.
    After some googling, I found many posts claiming the kernel did not support dead keys when the console was in Unicode mode. So I changed the locale to a non-UTF-8 setting in /etc/rc.conf, and indeed dead keys started working. But this was not useful to me, since editing UTF-8 files resulted in gibberish, and I did not want to regress back to Latin1 encoding or have to support both encodings. I tried many combinations of settings, but none worked. For a few days, I thought there was no way to have dead keys and Unicode working on the Console.
    But then I started to install Arch Linux on another computer and noticed that when I set the keyboard to Canadian French with the "km" utility before installing (the keymap is called "cf"), dead keys worked, even though the locale was Unicode! So there was a way to do it.
    I started digging and trying new things, and found out that after the following incantations, I was able to enable dead keys for Unicode on the console:
    kbd_mode -a
    sudo loadkeys cf
    kbd_mode -u
    This sets the console to ASCII mode, loads the "cf" keymap, and sets the console back to Unicode. I found it by trial and error, and I have no idea why it works or whether it breaks anything. I'm posting here to ask if there are easier ways to have a functional Canadian French keyboard on the console, and to document what I did in case someone has a similar problem.
    Last edited by pguertin (2010-01-23 21:44:33)

    I have the exact same issue.
    The weird thing for me is that before I was using gentoo and never had a problem with dead keys and unicode. Also, I confirm that dead keys is working when booting from the archlinux installation cd. Either run 'loadkeys cf' rigth after login or pass 'keymap=cf' as a boot parameter to the kernel line by editing it in grub before booting.
    Your solution is interesting, however the cf.map.gz file is the same on the installation cd (and on my gentoo system) so it should works without editing it.
    In my quest to solve this issue, I found something interesting. I added the 'keymap' hook in /etc/mkinitcpio.conf and regenerated the image by issuing
    mkinitcpio -g /boot/kernel26.img
    This alone didn't solved the issue, but then I REMOVED the keymap assignation in /etc/rc.conf (i.e. leaving it as
    KEYMAP=
    ), rebooted... and voilà, it now works.
    Furthermore, now if I run
    sudo loadkeys cf
    after login it stops working (well of course because it's the same as defining KEYMAP="cf" in /etc/rc.conf). Issuing the 3 commands of your first post make it works again. OK so I did one more test: boot from the archlinux installation cd by adding the 'keymap=cf' boot parameter to the kernel line and then run 'loadkeys cf' after login to see if it breaks dead keys. But no, it still works.
    So is this issue comes from a newer version of the kernel/loadkeys/mkinitcpio/...? How different is the kernel and initramfs images of the installation cd compared to the installed system ?

  • T60 right shift key insufficient travel

    The keytop doesn't travel far enough to activate.  Press down hard and it works. 
    As a temporary fix, I put a thin piece of cardboard between the keytop and switch, and it works. 
    Anybody have a proper fix for it?  Is the switch easily replaceable?  I don't want to destroy the whole laptop by trying to do something without knowing pretty much what I'm doing.

    I'm only speculating the key lost travel due to a crumb or some particle getting lodged between the deck and key.
    A blast of canned air while holding the system on its edge with the lid open to eject the foreign object out is a good idea.
    If breaking a key, or the delicate plastic scissor lift hinges underneath, you can find specific replacement keys for less than replacing the entire keyboard.
    I personally use a Chicago dealer machinaelectronics ( I DON'T WORK AT MACHINA NOR HAVE ANY ECONOMIC INTERESTS IN THEM ) because they always ship promptly, and First Class Mail and they always ship what I ordered.
    They currently sell T60 keys for the princely sum of $4 a key
    http://www.machinaelectronics.com/store/keyboardkeys/Lenovo_Thinkpad_T60
    Signature:
    Let us know what happened,and share your solutions so others may benefit from our experiences. "It doesn't really matter what kind of computers I own since right now the conversation is about the problems on the computers that YOU OWN!" -Mark Twain

  • Return/enter key is broken, help please.

    So basically, after I downloaded an update for my computer, restarted, blah blah, my enter key broke. Also, my mouse would flash randomly sometimes too, and occasionally i would type a word only for it to be highlighted for some reason and I would accidentally delete it. But my main concern is the enter key. It's making using my macbook very difficult, and I would appreciate it if someone could help. Also, I'm using a 13 inch Macbook pro from late 2012, and the update was an update for mavericks, but I can't remember it's name.

    It's probably broken. I've never heard of software breaking a keys, but it's possible, so you might want to back up your data and do a clean install. If it still doesn't work , it needs to be repaired

  • How to break into Sol7 with remote console.

    Greetings fellow Solaris on Intel users,
    We originally started driver development on Sol8. We set up a remote console (eeprom input-device=ttya, output-device=ttya), modified /etc/default/kbd by specifying KEYBOARD_ABORT=alternate (due to serial connection to WinNT), and then issued kbd -a alternate. To break into Sol8 via the remote console, the break-in key sequence is <CarriageReturn>~<cntrl-b> To get the <CarriageReturn>, one must hold the ALT key whilst entering 013. This works fine.
    However, we need to do some verification of our driver under Sol7 (11/99). The problem we are having is that Sol7 does not have the /etc/default/kbd file, nor the kbd utility. Remote console works fine.
    The question is how can we setup Sol7 in order to break into kabd via the remote console.
    Thanks in advance for any help rendered.

    ImMansor wrote:
    Isnt there a program to try every possible combo?
    Tell me. Is this really what you want?
    New in OS X 10.10 "Napa" - FileVault 3 NeverLost  ®. FileVault 3 features much less secure passwords so that if you should ever lose your password or your machine is stolen, the disk can be unlocked in minutes. Never lose valuable information again!

  • Screen starting to go? & multiple keys on keyboard stick intermitantly

    The botttom centre of my screen appears to be going, whenever i type either on a flat surface or on my lap it starts to shake as if i was touching it, and then it is a tad blurry for any objects moving in my finder, anyone kno what the deal is, and i am still under warranty so anyone know if mac will cover this?
    As well my keys especially the arrow keys and my space bar aalways see to lock up on me, where i have to like force it out of whatever the deal is, and just afriad that if i do break a key from pulling it out with enough force that it wont be covered and marked as 'accidental' or 'tempering with product'
    Thanks
    -jm

    well, how old is it? the warranty that came with it from apple is 1 year, unless you bought AppleCare. If it is still in warranty, you should conact apple as soon as possible, if no, I don't know what to do other than pay for fixing it or live with it.

  • How to get the Key mode

    Hello
    Let me ask a question about key mode.
    I'm trying to catch the timing when both Shift-Key and Esc-Key are pressed.
    Using the Edge Animate's document.keydown  events , I can get the chance when the Shift-Key is pressed.
    At the same time I need to know the Esc-Key's mode , pressed? or released?.
    Does anyone know how to get the Ket mode?
    regards

    Thank you very much heathrowe.
    hmm, It seems to be the same thing.
    If users release [Esc-key] first and [Shift-key] next, this script works.
    But it doesn't work in the contrary case.
    To cover both cases, the system have to grasp the STATE of the keys, not EVENT.
    I've made an example below .....
    This script can hold the state of the keys.
    [Note 1] This time I used [Esc-Key] and [z-key] ,  because the task manager opens
                 when [Shift-Key] and [Esc-key] is pressed in case of Chrome.
    [Note 2] I used text-box named "Result" as an output tool instead of the alert tool,
                 because the variables (KeyFlagShift / KeyFlagZ) freeze using an alert tool
                for some unknown reason.
    // ******  compositionReady  ******
    sym.setVariable("KeyFlagShift" , false);
    sym.setVariable("KeyFlagZ" , false);
    // ******  KeyUp  ******
    switch(e.which){
              case 16:
                                  sym.getComposition().getStage().setVariable("KeyFlagShift" , false);
                                  break;
              case 90:
                                  sym.getComposition().getStage().setVariable("KeyFlagZ" , false);
                                  break;
    // ******  KeyDown  ******
    switch(e.which){
              case 16:
                                  sym.getComposition().getStage().setVariable("KeyFlagShift" , true);
                                  break;
              case 90:
                                  sym.getComposition().getStage().setVariable("KeyFlagZ" , true);
                                  break;
    var KeyS = sym.getComposition().getStage().getVariable("KeyFlagShift");
    var KeyZ = sym.getComposition().getStage().getVariable("KeyFlagZ");
    if(KeyS == true && KeyZ == true){
              sym.getComposition().getStage().$("Result").text(" Shift + Esc was pressed");
    }else{
              sym.getComposition().getStage().$("Result").text(" -------");

  • GT70 0NC - Unable to flash non-Windows 8 BIOS

    Hello,
    I recently purchased a GT70 0NC notebook and have been unsuccessful at updating the BIOS. The notebook came pre-installed with Windows 8, but I reformatted with Windows 7 x64.
    I was able to flash in the EC from the factory 1762EMS1 v5.03 to 1762EMS1.414 using the USB flashing tool detailed in the EC flashing instructions from the MSI download site, but since the "normal" MSI BIOS update procedure will not work with Windows 7 64bit, I've been trying to use the "MSI Forum HQ USB flashing tool". I'm able to successfully prepare my USB flash drive with the updater and boot into it without a problem. After executing the update procedure, it says that it updated the BIOS successfully, but the BIOS version (E1762IMS.50R) remains unchanged after pulling power and booting into the BIOS setup (I'm trying to flash in E1762IMS.10R). I checked to see if "Boot Sector Protection" was enabled, but I can't find it anywhere in the GT70 factory BIOS. Since that didn't work, I installed a bootable DOS utility (the same one used to update the EC), extracted the BIOS archive in the root of the flash drive and tried executing "flash.bat", but it said something to the effect "error problem getting flash information". I'm lost at this point and would appreciate any help on this matter.
    Thanks!

    Quote from: debounced on 23-January-13, 22:40:37
    Oh! I guess I'm confused with the language on the download site when it says win8 vs non-win8 for OS selection. Just so I'm clear for future reference, if a newer BIOS revision becomes available for this notebook, even while running Windows 7, I should upgrade (if absolutely necessary) to the win8 version available on the MSI download site? Is this even possible while running Windows 7? It's just weird to me that they're designating a hardware revision based on pre-installed OS when some users will ultimately downgrade to Windows 7 and not understand this.
    My next question, since the Windows 7 1762EMS1.414 EC flash fixed my non-functioning hot keys, should I re-flash to the Windows 8 EC (currently 1762EMS1504) and will this break hot key functionality again? At this point, I'm concerned about the E1762IMS.50R BIOS not playing nice with the 1762EMS1.414 EC.
    Thanks!
    You just got your answer, just install the right BIOS + EC (for your OS) and your problems are solved. If you want to install windows 7 on your laptop, make sure you install BIOS and EC for non-win8 from msi download section (for your laptop model), and check before if you have RAID or non-RAID/with Backlight Keyboard or non-Backlight Keyboard (because you will find also these options in the download section)
    http://www.msi.com/product/nb/GT70-0NC.html
    http://www.msi.com/html/pdf/How_to_make_a_bootable_flash_disk_and_to_flash_EC.pdf

  • Using scripting with networking equipment under Windows

    It can be a challenge to use scripting to automate working with Cisco devices. The Cisco IOS does not seem to directly provide a command line interface. You are forced to find a way to automate interaction with a telnet or ssh session.
    The PERL language provides a number of object-oriented methods to help manage an interactive session, most notably Net::SSH::Expect and Net::Appliance::Session. These options can work well in a Unix environment, but not under MS Windows.
    There are PERL for Windows options, the best probably being Strawberry PERL. There is also a Unix under Windows option known as CYGWIN that is freely available. Unfortunately none of these will work well with the way Windows manages low-level terminal I/O. The curious can google "windows pseudo terminal" to see all the technical details.
    One way that does work under Windows is Tcl.  It was initially named Tool Command Language. It is sometimes shown as Tcl/Tk.
    Interestingly enough, Tcl is included within Cisco IOS as tclsh. There is no interaction with the tclsh and this example. It is just a bit of a curious coincidence.
    A Tcl port to Windows can be downloaded from http://www.activestate.com/activetcl/downloads. Select Download ActiveTCL for Windows. A direct link to the download that worked at the time of writing is Download ActiveTcl 8.5.14 for Windows (x86)
    Once base Tcl has been downloaded and installed there is one other component that will need to be installed from the Tcl Extension Archive, the expect package.
    The teacup program that is installed with the base Tcl package makes this easy. The teacup program will work with a proxy.
    You can set these Windows environment variables to specify proxy details:
    set http_proxy=
    set http_proxy_user=
    set http_proxy_pass=
    Then run teacup install expect
    The plink tool from the PuTTY download is also needed. It can be obtained from http://www.putty.org/.
    The sample that follows assumes that the data files, script and plink.exe executable all reside in the same directory.
    A sample Tcl script follows that reads a file of devices and a file of commands. It will run the list of commands against each device in the device file. It has some basic error checking, but should best be considered a ‘beta’ version. You could do more complex interactions in the Tcl script by adding exp_send and expect command statements. In short, if you can type it you could script it!
    Change directory to where your script, plink.exe  and data is stored and run with  tclsh <script_name>
    devices.list
    # Comment lines are allowed if they start with a hash mark
    # <IP_Addr> <userid> <password> <ssh|telnet> <timeout_in_secs>
    nnn.nnn.nnn.nnn    <userid>    <password>  ssh         <timeout_in_secs>
    nnn.nnn.nnn.nnn    <userid>    <password>  telnet      30
    commands.list
    # term length 0 needed or else IOS will wait for an enter to be pressed at the  --More-- prompts
    term length 0
    show run
    exit
    Script:
    # Run batch commands against one or more devices
    package require Expect
    exp_log_user 0
    set exp_internal 0
    set exp::nt_debug 0
    set prompt "(#\s*$|>\s*$)"
    set env(TERM) dumb
    set file_channel  [open "devices.list" r]
    set DEVICES      [read $file_channel]
    close $file_channel
    set file_channel  [open "commands.list" r]
    set COMMANDS      [read $file_channel]
    close $file_channel
    set command_entries [split $COMMANDS "\n"]
    set device_entries  [split $DEVICES "\n"]
    proc timedout {{msg {none}}} {
          send_user "Timed out (reason: $msg)\n"
          if {[info exists ::expect_out]} { parray ::expect_out }
          exit 1
    foreach device_entry $device_entries {
          if {[string length $device_entry] == 0 || [regexp {[ \t]*#} $device_entry]} { continue }
          set device  [lindex $device_entry 0]
          set user    [lindex $device_entry 1]
          set pass    [lindex $device_entry 2]
          set mode    [lindex $device_entry 3]
          set wait    [lindex $device_entry 4]
          set serial  [lindex $device_entry 5]
          # puts "Device=$device"
          # puts "User=$user"
          # puts "Mode=$mode"
          # puts "Wait=$wait"
          set timeout $wait
          # Spawning the Session
          # If you are logging on to the remote machine using "ssh", "slogin" or "rlogin", the information
          # gets processed in a slightly different manner. With any of these methods, it is necessary to
          # include an additional -l option to specify a username.
          # Next, the $spawn_id variable is captured, storing information about this spawn session in
          # memory for future reference.
          # If you are logging in via Telnet, the final code block in this section is required to pass the
          # username to Telnet. If the login is completed before the script times out, the exp_send command
          # passes the username.
          switch -exact $mode {
                "telnet" { set pid [spawn plink -telnet -l $user $device] }
                "ssh"   { set pid [spawn plink -ssh -l $user -pw $pass $device] }
                "serial" { set pid [spawn plink -serial $serial -l $user -pw $pass $device] }
          set id $spawn_id
          if {$mode == "telnet"} {
                expect -i $id timeout {
                timedout "in user login"
                } eof {
                timedout "spawn failed with eof on login"
                } -re "(login|Username):.*" {
                exp_send -i $id -- "$user\r"
          # Handling Errors
          # The error-handling section of the script is a while loop that anticipates a number of problems
          # that could occur during login. This section is not exhaustive. For example, you could also add
          # provisions for invalid usernames and passwords.
          # If the login is not completed during the allotted time frame, which is set from the devices.list file
          # and specified with expect -i $id timeout, the program displays an appropriate error message.
          # The remainder of this loop makes use of the exp_send command to allow for other scenarios, such
          # as the user typing "yes" when prompted to proceed with the connection, entering a password, or
          # resetting the terminal mode.
          set logged_in 0
          while {!$logged_in} {
                expect -i $id timeout {
                timedout "in while loop"
                break
                } eof {
                timedout "spawn failed with eof"
                break
                } "Store key in cache? (y/n)" {
                exp_send -i $id -- "y\r"
                } -re "\[Pp\]assword:.*" {
                exp_send -i $id -- "$pass\r"
                } "TERM = (*) " {
                exp_send -i $id -- "$env(TERM)\r"
                } -re $prompt {
                set logged_in 1
          foreach command $command_entries {
                if {[string length $command] == 0 || [regexp {[ \t]*#} $command]} { continue }
                # Sending the Request
                # If the login is successful, the code in the if statement below is used to send the "cmd" request
                # to display files and directories. After the request is sent with exp_send, the resulting output
                # is captured in the dir variable, which is set on the fourth line of the code shown below.
                if {$logged_in} {
                      exp_send -i $id -- "$command\r"
                      expect -i $id timeout {timedout "on prompt"} -re $prompt
                      puts "$expect_out(buffer)"
                # Closing the Spawned Session
                # The exp_close command ends the session spawned earlier. Just to be sure that session
                # does indeed close, the exp_wait command causes the script to continue running until a result is
                # obtained from the system processes. If the system hangs, it is likely because exp_close was not
                # able to close the spawned process, and you may need to kill it manually.
          catch { exp_close -i $id }
          exp_wait -i $id
          set logged_in 0
    *** End of Document ***

    Your friend will have to save the templates as CS6, which he can do.

  • How do you use the keyboard to play sound from a button?

    I am building a site for a client who wants to be able to
    press a keyboard button such as the "up" button and have it play an
    instrument sound. I am fimiliar with html and css coding but i am
    not that great at actionscript. It would be greatly appreciated if
    someone could show me what I would have to do to achieve this
    affect. I was looking around the web and saw something that said I
    might need an eventlistner. I am com,pletely lost! All help
    welcome. Thanks. Here is an example of exactly what I am trying to
    achieve, the only difference is it doesnt need to be complicated
    and I only need it to work for 3 buttons.
    http://www.ababasoft.com/music/drums01.htm
    http://www.kenbrashear.com/

    dasaimedia wrote:
    > I am building a site for a client who wants to be able
    to press a keyboard
    > button such as the "up" button and have it play an
    instrument sound. I am
    > fimiliar with html and css coding but i am not that
    great at actionscript. It
    > would be greatly appreciated if someone could show me
    what I would have to do
    > to achieve this affect. I was looking around the web and
    saw something that
    > said I might need an eventlistner. I am com,pletely
    lost! All help welcome.
    > Thanks. Here is an example of exactly what I am trying
    to achieve, the only
    > difference is it doesnt need to be complicated and I
    only need it to work for 3
    > buttons.
    http://www.ababasoft.com/music/drums01.htm
    >
    http://www.kenbrashear.com/
    Many ways to achieves that. You can make a movie clip with
    (for 4 sounds) 5 frames.
    Frame 1 stop(); to prevent it from running. Frame 2 attach
    your sound, frame 3 another
    sound, frame 4 and 5 same. Give that movie clip instance name
    "soundCLIP" Now all you
    need is to add key listener to timeline frame so you can
    capture the key and go to
    corresponding frame of the movie clip to play your sound.
    var keyListObj:Object = new Object();
    keyListObj.onKeyDown = function() {
    switch (Key.getCode()) {
    case Key.LEFT :
    soundCLIP.gotoAndStop(2);
    break;
    case Key.UP :
    soundCLIP.gotoAndStop(3);
    break;
    case Key.RIGHT :
    soundCLIP.gotoAndStop(4);
    break;
    case Key.DOWN :
    soundCLIP.gotoAndStop(5);
    break;
    Key.addListener(keyListObj);
    Best Regards
    Urami
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • A simple Spry Accordion Question (I think)

    Hi all:
    I've searched but can't find, but I think this is a simple one.
    I've created a basic Spry accordion menu with DW/CS3 - Insert/Spry/Spry Accordion. How do I get the first "Content 1" to be hidden/not visible upon page load. Right now, the "Lable 2" must be clicked to hide the "Content 1" which of course shows the "Content 2"? Guessing it's in the JS, but I'm not sure. TIA for any help. HTML and JS Code below.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Untitled Document</title>
    <script src="SpryAssets/SpryAccordion.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryAccordion.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <div id="Accordion1" class="Accordion" tabindex="0">
      <div class="AccordionPanel">
        <div class="AccordionPanelTab">Label 1</div>
        <div class="AccordionPanelContent">Content 1</div>
      </div>
      <div class="AccordionPanel">
        <div class="AccordionPanelTab">Label 2</div>
        <div class="AccordionPanelContent">Content 2</div>
      </div>
    </div>
    <script type="text/javascript">
    <!--
    var Accordion1 = new Spry.Widget.Accordion("Accordion1");
    //-->
    </script>
    </body>
    </html>
    JAVASCRIPT
    var Spry;
    if (!Spry) Spry = {};
    if (!Spry.Widget) Spry.Widget = {};
    Spry.Widget.Accordion = function(element, opts)
        this.element = this.getElement(element);
        this.defaultPanel = 0;
        this.hoverClass = "AccordionPanelTabHover";
        this.openClass = "AccordionPanelOpen";
        this.closedClass = "AccordionPanelClosed";
        this.focusedClass = "AccordionFocused";
        this.enableAnimation = true;
        this.enableKeyboardNavigation = true;
        this.currentPanel = null;
        this.animator = null;
        this.hasFocus = null;
        this.duration = 500;
        this.previousPanelKeyCode = Spry.Widget.Accordion.KEY_UP;
        this.nextPanelKeyCode = Spry.Widget.Accordion.KEY_DOWN;
        this.useFixedPanelHeights = true;
        this.fixedPanelHeight = 0;
        Spry.Widget.Accordion.setOptions(this, opts, true);
        // Unfortunately in some browsers like Safari, the Stylesheets our
        // page depends on may not have been loaded at the time we are called.
        // This means we have to defer attaching our behaviors until after the
        // onload event fires, since some of our behaviors rely on dimensions
        // specified in the CSS.
        if (Spry.Widget.Accordion.onloadDidFire)
            this.attachBehaviors();
        else
            Spry.Widget.Accordion.loadQueue.push(this);
    Spry.Widget.Accordion.onloadDidFire = false;
    Spry.Widget.Accordion.loadQueue = [];
    Spry.Widget.Accordion.addLoadListener = function(handler)
        if (typeof window.addEventListener != 'undefined')
            window.addEventListener('load', handler, false);
        else if (typeof document.addEventListener != 'undefined')
            document.addEventListener('load', handler, false);
        else if (typeof window.attachEvent != 'undefined')
            window.attachEvent('onload', handler);
    Spry.Widget.Accordion.processLoadQueue = function(handler)
        Spry.Widget.Accordion.onloadDidFire = true;
        var q = Spry.Widget.Accordion.loadQueue;
        var qlen = q.length;
        for (var i = 0; i < qlen; i++)
            q[i].attachBehaviors();
    Spry.Widget.Accordion.addLoadListener(Spry.Widget.Accordion.processLoadQueue);
    Spry.Widget.Accordion.prototype.getElement = function(ele)
        if (ele && typeof ele == "string")
            return document.getElementById(ele);
        return ele;
    Spry.Widget.Accordion.prototype.addClassName = function(ele, className)
        if (!ele || !className || (ele.className && ele.className.search(new RegExp("\\b" + className + "\\b")) != -1))
            return;
        ele.className += (ele.className ? " " : "") + className;
    Spry.Widget.Accordion.prototype.removeClassName = function(ele, className)
        if (!ele || !className || (ele.className && ele.className.search(new RegExp("\\b" + className + "\\b")) == -1))
            return;
        ele.className = ele.className.replace(new RegExp("\\s*\\b" + className + "\\b", "g"), "");
    Spry.Widget.Accordion.setOptions = function(obj, optionsObj, ignoreUndefinedProps)
        if (!optionsObj)
            return;
        for (var optionName in optionsObj)
            if (ignoreUndefinedProps && optionsObj[optionName] == undefined)
                continue;
            obj[optionName] = optionsObj[optionName];
    Spry.Widget.Accordion.prototype.onPanelTabMouseOver = function(panel)
        if (panel)
            this.addClassName(this.getPanelTab(panel), this.hoverClass);
    Spry.Widget.Accordion.prototype.onPanelTabMouseOut = function(panel)
        if (panel)
            this.removeClassName(this.getPanelTab(panel), this.hoverClass);
    Spry.Widget.Accordion.prototype.openPanel = function(panel)
        var panelA = this.currentPanel;
        var panelB = panel;
        if (!panelB || panelA == panelB)   
            return;
        var contentA;
        if( panelA )
            contentA = this.getPanelContent(panelA);
        var contentB = this.getPanelContent(panelB);
        if (! contentB)
            return;
        if (this.useFixedPanelHeights && !this.fixedPanelHeight)
            this.fixedPanelHeight = (contentA.offsetHeight) ? contentA.offsetHeight : contentA.scrollHeight;
        if (this.enableAnimation)
            if (this.animator)
                this.animator.stop();
            this.animator = new Spry.Widget.Accordion.PanelAnimator(this, panelB, { duration: this.duration });
            this.animator.start();
        else
            if(contentA)
                contentA.style.height = "0px";
            contentB.style.height = (this.useFixedPanelHeights ? this.fixedPanelHeight : contentB.scrollHeight) + "px";
        if(panelA)
            this.removeClassName(panelA, this.openClass);
            this.addClassName(panelA, this.closedClass);
        this.removeClassName(panelB, this.closedClass);
        this.addClassName(panelB, this.openClass);
        this.currentPanel = panelB;
    Spry.Widget.Accordion.prototype.openNextPanel = function()
        var panels = this.getPanels();
        var curPanelIndex = this.getCurrentPanelIndex();
        if( panels && curPanelIndex >= 0 && (curPanelIndex+1) < panels.length )
            this.openPanel(panels[curPanelIndex+1]);
    Spry.Widget.Accordion.prototype.openPreviousPanel = function()
        var panels = this.getPanels();
        var curPanelIndex = this.getCurrentPanelIndex();
        if( panels && curPanelIndex > 0 && curPanelIndex < panels.length )
            this.openPanel(panels[curPanelIndex-1]);
    Spry.Widget.Accordion.prototype.openFirstPanel = function()
        var panels = this.getPanels();
        if( panels )
            this.openPanel(panels[0]);
    Spry.Widget.Accordion.prototype.openLastPanel = function()
        var panels = this.getPanels();
        if( panels )
            this.openPanel(panels[panels.length-1]);
    Spry.Widget.Accordion.prototype.onPanelClick = function(panel)
        // if (this.enableKeyboardNavigation)
        //     this.element.focus();
        if (panel != this.currentPanel)
            this.openPanel(panel);
        this.focus();
    Spry.Widget.Accordion.prototype.onFocus = function(e)
        // this.element.focus();
        this.hasFocus = true;
        this.addClassName(this.element, this.focusedClass);
    Spry.Widget.Accordion.prototype.onBlur = function(e)
        // this.element.blur();
        this.hasFocus = false;
        this.removeClassName(this.element, this.focusedClass);
    Spry.Widget.Accordion.KEY_UP = 38;
    Spry.Widget.Accordion.KEY_DOWN = 40;
    Spry.Widget.Accordion.prototype.onKeyDown = function(e)
        var key = e.keyCode;
        if (!this.hasFocus || (key != this.previousPanelKeyCode && key != this.nextPanelKeyCode))
            return true;
        var panels = this.getPanels();
        if (!panels || panels.length < 1)
            return false;
        var currentPanel = this.currentPanel ? this.currentPanel : panels[0];
        var nextPanel = (key == this.nextPanelKeyCode) ? currentPanel.nextSibling : currentPanel.previousSibling;
        while (nextPanel)
            if (nextPanel.nodeType == 1 /* Node.ELEMENT_NODE */)
                break;
            nextPanel = (key == this.nextPanelKeyCode) ? nextPanel.nextSibling : nextPanel.previousSibling;
        if (nextPanel && currentPanel != nextPanel)
            this.openPanel(nextPanel);
        if (e.stopPropagation)
            e.stopPropagation();
        if (e.preventDefault)
            e.preventDefault();
        return false;
    Spry.Widget.Accordion.prototype.attachPanelHandlers = function(panel)
        if (!panel)
            return;
        var tab = this.getPanelTab(panel);
        if (tab)
            var self = this;
            Spry.Widget.Accordion.addEventListener(tab, "click", function(e) { return self.onPanelClick(panel); }, false);
            Spry.Widget.Accordion.addEventListener(tab, "mouseover", function(e) { return self.onPanelTabMouseOver(panel); }, false);
            Spry.Widget.Accordion.addEventListener(tab, "mouseout", function(e) { return self.onPanelTabMouseOut(panel); }, false);
    Spry.Widget.Accordion.addEventListener = function(element, eventType, handler, capture)
        try
            if (element.addEventListener)
                element.addEventListener(eventType, handler, capture);
            else if (element.attachEvent)
                element.attachEvent("on" + eventType, handler);
        catch (e) {}
    Spry.Widget.Accordion.prototype.initPanel = function(panel, isDefault)
        var content = this.getPanelContent(panel);
        if (isDefault)
            this.currentPanel = panel;
            this.removeClassName(panel, this.closedClass);
            this.addClassName(panel, this.openClass);
        else
            this.removeClassName(panel, this.openClass);
            this.addClassName(panel, this.closedClass);
            content.style.height = "0px";
        this.attachPanelHandlers(panel);
    Spry.Widget.Accordion.prototype.attachBehaviors = function()
        var panels = this.getPanels();
        for (var i = 0; i < panels.length; i++)
            this.initPanel(panels[i], i == this.defaultPanel);
        if (this.enableKeyboardNavigation)
            // XXX: IE doesn't allow the setting of tabindex dynamically. This means we can't
            // rely on adding the tabindex attribute if it is missing to enable keyboard navigation
            // by default.
            var tabIndexAttr = this.element.attributes.getNamedItem("tabindex");
            // if (!tabIndexAttr) this.element.tabindex = 0;
            if (tabIndexAttr)
                var self = this;
                Spry.Widget.Accordion.addEventListener(this.element, "focus", function(e) { return self.onFocus(e); }, false);
                Spry.Widget.Accordion.addEventListener(this.element, "blur", function(e) { return self.onBlur(e); }, false);
                Spry.Widget.Accordion.addEventListener(this.element, "keydown", function(e) { return self.onKeyDown(e); }, false);
    Spry.Widget.Accordion.prototype.getPanels = function()
        return this.getElementChildren(this.element);
    Spry.Widget.Accordion.prototype.getCurrentPanel = function()
        return this.currentPanel;
    Spry.Widget.Accordion.prototype.getCurrentPanelIndex = function()
        var panels = this.getPanels();
        for( var i = 0 ; i < panels.length; i++ )
            if( this.currentPanel == panels[i] )
                return i;
        return 0;
    Spry.Widget.Accordion.prototype.getPanelTab = function(panel)
        if (!panel)
            return null;
        return this.getElementChildren(panel)[0];
    Spry.Widget.Accordion.prototype.getPanelContent = function(panel)
        if (!panel)
            return null;
        return this.getElementChildren(panel)[1];
    Spry.Widget.Accordion.prototype.getElementChildren = function(element)
        var children = [];
        var child = element.firstChild;
        while (child)
            if (child.nodeType == 1 /* Node.ELEMENT_NODE */)
                children.push(child);
            child = child.nextSibling;
        return children;
    Spry.Widget.Accordion.prototype.focus = function()
        if (this.element && this.element.focus)
            this.element.focus();
    Spry.Widget.Accordion.PanelAnimator = function(accordion, panel, opts)
        this.timer = null;
        this.interval = 0;
        this.stepCount = 0;
        this.fps = 0;
        this.steps = 10;
        this.duration = 500;
        this.onComplete = null;
        this.panel = panel;
        this.panelToOpen = accordion.getElement(panel);
        this.panelData = [];
        Spry.Widget.Accordion.setOptions(this, opts, true);
        // If caller specified speed in terms of frames per second,
        // convert them into steps.
        if (this.fps > 0)
            this.interval = Math.floor(1000 / this.fps);
            this.steps = parseInt((this.duration + (this.interval - 1)) / this.interval);
        else if (this.steps > 0)
            this.interval = this.duration / this.steps;
        // Set up the array of panels we want to animate.
        var panels = accordion.getPanels();
        for (var i = 0; i < panels.length; i++)
            var p = panels[i];
            var c = accordion.getPanelContent(p);
            if (c)
                var h = c.offsetHeight;
                if (h == undefined)
                    h = 0;
                if (p == panel || h > 0)
                    var obj = new Object;
                    obj.panel = p;
                    obj.content = c;
                    obj.fromHeight = h;
                    obj.toHeight = (p == panel) ? (accordion.useFixedPanelHeights ? accordion.fixedPanelHeight : c.scrollHeight) : 0;
                    obj.increment = (obj.toHeight - obj.fromHeight) / this.steps;
                    obj.overflow = c.style.overflow;
                    this.panelData.push(obj);
                    c.style.overflow = "hidden";
                    c.style.height = h + "px";
    Spry.Widget.Accordion.PanelAnimator.prototype.start = function()
        var self = this;
        this.timer = setTimeout(function() { self.stepAnimation(); }, this.interval);
    Spry.Widget.Accordion.PanelAnimator.prototype.stop = function()
        if (this.timer)
            clearTimeout(this.timer);
            // If we're killing the timer, restore the overflow
            // properties on the panels we were animating!
            if (this.stepCount < this.steps)
                for (i = 0; i < this.panelData.length; i++)
                    obj = this.panelData[i];
                    obj.content.style.overflow = obj.overflow;
        this.timer = null;
    Spry.Widget.Accordion.PanelAnimator.prototype.stepAnimation = function()
        ++this.stepCount;
        this.animate();
        if (this.stepCount < this.steps)
            this.start();
        else if (this.onComplete)
            this.onComplete();
    Spry.Widget.Accordion.PanelAnimator.prototype.animate = function()
        var i, obj;
        if (this.stepCount >= this.steps)
            for (i = 0; i < this.panelData.length; i++)
                obj = this.panelData[i];
                if (obj.panel != this.panel)
                    obj.content.style.height = "0px";
                obj.content.style.overflow = obj.overflow;
                obj.content.style.height = obj.toHeight + "px";
        else
            for (i = 0; i < this.panelData.length; i++)
                obj = this.panelData[i];
                obj.fromHeight += obj.increment;
                obj.content.style.height = obj.fromHeight + "px";

    On the bottom of yourpage you have this:
    var Accordion1 = new Spry.Widget.Accordion("Accordion1");
    Change it to this:
    var Accordion1 = new Spry.Widget.Accordion("Accordion1", { useFixedPanelHeights: false, defaultPanel: -1 });
    Ken Ford

Maybe you are looking for