|
|
The SpyAmp readme (included with download)
Copyright (C) 2000-2002 Jonas Jensen
Get the latest version, and source code, at
spyamp.sf.net
- What is SpyAmp?
SpyAmp is a simple web server plugin for
Winamp that allows people to connect
to your computer using a browser and see what you're playing. If
you set permissions accordingly, you may also allow downloading of
music files.
- Installation
Winamp 2: Make sure gen_SpyAmp.dll is in your Winamp\Plugins folder.
Configure it from the Winamp preferences dialog, under the "General Purpose"
section of "Plug-ins".
Winamp 3: Make sure SpyAmp.wac is in your Winamp3\Wacs folder.
Configure it by clicking on the icon in the "thinger".
I develop SpyAmp on Windows 2000, and I do not test it on
95/98/NT4/ME/XP, but it should work. Win95 users
need the Winsock 2 upgrade from Microsoft.
SpyAmp was written for Winamp 2.x, and that's where it works best. You will
get the best results on Winamp 2.x above 2.80, but Winamp 3.x is reported
to work okay too.
The generated HTML is best seen with a CSS-compatible browser -- the
same goes for this readme, and the
SpyAmp website. I test
it in IE,
Mozilla, Konqueror
Konqueror and
Lynx, but most others should
be fine, since there is no script.
- Usage
SpyAmp will work out of the box with the default settings. To test it, use your
browser to open "http://localhost:<port>". You can find the port
in the configuration dialog, but it's usually 80 and can therefore be
omitted, so you just have to type "http://localhost".
For other people to connect to you, they of course have to replace
"localhost" with a reference to your computer. If they're on the same LAN
as you they just have to replace localhost with your computer name. Depending
on your Windows version you can find this name in either Properties of My
Computer or Properties of Network Neighborhood.
To use it over the Internet you must first find your public IP. You can see
it here. Replacing localhost with this
IP address should send people to the right place. If that doesn't work, it's
probably because you're behind a NAT router or firewall. This is likely if you
have a DSL connection or if you're trying to use SpyAmp from work. This could
mean that you're simply out of luck unless you have a way to configure this
firewall/router so that a TCP port from the outside is forwarded to your machine on
the inside. I cannot help you with that because it's specific for each type of
router, so you need to look in the manual or ask your local geek for support.
If you get it to work and get a friend to test it, you should type the port
people can connect to in the "Firewall port" configuration option in order to show
up in the server list.
This is usually the same number as "Listen port".
To find other spyamp servers, go to the
official list
on the SpyAmp home page. If you've checked the "Register with master
server" box in the configuration, your own computer can also be seen
here.
- Configuration settings
To configure SpyAmp in Winamp 2.x, right click in Winamp and choose
Options->Preferences->Plug-ins->General Purpose and double-click
SpyAmp. Winamp 3.x users can just click the icon in the Thinger.
- Enable this plugin
- Default value: ON
- Register with master server
- This will put your computer on the list of active hosts at the SpyAmp
home page.
Default value: ON
- Enable logging
- Writes a log to the file SpyAmp.log in the Wacs\spyamp folder.
Each line is preceded by a date and a log type code. It's not
very easy to read yet, and you need some understanding of
TCP/IP to appreciate it. Be careful that the log file doesn't
grow too big if you leave logging on all the time!
I will try to write a more useful statistics feature some time.
Default value: OFF
- Password
- If you wish to grant higher permissions (see below) to
authenticated users, set this box. Leaving it empty will disable
the "With password" privelege level. When a password is set,
a login option will appear on the main page.
Even if you just set it to 3 characters, the box will be filled
out with asterisks when you re-enter. This is for security, and
because the password is not stored in it's original form -- it's
impossible to recover/decrypt after you have set it.
Default value: empty
- Permissions
- You may set permissions for Anonymous users, as well as those
who have logged in with a password. The default settings depend on what
connection type you report in the first-time wizard after installing.
You cannot disable access to viewing the current track. If that's
a problem, don't use the plugin, or use a port that people won't find.
- View playlist
- List track titles/numbers in your playlist.
- Download current track
- Allow downloading of the currently playing track.
- Download any track
- The "Playlist" page will be equipped with download buttons
for each track.
- Advanced options
- Listen port
- The TCP port that people must connect to.
If you pick a port that's already taken, SpyAmp will try other
ports without telling you.
Default value: 80
- Firewall port
- If you are behind a NAT firewall that has been configured to
redirect incoming traffic from a specific port to your SpyAmp,
type this port here so that people from the Internet may reach
your server. This field should be set to 0 unless you (or your
sysadmin) have configured the firewall to handle SpyAmp, and
tested it.
Default value: 0
- Max. connections
- If you're on a slow connection, you might not want more than a
few people to download from you at a time. Increase this value
if you're on a LAN and you don't mind a lot of downloads.
When this value is exceeded, users will receive a "Server busy"
message. If it's exceeded by more than a factor of 2, the server
will stop listening until it comes back down.
Default value: 20
- Colors
- These are the colors, as they will be seen by the client who
connects. The default ones are plain and boring, so be sure to
change them into something more exciting!
If you know HTML, you know what to do with these. You can use
the SRGB color codes, or one of the 16 color names:
Black, Silver, Gray, White, Maroon, Red, Purple, Fuchsia, Green,
Lime, Olive, Yellow, Navy, Blue, Teal, Aqua.
Click on the "..." button next to them to get a Windows color
picker if you don't want to type codes.
Default values: #FFFFFF, #000000 and #0000FF (white, black and blue).
- Message of the day
- This text will be displayed on the front page. Write anything --
a greeting, a funny quote, download policy or something else.
HTML formatting is used, which means that if you want to make
line breaks you have to type <br>.
Default value: empty
- Server name
- If you checked the option to register with master server, this will
allow you to set a name to identify/advertise yourself on the server
list.
Default value: "Anonymous"
- ICQ number
- Enter your ICQ number here,
so people can contact you... if that's what you want.
Default value: empty
- Frequently Asked Questions (FAQ)
- After 999, the playlist numbers wrap back to 000, 001, etc.
- This is not a bug in SpyAmp, but a bug in some versions of IE. Look
here for more information.
- I don't show up in the server list
- This happens because SpyAmp tries to detect if you're behind NAT, and in that
case your request to be on the list will be silently ignored. I've made it act
like this because it won't work in 95% of these cases, so it helps to avoid
a lot of dead entries on the server list. Look at the Usage section of this
document to find out what to do, but remember that depending on your ISP it
might not even be possible.
- Can I customize the output more freely than just changing the colors?
- Yes and no. There's no easy way to do it, but it can be done by downloading
the source code and changing the HTML I've hardcoded in there. For help look
here and
here.
Many people have suggested html templates/skins where you could type e.g.
"Current Song is: %song% By: %artist%" and SpyAmp would just insert the right
values. This is a feature on my TODO list, but I expect that it'll be hard to
implement. Don't count on it to be done any time soon. If you have programming
skills and want the feature, please download the source code and try to
implement it.
- I want to link to my SpyAmp from my home page, but the link shouldn't be there
when my computer is turned off.
- There's no easy way to do this without doing some programming. Look for
inspiration
here. If you figure out a more clever way to do it, please publish it so
I can link to it.
- How do I include SpyAmp as part of my web site?
- Again, there's no easy way to do it. Look for inspiration
here and
here. If you figure out a more clever way to do it, please publish it so
I can link to it.
- I get "ALERT possible hacking attempt, URL too long!" in my log file.
- There's no need to worry about it. In 99% of all cases it's caused by worms
such as Code Red or Nimda that attempt to exploit security holes in IIS, and
it won't harm SpyAmp. If it annoys you, configure SpyAmp to listen on a
different port than 80, and then the problems should go away. If you still get
these alerts even if you're not using port 80, you might have a reason to be
worried.
- What about security holes/back doors?
- The source code is freely available, so you can check it yourself
to make sure I didn't put in any backdoors ;-). I have done a lot to make it
cracker-proof, and so far I haven't had any reports of security holes.
If you find any security flaws in SpyAmp, please let me know
as fast as possible.
-
- Known bugs/limitations
Contact me if you have hints on how to fix any of these issues.
Patches are gratefully considered!
- A blank window will pop up after configuring in Winamp 3. Annoying...
- SpyAmp does not completely conform to the HTTP standard. It works
with every user agent I've tried, though. HTTP/0.9 clients are
probably out of luck.
- The server does not support persistent connections.
- Project files are provided only for the MSVC6 compiler. If you
port this code to other (preferably free) compilers, please let
me know.
- The server uses the Content-Disposition response header for
informing the client about the filename. If your user agent doesn't
support this, you'll see filenames like "download-file?19".
- If the SpyAmp user rearranges his playlist, a client may be looking
at an outdated version of it and therefore download the wrong songs.
- The source code is ugly.
- Version history
1.6.3 - 2002-09-23
- Plugged a handle leak when creating threads. (Jonas Jensen)
- Fixed a potential race condition when writing to the log file
(Jonas Jensen)
- Nullsoft fixed the quit() bug in Winamp 2.80, so I can now do proper
cleanup. That means a weird accept() error no longer appears in
the log when quitting.
- A handful of cleanups were backported from 2.0.2 (Jonas Jensen)
2.0.2 - 2002-09-16
- First release that works with Winamp 3. (Sam Allen)
- Plugged a handle leak when creating threads. (Jonas Jensen)
1.6.2 - 2002-05-27
- Fixed a bug introduced in 1.6.1 that made the VIP area unusable
1.6.1 - 2002-05-22
- Removed the self-distribution feature -- a nice gimmick, but it
had too much potential for spreading trojans and old versions.
- Moved all the configuration and resources into a PLUGINS\spyamp
folder so it doesn't make a mess in the PLUGINS folder.
- Added /plain_playlist page to make things easier for indexing robots
- Removed the ability to choose what local IP spyamp should bind to
(the "Listen IP" setting).
It worked fine, but people kept thinking they were supposed to change
it, making it annoying to support.
- Almost converted everything to XHTML but reverted it to stay
compatible with older browsers.
- Added a lot of documentation.
- Minor bugfixes everywhere
1.6.0 - 2001-03-06
- The "First time setup" wizard that helps you configure the most
important options.
- Colors can now be selected with the familiar Windows color dialog
box.
- Will not attempt to contact master server if Windows (IE) is in
"offline" state (fixing problems for dialup "Internet Connection
Sharing" users, and people with lame win9x auto-dial configurations).
- Added measures to prevent firewalled people from showing up
in the server list. This method will detect if they're behind NAT.
- Default port is now 80, and other ports will be tried without
disturbing user if it's unavailable.
- Fixed bug in 1.5.2 that came up with a 404 when trying to
download the plugin directly.
- Many people think they understand the "Listen IP" setting, but
they don't! SpyAmp will now fall back to the default value if
user specifies an invalid listen IP.
- Removed the console window that used to pop up the first time when
you installed a new version.
- Brought many sections in the readme up-to-date.
- Increased read buffer when sending files, giving better performance
on LAN.
- Rewrote header parsing algorithm for better standards conformance.
- Made http server work with LF-only requests.
- As usual, a lot of code cleanup!
1.5.2 - 2000-12-16
- Made the skin names look prettier, e.g. "My_Skin[1].wsz" is
turned into "My Skin".
- Removed all references to mp3 when downloading files - this
should help it get through evil filtering firewalls.
- Tweaked performance a bit and cleaned up init() source, fixing
a few potential bugs.
- Fixed a bug that could make an evil user crash your Winamp
by not giving a parameter to a page that expects one.
1.5.1 - 2000-12-05
- Added "ICQ number" option and put some server info on the
main page.
- Addes some reserved 0-space to the configuration, so
config hopefully won't have to be reset so often with new
versions.
- Cleaned up the GUI part of the source code.
1.5.0-1 - 2000-12-02
- Fixed Win98 problem with default motd setting.
1.5.0 - 2000-11-28
- Added option to register with master server.
- W3C-validated HTML output.
- Fixed ugly memory leaks and multi-thread sync problems.
- Changed the HTTP version from 1.0 to 1.1 and changed status codes
and headers for better compliance with
RFC 2068.
Clients are expected to either run HTTP 1.1 or to accept HTTP 1.1
responses to 1.0 requests. I haven't seen a browser that doesn't
do this.
- Smarter/faster installer-rebuild decisions.
- Permission checkboxes disallow "nonsense" combinations
1.4.0
- Redistributes itself with a self-extracting PiMP installer.
- Added link to the new
SpyAmp website.
1.3.1
- Refresh time upped from 10 to 30 secs to make it better suited
for the Internet.
- Password-authorization now possible.
1.3.0
- Bugfixes and optimizations... many!
- Readme included.
- Source GPLed.
- Source cleaned up.
- Nicer HTTP parsing
1.2
- A true multithreaded Winamp plugin, supporting everything that
the previous version did, and downloads.
- Configuration possible.
1.1
- Inetd based, written in C. Could not get text strings from
Winamp because it was running in a different process.
1.0
- ASP-based, required IIS and
WinampCOM.
- Basic support for viewing current track & playlist.
- Didn't work for anonymous users on NT/2k because the WinampCOM library
didn't support the IIS process running as a different user than Winamp.
- License
SpyAmp is GNU General Public License, which means that it's free and
open-source. Read SpyAmp_license.html for details, or find it at
gnu.org.
- Uninstallation
Delete all files in your Winamp\Plugins folder whose names start
with "gen_SpyAmp" and the "spyamp" subfolder. You can kill the
registry settings from
HKEY_CURRENT_USER\Software\Bones0\SpyAmp.
|
|