NoSiD

No-dashi Simple Dialer

WTF is that?

No-dashi dialer aka NoSiD is a very simple bash script. It's yet another dialer, but without any functions you need. It simply dials!
Why not using KPPP?
It's too big, slow and eats lots of memory
Why not using wvdial?
In fact, wvdial is what you want to use. Forget about NoSiD. You must have mispelled an URL in your browser, how else could you find such a stupid program like NoSiD?

History

Once upon a time, I complained that everything in Linux is very slow. Guys from linux.org.ru gave me some invaluable advice, such as using *term instead of KDE's Konsole, and one of them, who calls himself "no-dashi", suggested a s[a,i]mple script to replace kppp with. You can find it below under "NoSiD v0.1".

Features

NoSiD has two features:
  • It can dial your ISP's phone number, and even connect to the Internet!
  • It supports unlimited number of accounts
  • NoSiD guide

    So, what should you do in order to get NoSiD to work?

  • Become root and type "rm -rf /" followed by <Enter>. Just kidding :)
  • Become root. Not kidding this time :)
  • Open your favourite editor and copy/paste this script
  • Save it somewhere under any name you like, e.g. in /usr/local/bin/dial
  • Run chmod +x /usr/local/bin/dial
  • Create and edit ~/.dialrc file. It will contain your accounts' data. Format of this file is as follows:
    user[account_name]=your_user_name
    tel[account_name]=your_ISP_telephone
    pass[account_name]=your_password
    For example, here's my .dialrc:
    	tel=P269998
    	user=a260404@rol.ru
    	pass=szhoinai
    	
    	telrol=P689292
    	userrol=rol
    	passrol=rol
    	
    	telcredit=P8,22780200
    	usercredit=uoy_kcuf
    	passcredit=hctib
    
    
    So, if I will simply run "dial", NoSiD will connect using phone number "P269998" (P means pulse dialing) and username "a260404@rol.ru". If I'll add a parameter to the command, e.g. "dial credit", it will connect using another account. When you want to disconnect, press Ctrl+C.

    Requirements

  • Linuxbox with bash
  • At least 1 hand required to type commands

    NoSiD v0.1

    This version is available here: http://www.linux.org.ru/view-message.jsp?msgid=537416#540408

    NoSiD v0.2

    Here's NoSiD v0.2, released on 2004-01-05. Powered by ViM.
    #!/bin/bash
    ############################################
    # NoSiD - no-dashi dialer v0.2             #
    # (c)2004 no-dashi, original version       #
    # (c)2004 Anthony Ivanoff, current version #
    #                                          #
    # Released under GPLv2                     #
    ############################################
    
    ACCOUNT=$1
    
    d()
    {
            export USNAME=`cat ~/.dialrc | grep user$ACCOUNT= | sed s/user$ACCOUNT=//`
            export PHONE=` cat ~/.dialrc | grep tel$ACCOUNT= | sed s/tel$ACCOUNT=//`
            export PASSWD=`  cat ~/.dialrc | grep pass$ACCOUNT= | sed s/pass$ACCOUNT=//`
    
            #echo starting pppd at `date` > ~/pppdlog
    
            pppd defaultroute ipcp-accept-local ipcp-accept-remote nodetach connect "chat -E ABORT BUSY ABORT DIALTONE ABORT ANSWER '' ATM1L1 OK 'ATDP\$PHONE' 'ogin:' '\$USNAME' 'word:' '\$PASSWD'"
    
    #       echo $USNAME $PHONE $PASSWD
    }
    
    ANS_REDIAL="y"
    
    while [ $ANS_REDIAL = "y" -o $ANS_REDIAL = "н" ]
    do
            d
            read -n 1 -p "Redial (y/n)? " ANS_REDIAL
            echo
    done
    
    exit 0
    

    NoSiD v0.3

    Here's a new version of NoSiD, released on 2004-20-06. Changes:
  • More verbose output
  • Colored output of dial retries
  • Changed timeout for `chat` to 60 seconds (chat -t 60)
    
    #!/bin/bash
    ############################################
    # NoSiD - no-dashi dialer v0.3             #
    # (c)2004 no-dashi, original version       #
    # (c)2004 Anthony Ivanoff, current version #
    #                                          #
    # Released under GPLv2                     #
    ############################################
    
    I=1
    
    ACCOUNT=$1
    
    d()
    {
    	export USNAME=`cat ~/.dialrc | grep user$ACCOUNT= | sed s/user$ACCOUNT=//`
    	export PHONE=` cat ~/.dialrc | grep tel$ACCOUNT= | sed s/tel$ACCOUNT=//`
    	export PASSWD=`  cat ~/.dialrc | grep pass$ACCOUNT= | sed s/pass$ACCOUNT=//`
    	
    	#echo starting pppd at `date` > ~/pppdlog
    	echo -e \=\> "\033[0;33mRetry #$I\033[0;0m" \<\=
    	echo \=\> Dialing...
    	pppd defaultroute ipcp-accept-local ipcp-accept-remote nodetach connect "chat -t 60 -E ABORT BUSY ABORT DIALTONE ABORT ANSWER '' ATM1L1 OK 'ATDP\$PHONE' 'ogin:' '\$USNAME' 'word:' '\$PASSWD'" 
    	
    #	echo $USNAME $PHONE $PASSWD
    #	killall nullmailer-send
    	echo Connection terminated at `date`
    	I=$(($I + 1))
    }
    
    ANS_REDIAL="y"
    
    while [ $ANS_REDIAL = "y" -o $ANS_REDIAL = "н" ]
    do
    	d
    	read -n 1 -p "=> Redial (y/n)? " ANS_REDIAL
    	echo
    done
    
    exit 0
    
    
    Now, go get yourself wvdial, install it and remove NoSiD. Have fun,
    Anthony Ivanoff

    $count morons already visited this page!
    " ?>


    Используются технологии uCoz