Important alert: (current site time 7/16/2013 3:39:39 AM EDT)
 

winzip icon

Napster Client with Chat

Email
Submitted on: 6/6/2000 7:04:15 PM
By: moccasin  
Level: Intermediate
User Rating: By 14 Users
Compatibility: VB 5.0, VB 6.0
Views: 22693
(About the author)
 
     This is a Napster client with chat example! It's like my last Napster client example except I've fixed a TON of bugs/problems, made it a little bit more efficient, made the code a little neater, and of course.. you can now chat with this! I've also included more information on how to communicate with Napster's servers using VB incase you would like to add additional functionality to it. Vote if you like this example!
 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 2 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

6/6/2000 10:00:26 PMmoccasin

The last submission used to give random chars within the MOTD, acted strange after the first download, and incoming packets sometimes would be interpreted in the wrong way.. those bugs are now fixed.

Remember, this is an example for educational purposes..

Anyway, I liked this so much, I put in a vote for myself ;)
(If this comment was disrespectful, please report it.)

 
6/7/2000 12:47:21 AMDetonate

Gnapster Vulnerability: It is possible for anyone to obtain any user-readable file by sending a properly formed "GET" command that contains the full path of the file. This vulnerability exists because Gnapster fails to check that the requested file is an explicitly shared MP3 file before providing it.
Source: http://www.tlsecurity.net/archive/exploits/05_00/%5b05.11.2000%5d_gnapster.txt

--

Just
something to be aware of :-)

(If this comment was disrespectful, please report it.)

 
6/7/2000 10:03:49 AMSteSoft Software

VERY NICE....SO I GAVE IT EXCELLENT
(If this comment was disrespectful, please report it.)

 
6/7/2000 10:12:14 AMSteSoft Software

Do u want me to translate it into Swedish?...i can do it for you!!!
(If this comment was disrespectful, please report it.)

 
6/7/2000 4:57:39 PMNick Taylor

I get an error saying I am unable to download the songs saying something about possibly being behind a firewall. Does anyone else have trouble downloading songs?
(If this comment was disrespectful, please report it.)

 
6/7/2000 6:40:58 PMBiznatchasaurus

hmmm...I can't even connect at all. Says "Connection timed out". Yet, I can fire up Napster, and connect no problemo, same account even.
(If this comment was disrespectful, please report it.)

 
6/7/2000 8:11:44 PMmoccasin

Stesoft, thanks. uhm.. a Swedish translation?
(If this comment was disrespectful, please report it.)

 
6/7/2000 8:26:40 PMmoccasin

Nick Taylor, it gives that error when
the *other* client (i.e. the remote client
you are trying to download from)
returns listening port "0". Please
reread the intro
comments.

Biznatchasaurus, it's not
a bug. It's a server issue. It's likely
you used the program once or twice then
gave up (?). Whether you connect or not
depends on what server the main napster
server gave you. If the server it
redirected you to is busy, then you
will not connect. If the main server
itself is busy, it will redirect you to
your own computer - "127.0.0.1"

for
example... When you used this example,
it probably gave you server A, which
happened to be busy at the time. But
when you started up the official
windows client, it probably recommended
server B, which happens to be
available. Email me if you continue to
have problems.

(If this comment was disrespectful, please report it.)

 
6/9/2000 4:04:36 PMJay L. Bray

Yep, when the server is busy it'll send you an IP od
(If this comment was disrespectful, please report it.)

 
6/9/2000 4:08:52 PMJay L. Bray

Screwed that last one up...

When the server is busy, it'll send you an IP of "127.0.0.1" and Port "1111" - atleast I did....

Also if when trying to download, you get a port of "zero", you need to send a "500" command to the server to request the remote client "push" the file to you...

I too am working on a Nap Client, but using winsock api...


(If this comment was disrespectful, please report it.)

 
6/9/2000 5:22:13 PMWÏ©kÊÐ_WΣ£ÿ

