Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 02 Sep 2014, 23:26
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Network
CLInet 0.8
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [23 Posts]   Goto page: 1, 2 Next
Author Message
WarMocK


Joined: 05 Jul 2007
Posts: 169

PostPosted: Thu 07 Jan 2010, 20:27    Post subject:  CLInet 0.8
Subject description: Internet connection wizard for the commandline
 

Greetings everybody!

I've been working on the issue with connecting a PC to the internet on the commandline for quite some time, and now I've got a working prototype: CLInet.

What it does:
It is a dialog-based tool chain (total size of all files is approx 30 KB) that allows you to set up a connection with a cable connection, wireless LAN connection, and dial-up with a modem. The tools create an executable script running the dial-up tools with generated configs so you can even start a dial-up without the need for CLInet itself. Later versions are supposed to be able to edit the config files of the router scripts (and wxdial).
Since I have only very limited possibilities here when it comes to testing everything, any help would be VERY appreciated, especially with the modem part.

Please remember that this thing is VERY brittle right now and still is cramped with bugs. I'll try to fix'em as good as I can, but bash scripting is totally new for me (I usually program GUIs in tcl/tk), so I'd welcome any helping hand.

Update:
I forgot to mention what I've tested so far *note to myself: don't throw stuff out to the crowd at 1:30 in the morning Rolling Eyes *
The system proved to work with:
- LAN connection
- WLAN and WEP encryption
- WLAN and WPA encryption
- WLAN and WPA2 encryption

