This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
guides:virtual_modem:script [2019-02-18 02:16] omolini |
guides:virtual_modem:script [2019-11-18 23:58] omolini [ppp.sh] |
||
---|---|---|---|
Line 4: | Line 4: | ||
===== vmodem.sh ===== | ===== vmodem.sh ===== | ||
The main script. This script will simulate a modem by answering to standard Hayes commands. | The main script. This script will simulate a modem by answering to standard Hayes commands. | ||
- | It will open the serial port for communication and execute the dialed number as a linux script. | + | It will open the serial port for communication and execute the dialed number as a linux shell script, however you could probably use any execututable with minor modification. |
For example, if you issue the command ATD12345, the script will look for a file 12345.sh in | For example, if you issue the command ATD12345, the script will look for a file 12345.sh in | ||
the working directory and execute it and output contents to console. | the working directory and execute it and output contents to console. | ||
Line 300: | Line 300: | ||
===== ppp.sh ===== | ===== ppp.sh ===== | ||
- | This script will initiate a PPP session but will not wait around for user input. This is in place only to make Trumpet Winsock 3.0 think that it's logging on, and make it proceed when it receives the expected printouts. The built-in dial-up connection in Windows 95 and later operating systems by default do not expect a login prompt unless specifically told to do so. | + | This script will initiate a PPP session and will present a fake login shell, but will not wait around for user input. The fake login shell is in place for compatibility with Trumpet Winsock 3.0, as it by default expects one, so we're fooling it to make it think that it's logging on. It will then proceed when it receives the expected printouts. The built-in dial-up connection in Windows 95/98/Me by default do not expect a login prompt unless specifically told to do so. |
- | Specifically when Trumpet Winsock is in PPP mode, by default it will expect the following output after dialing the ISP's number and establishing a connection: | + | When Trumpet Winsock is in PPP mode, by default it will expect the following output after dialing the ISP's number and establishing a connection: |
* A username prompt, matched by the text "sername:" | * A username prompt, matched by the text "sername:" | ||
* A password prompt, matched by the text "ssword:" | * A password prompt, matched by the text "ssword:" | ||
Line 370: | Line 370: | ||
echo "---------------------" | echo "---------------------" | ||
echo | echo | ||
- | echo "You have just successfully dialled this virtual box!" | + | echo "You have just successfully dialed this virtual box!" |
echo | echo | ||
echo "Please enter your name: " | echo "Please enter your name: " | ||
read username | read username | ||
echo | echo | ||
- | echo "Welcome $username!" | + | echo "Hello, $username!" |
+ | echo | ||
echo "Thank you for visiting! Bye!" | echo "Thank you for visiting! Bye!" | ||
sleep 2 | sleep 2 | ||
</code> | </code> | ||