Nice work I like it alot. I hope to see more improvments. I am going to work with it alittle my self 2. keep it up
(If this comment was disrespectful, please report it.)

 
6/11/2000 1:59:00 AMShawn Ramsey

You should use microsofts listview listbox for the search results, not a lot of listboxes in a row, if you dont know how IM me w/ AIM or Aol at Utopiaprez

nice project...
(If this comment was disrespectful, please report it.)

 
6/11/2000 6:27:09 AMSteSoft Software

Keep update this....it can be very good
(If this comment was disrespectful, please report it.)

 
6/16/2000 1:38:44 AMmoccasin

Jay, yep and good luck with your client. Willy, thanks. Shawn, I was considering using listview but then I thought I'd leave it with the basic controls (with the addition of just the winsock control) for this example.. SteSoft, I'll see what else I can add/fix..

Michael, I got your email but I couldn't respond. When I tried I recieved a message undeliverable error (550). Anyway, concerning your question, I'm not sure but I guess the limited search results you were experiencing with your client could be a server issue of some sort (?). And about the pings, yeh the official windows client filters with pings which can make the results appear more scanty than they actually are (mine doesn't by default automatically, thus showing all results all the time). But I don't think the ping has much to do with it since you were recieving 2-6 packets from the get-go. Hrmm.. dunno.. sorry can't be of much help.
(If this comment was disrespectful, please report it.)

 
6/19/2000 4:10:01 PMJay L. Bray

Limca3, After I have the firewalled downloading section finished I'll post a rough walkthru for it.
I'm currently working on the file server section now... Are you using winsock.ock or winsock.dll???

(If this comment was disrespectful, please report it.)

 
6/21/2000 11:00:49 AMJay L. Bray

For those who haven't found the napster protocol doc. look here:
http://opennap.sourceforge.net/napster.txt

The 500 messsage is explained in here...

(If this comment was disrespectful, please report it.)

 
6/22/2000 8:07:50 PMlimca3

i got firewall downloading down, and i can do it perfect!
what i need help with is when i download from a not-firewalled user, i have a problem that the downloaded file is smaller than the orgianl and the remote user disconnects about 2 sec's before downloading is finished, then it says on the remote user file is downloaded u know whats wrong?
(If this comment was disrespectful, please report it.)

 
6/27/2000 10:39:28 PMVasilis Sagonas

This program rulez! You deserve the excellent vote :)
(If this comment was disrespectful, please report it.)

 
7/9/2000 10:43:07 PMJosh Brown

Exellent program. I just had to vote because this program is great. I also like how you commented unlike some other programmers on this site. Great job. Keep up the good work.

Josh
(If this comment was disrespectful, please report it.)

 
7/17/2000 10:43:41 PM(\/)enace

when I try to connect I get an error on the sub's replace, and split is there a bas you forgot to add, or am I not doing something, please help me
(If this comment was disrespectful, please report it.)

 
7/18/2000 2:27:52 PMmoccasin

I guess you didn't read the intro comments on the main form.... Anyway, it's because you're not using vb6 (those are vb6 functions), but you can find equivalents to these functions somewhere on this website.
(If this comment was disrespectful, please report it.)

 
7/20/2000 5:26:47 PMmoccasin

haha, I just noticed something... It says vb5 on the compatibility field - whoops! Hrm.. it mustve got reset to that when they changed the vb5/vb6 category into distinct seperate fields. Ahh well.

Anyway, this was designed with vb6 people.
(If this comment was disrespectful, please report it.)

 
7/23/2000 10:22:50 PMRubenm14

Man For Some Reason! I can't search it doesn't list anything! Iwould list couple of songs and their title and it will not even show 1! Even tried popular "Slim Shady" see if it could track that one down! nothing. If you can help me with this error in the next 24 hours i'll rate it excelent if not i'll rate it poor.
Thanks, & Sorry Ruben
(If this comment was disrespectful, please report it.)

 
7/24/2000 2:40:03 PMmoccasin

