# $Revision: 1.12 $, last changes made $Date: 2001/05/22 06:17:50 $ // AutoNap 0.5.1 BEFORE YOU DO ANYTHING! ----------------------- Take into account that not all documented features are actually implemented ones. If you find a switch or so that doesn't seem to do anything, then wait for the next revision. ;-) By the way, try man 1 AutoNap.pl and man 5 autonap.conf for some nicely formatted manpages. Additionaly you may have to want a look at the PAGING section of the AutoNap.pl manpage. It explains how to use one nice little feature when scrolling through lists. Also throw a glance at the autonap.conf(5) manpage as it in detail describes the non-interactive mode as far as it is done yet. For a brief introduction to that, look at the manpage of AutoNap.pl itself. Configuring AutoNap: -------------------- From 0.1.3 on AutoNap.pl doesn't necessarily need any command-line switches. If you do not give any, it will assume you want to login to any network and AutoNap will prompt you for a username and password. The easiest way to login without having to fiddle around with the conffile will therefor be: AutoNap.pl -n Napster This will give you minimal control over the network which AutoNap will try to connect to. That's useful if you only have an account on a specific network. Default downloaddir will then be /tmp. AutoNap has a config file called autonap.conf (actually, it can have any name) which is passed to AutoNap with the -f switch, for instance: AutoNap.pl -f ~/autonap.conf The sample autonap.conf included in the package is complete as far as all keys are concerned. You just need to change a few of the values to make them fit your setup. autonap.conf(5) manpage explains how to do that. Using command-line switches: ---------------------------- You get a list of switches by making AutoNap.pl -h In current 0.1.0a release you probably have to set up the configfile. There is a sample one included, so just have a look at it and change "acc_user=foo" and "acc_pass=bar" accordingly to your needs. When you happen to have problems to login this may be due to one of the following: + you have no account on this network + its servers aren't reachable or full + seldom but possible: napigator is down. Try using the '-n' switch to specify a network you explicitly want to connect to, like: AutpNap.pl -f ~/autonap.conf -n MusicCity For me, the Napster and the MusicCity proved to be most reliable and, well, 'connectable'. You can also register a new account of you do not yet have one on a specific network. Simply launch AutoNap.pl -R -n MusicCity to create one on the MusicCity network. You will then get prompted for username and password you whish to use. You cannot yet create an account on a meta-server which is perhaps the reason why I couldn't create one on Napster. Will be fixed soon. Also: Usually the server to be registered on should return an email address in case all went fine. However, not all servers return one even though the login-procedure seemed to be succesfull. Then you can never really say whether your registration was successful. Well, try it. As you should have an up-to-date .autonap/list after each successfull log-on using napigator you can give the -c switch in order to speed up the startup. IN this case AutoNap will not contact napigator for servers but instead use the local copy in ~/.autonap. That's useful when napigator is down. Being inside AutoNap: --------------------- A login sequence might look like that: Trying opennap2.musiccity.com on port 8888 (63.196.54.2:8888)... Couldn't connect to 63.196.54.2:8888: This server is full (950 connections) Trying opennap21.musiccity.com on port 8888 (63.196.54.21:8888)... Success: Logged in with nickname DJPluto (AutoNap) In this case we had a failure on the first server we tried. Don't worry, AutoNap will keep on trying with next available server in its list. This now is followed by a greeting from the server you just connected to. If there is no message of the day awaiting you this wont mean that you are not connected. It just means there is no message. ;-) To get acquainted with some of the commands, type 'help' and it might look like: help ----- check browse ddown downs get help last ping quit search stream ----- 'last' will return the result from the last search (the equivalent for 'browse' is 'blast'). 'last' will return the .search. So 'last 1' returns the first search you made, 'last 2' the second etc. Simply 'last' or 'last 0' returns the last one. Since release 0.1.1. you have a few more commands, such as 'ping' and 'browse'. Use the 'help' command to make yourself acquainted with them. Typing 'help ' gives you further information: help get ----- get - tries to download given song - tries to download song 'n-m' ('all' for all) - tries to download songs 'n,m,o...' ----- The first thing you probably want to do is searching for some files: search beach boys||T3 No. |Song |Size |bit|len |speed ----|----------------------------------------------|--------|---|------|----- 1 |Venga Boys - Sex On The Beach |3.4 mb |128|3:42 |T3 2 |Beach Boys - Little Deuce Coupe |1.7 mb |128|1:52 |T3 3 |Beach Boys - Barbara Ann |2.1 mb |128|2:18 |T3 4 |Beach Boys - California Girls |2.5 mb |128|2:43 |T3 5 |Beach Boys - Don't Worry Baby |2.6 mb |128|2:50 |T3 'search beach boys||T3' means: Search for all songs from the Beach Boys with a linespeed of at least T3. If you do not specify ||T3 it will find songs with (by default) DSL speed. Type 'search beach boys||UNKNOWN' to really get all. Possible linespeeds are: 14K, 28K, 33K, 56K, 64K, 128K, Cable, DSL, T1, T3. Being tricky on searches, you can include or exclude patterns from your result: search beatles +michelle <=> search beatles -michelle On request I made it possible to interrupt the scrolling of a search without first having to type 'q'. That becomes handy when you urgently feel like having to download a song badly you just saw on the current page. Type 'g' or 'x' for that and you will get prompted for a number. If you didn't want to download anything at all, give no number and just hit enter and it wont download. If you want more information on a certain item (e.g. if the song-name has been truncated), type 'check ': check 1 ----- Song: Venga Boys - Sex On The Beach.mp3 Owner: jeffbuckleysucks Link: LINK_T3 Length: 3:42 min Size: 3.38 mb Freq: 44100 Hz Bitr: 128 kb/s MD5: 00000000000000000000000000000000 Addr: 128.91.41.108 ----- This MD5 line is the checksum calculated by some servers of the first 300 or so kB of a song. Currently, only Napster-networks seem to have such a checksum. As there is no use of MD5 at this stage (resuming downloads had been disabled by Napster for legal issues), we can live without it. With 'last' you can view again the result of your last search. Download with 'get'. If you want the first two songs of your search, type: get 1 get 2 OR: get 1,2 OR: get 1-2 'downs' shows the current running download job and progress. 'ddown' removes a download job. So, a sequence might look like: get 1,2 ****** Download: (from jeffbuckleysucks) Venga Boys - Sex On The Beach.mp3 started... ****** ****** Download: (from jpwilson) Beach Boys - Little Deuce Coupe.mp3 started... ****** downs ----- (1) - (from jpwilson) Beach Boys - Little Deuce Coupe.mp3 stats unkown (2) - (from jeffbuckleysucks) Venga Boys - Sex On The Beach.mp3 28916 / 3547624 = 0.82% ----- ddown 2 ----- Download: (from jeffbuckleysucks) Venga Boys - Sex On The Beach.mp3 aborted. ----- In case you cannot log-on: -------------------------- Often a server is full and therefore not accepting more connections. AutoNap hasn't yet a retry option to keep connecting until successful. You can however easily achieve that with a different way of starting up. Try it like this: while [ 1 ]; do AutoNap.pl -u foo -bar -S ; done If you quit from the server using 'quit' or 'exit' AutoNap will instantly try to reconnect because of this endless loop. In this case quit it with Ctrl+c. Notes on the non-interactive mode: ---------------------------------- You involve it with the -a switch, like: AutoNap.pl -u foo -p bar -f autonap.conf -n MusicCity -a >/dev/null & '&' will put it in the background which is what you usually want. If you do not pipe the output into /dev/null (or somewhere else...perhaps a file?) you get some debug-messages whose lone purpose has been helping me to program the whole matter. These will disappear in one of the next releases. The current non-interacting mode is more or a less a preview and mainly for discussing. Even though it exactly does what I coded I am not yet sure whether there is not space left for improvement. In fact, I am very sure there is. But for that I'd need a little bit of feedback from the users as I cannot anticipate all situations in which AutoNap is supposed to run. Do please do not hesitate to report me your criticisms. I myself want AutoNap to be as useful as possible. Notes on daemon-mode: --------------------- A common invokation would be: AutoNap.pl -u foo -p bar -f autonap.conf -n MusicCity -D If you do not pipe the command, output will do to stdout. For unkown reasons, the daemon wont yet properly run when backgrounded with '&'. I have no clue as to why it behaves strangely under these circumstances. In case you have screen installed, just do screen AutoNap.pl -u foo -p bar -f autonap.conf -n MusicCity -D and afterwards hit Ctrl-a d in order to detach it. Despite the fact that AutoNap now has a basic access-permission mechanism, you should not do the above command as root. That's a basic rule of dumping privileges as often as possible. The current protection is based on ip-ranges that AutoNap will check against the client's ip. I am myself not a network-hacker and thus don't know whether ip spoofing would work here. Just be restrictive with the ip-ranges and let AutoNap run as user and things should probably be ok and considerably safe. The -D switch has an optional argument. '-D 9999' would start the daemon on port 9999 instead of its default one 9876. If you start it thus you also have to call AutoClient.pl a little differently: AutoClient.pl 9999 where can also be 'localhost' if you run it locally which does make sense. That's it: ---------- The above should give you an idea of AutoNap and how to run it and how it looks. Have fun and send comments, bugs, proposals, money and stuff to