It should work with:
WLAN and no encryption (I managed to get a connection to a public AP but I didn't have the necessary login data at hand to actually dial into the net)

It probably works with (but hasn't been tested yet):
- Modem connection

I'd appreciate any feedback about wether the connection types mentioned above do work with others or not, so I can fix these things first (if necessary) before going for the editor part.


That said ... fire it up! Very Happy

UPDATES!!!
v 0.2: I moved the generated scripts and temporary config files to a temp folder in the user's home directory to avoid conflicts (and security issues) in a multi-user environment. Also fixed a few bugs with the connect2modem script so you can actually abort the whole process if necessary.

v 0.3: now runs under the GUI as well. Thanks for the idea with XDialog, aragon. Very Happy

v 0.4: Fixed some bugs that came up with Puppy 4.31. Also changes the layout of the dialogs a bit so they are more compatible with both dialog and xdialog

v 0.5: Edited the start script according to aragon's proposal (I seriously totally forgot about that one xD). But I used -z $DISPLAY instead for checking out if X is running or not. Also re-enabled Xdialog for all scripts again after fixing some layout problems and fixed a serious flaw in the design; I added t message box that warns the user if there's no access point available (the former versions tried to run the script anyway).

v 0.6: CLInet now always opens in dialog mode only (on X, it opens in rxvt) because XDialog tended to catch error messages and put them into the temporary variables, screwing up the entire process.
Added the promised edit functions for router connections. You may set the connection to ad-hoc (directly between two computers) or Standard (connection over a router), as well as the driver mode for normal and hidden router SSIDs.

v 0.7: Added cross-reference links to the pppoe wizardtools. CLInet may now be used to configure DLS connections over modems as well. Also changed the layout from the main dialog box to make it fit the new features properly.

v.0.8: Added a rescan function for the case that there were no access points in range. Also replaced the echo message with a dialog messagebox to tell if the system successfully established a connection or not.
CLInet-0.8.pet
Description 
pet

 Download 
Filename  CLInet-0.8.pet 
Filesize  11.95 KB 
Downloaded  639 Time(s) 
clishot.jpg
 Description   
 Filesize   43.32 KB
 Viewed   1654 Time(s)

clishot.jpg


Last edited by WarMocK on Fri 06 Aug 2010, 15:56; edited 17 times in total
Back to top
View user's profile Send private message 
amigo

Joined: 02 Apr 2007
Posts: 2240

PostPosted: Fri 08 Jan 2010, 07:48    Post subject:  

Nice idea! Since it's written using dialog, it will be trivial to make it also work with Xdialog. I'll try to make a chance to have a look at it -my first work ever with bash-scripting was to do some mods to a PPP modem setup tool, so I may have some old code which fits in there, if needed.
Back to top
View user's profile Send private message 
WarMocK


Joined: 05 Jul 2007
Posts: 169

PostPosted: Fri 08 Jan 2010, 07:55    Post subject:  

Sure! Go ahead!
I hope I added enough comments to the scripts so you don't get lost. Most of the stuff I used is heavily modified code from Puppy's modemwizard and the wireless LAN wizard. If you're familiar with that code, you'll feel like home. Wink
Back to top
View user's profile Send private message 
WarMocK


Joined: 05 Jul 2007
Posts: 169

PostPosted: Sat 16 Jan 2010, 16:19    Post subject:  

Okay, first update!
See first post for the dotpet.

Last edited by WarMocK on Fri 19 Feb 2010, 14:42; edited 1 time in total
Back to top
View user's profile Send private message 
WarMocK


Joined: 05 Jul 2007
Posts: 169

PostPosted: Fri 05 Feb 2010, 11:51    Post subject:  

Added version 0.3
See main post.

Thanks for the idea with XDialog, aragon. Very Happy

Last edited by WarMocK on Fri 19 Feb 2010, 14:48; edited 2 times in total
Back to top
View user's profile Send private message 
aragon

Joined: 15 Oct 2007
Posts: 1698
Location: Germany

PostPosted: Fri 05 Feb 2010, 15:57    Post subject:  

hi warmock,

i've now had time to test a little. Testbed: Dell Lattitude E6400, Puppy 4.31 (pfix=ram).

i've had some problems, so i couldn't test, if the connection would be set with success.

- /usr/sbin/clinet
as the combi of dialog/xdialog only makes sense if dialog is used on cli (no x) and xdialog within x - my opinion - this one is suboptimal, as it uses rxvt to launch, what would not work in cli.

please look at this one
Code:
#!/bin/sh
#Lesser GPL licence v2 (http://www.fsf.org/licensing/licenses/lgpl.html). 2010 www.puppylinux.com

if [ "$(ps -eo comm | grep ^X)" = "X" ]
then
exec rxvt -e /usr/local/CLInet/CLInet.sh 2> /dev/null &
else
exec /usr/local/CLInet/CLInet.sh 2> /dev/null &
fi
exit 0


will report further testing.

aragon

_________________
PUPPY SEARCH: http://wellminded.com/puppy/pupsearch.html
Back to top
View user's profile Send private message 
WarMocK


Joined: 05 Jul 2007
Posts: 169

PostPosted: Sat 06 Feb 2010, 08:51    Post subject:  

@aragon:
For some reason, CLInet tends to crash on Puppy 4.31 at the moment (I wrote the tool on NOP 4.13). But I think I found the problem:
When breaking up the scan results from iwlist, CLInet now screws up because the option I used to determine the end of a cell (EXTRAS) now is on a different position, namely before the IE: list, therefore, the tool cuts the most important variable (namely the hardware encryption) away before it had been able to read it out.
The easiest - and ugliest - bugfix I came up with not was setting the ENDSEQ variable to a fixed value (I only have a few APs here, not enough to determine if value I chose value is accurate enough. I chose 24). The result is anything but pretty, but it does the job. I'm gonna do some tests and see what I can use to properly include all the EXTRAS and IE: values again instead of doing a shot in the blue.

UPDATE:
Looks like there are quite a few things I need to alter to get CLInet up and running under 4.31 now. Sad
I altered the script for the router connection and added a filter for iw list to remove all unknown IEs from the output, and put a static value for the DIFFERECE variable needed to separate the cells from each other. I also changed the names for the generated dial-up scripts, they now use the name of the selected router for both the script and the config file. Is it possible that there is a bug with cp now? I could now copy the WPA2 template into the hidden CLInet directory (which is also created if missing now, I thought I had added that routine to the main script). Looks like cp doesn't like MAC adresses as filenames anymore.
Gonna make another patched dotpet as soon as I created the newest barebones iso here, it should take too long.
Back to top
View user's profile Send private message 
WarMocK


Joined: 05 Jul 2007
Posts: 169

PostPosted: Sat 06 Feb 2010, 13:16    Post subject:  

Okay, this is odd.
I'm testing CLInet on a freshly woof-generated Puppy 4.31 Live-CD, and even net-setup.sh seems to work there. It used to work on NOP 4.31 and NOP 4.13. I hope I didn't strip out too much, but I definitely know that the last things I'd ever strip out would be any drivers. Is this a bug in one of the packages used by woof and puppy 4.31 or what?
Back to top
View user's profile Send private message 
WarMocK


Joined: 05 Jul 2007
Posts: 169

PostPosted: Thu 18 Feb 2010, 16:27    Post subject:  

Version 0.4 is out. See first post for details.
Back to top
View user's profile Send private message 
WarMocK


Joined: 05 Jul 2007
Posts: 169

PostPosted: Fri 19 Feb 2010, 14:55    Post subject:  

Say hello to version 0.5. Dotpet's in the first post.
Back to top
View user's profile Send private message 
nooby

Joined: 29 Jun 2008
Posts: 10557
Location: SwedenEurope

PostPosted: Fri 19 Feb 2010, 15:18    Post subject:  

I know I know nothing but got curious.

what is it for? what usage? You can do what?

apart from being fun in itself?

_________________
I use Google Search on Puppy Forum
not an ideal solution though
Back to top
View user's profile Send private message 
WarMocK


Joined: 05 Jul 2007
Posts: 169

PostPosted: Fri 19 Feb 2010, 15:51    Post subject:  

In a nutshell:
CLInet is a tool for the command line to generate dial-up scripts for wireless LAN connections, starts dhcp for both LAN and wireless connections once the connections are established, configures and launches the dial-up config for modem connection, and lets you edit dial-up scripts to make them suitable for ad-hoc and invisible wireless connections. Now it also works on a GUI by using XDialog.

Consider it a combination for the pupdial and the net-setup wizard, but for both the commandline and the GUI, and it's smaller than either of the other programs. Very Happy
Back to top
View user's profile Send private message 
nooby

Joined: 29 Jun 2008
Posts: 10557
Location: SwedenEurope

PostPosted: Fri 19 Feb 2010, 16:09    Post subject:  

I guess it is less embarrassing if I just leave it at that.

I think I do understant almost all of that but on a very primitive level.

what I asked was more like this:

What does one do with it apart from what you just descrbed. I got that part. the tech side of it.

I mean do you chat with people. Browse internet. Set up a server? Do survelliance of neighborhood. Manage Networks at your work..

Listen to internet radio. I mean what can it do socially or entertaining or communicating with others or what? Connecting two networks or what?
doing Tunneling or what? I kind of get the tech side of it but what is it for?

Just drop it if I made a fool of myself.

_________________
I use Google Search on Puppy Forum
not an ideal solution though
Back to top
View user's profile Send private message 
WarMocK


Joined: 05 Jul 2007
Posts: 169

PostPosted: Fri 19 Feb 2010, 16:16    Post subject:  

I connects your computer to a local network or the internet. No more, no less. Things common network wizards do.
Back to top
View user's profile Send private message 
WarMocK


Joined: 05 Jul 2007
Posts: 169

PostPosted: Wed 14 Apr 2010, 06:55    Post subject:  

Version 0.6 is up. See main post. Very Happy
clishot.png
Description 
png

 Download 
Filename  clishot.png 
Filesize  1.23 MB 
Downloaded  652 Time(s) 
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 2 [23 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Network
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0832s ][ Queries: 13 (0.0049s) ][ GZIP on ]