Ruben,

Gee now doesn't that threat just make me wanna jump up and help ya...

Although I haven't worked on this code for over a month now, I took a breif look at it to see if I could identify the bug. It seems the example has already become a bit outdated. The glitches that are preventing the search results from being listed involve the MOTD and the list sorting routine. Anyhow, to fix it take out the entire select case step routine, in the main form, and make the code work entirely off of If/Then condition statements to determine what type of data is what message (rather than select case step, and If/Then)...or you can change the "if instr(data,'want to promote') then" line to reflect whatever the current last line of the MOTD is (i.e. "if instr(data,'thanks for your support')").
(If this comment was disrespectful, please report it.)

 
7/24/2000 2:43:30 PMmoccasin

Perhaps I'll upload an update to this, but don't hold your breath. I only wrote this code to see if I could, and I did so there's pretty much no incentive anymore :) I included what I consider a very detailed explanation of how this vb example works, so any newbie can fix it up so it functions like new...
(If this comment was disrespectful, please report it.)

 
7/26/2000 11:39:04 AMCousinduck

Moccasin, thanks for that last update. Even though ruben was a jackass, it seems to relate to a problem I am having. If it fixes my situation, I'll let you know.
(If this comment was disrespectful, please report it.)

 
7/26/2000 11:56:13 PMRyan

Very nice code, no problems here at all
(If this comment was disrespectful, please report it.)

 
9/24/2000 6:21:13 AMVolcano_88101

Great Idea
Bad GUI
Great Login Process
Bad Code
None of your code works
You Log in and after that thats about the only thing that works
You people forget that Napster will send several types of data @ the same time like Size of Library and Napster Search Results. You retrieve only part of the MOTD. Your Search routine doesn't work. I had to go in and edit your code so it works. It turns out you were never letting it search so I had to make your Search Routine a Separate Step. After I finally fixed all of your Search Bugs (And it would have been easire to use a List View Control ) every thing that I tried downloading from was either behiind a Firewall or would send another error message.
Your code needs lots of improvement. I don't even know how you got the awards that you did because nobody can search for anything.


(If this comment was disrespectful, please report it.)

 
10/1/2000 3:09:38 AMmoccasin

I haven't been on napster in over 3 months since my old pc crashed. As indicated by your comments, this code is now obsolete. Almost completely defunct. In my haste and excitement to finish my first major personal project during the beginning of summer vacation I created a quick and somewhat confusing example, instead of a more stable, efficient, cleanly coded client. How did I get so many votes? Well, for nearly the same reason a good percentage of households in the U.S. had the Atari or regular Nintendo at one point or another. Even though these game consoles aren't much more than cheesy 2-8 bit laughable graphics now, back in the days we all know it was the iisshh (or that's what I hear). :)
(If this comment was disrespectful, please report it.)

 
10/1/2000 3:10:50 AMmoccasin

Of course, at one point this thing did work perfectly and was one of the first functional napster clients made in vb. I don't believe its completely fubar. I don't have vb, or napster, yet on this pc so I can't confirm that. But I suppose recovery might be possible and relatively simple if the basic protocol is the same.
(If this comment was disrespectful, please report it.)

 
10/29/2000 9:49:47 PMmoccasin

Do you have a new VB napster client coming? If so I got a really good Idea on a project we could do.
(If this comment was disrespectful, please report it.)

 
4/25/2001 12:20:18 AMAnon

Can someone please post one of these napster clients that actually works? I can connect with this one, just when i try to search it does aboslutely nothing. So please can someone just post one that works.
(If this comment was disrespectful, please report it.)

 
5/17/2001 6:50:52 PMJapeth Starlite

yeah whatever, it doesn't search
(If this comment was disrespectful, please report it.)

 
3/27/2003 10:15:51 AMMichael D.

pretty good, do u guys go on opennap/slavanap servers now?
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.