Wikipedia:Reference desk/Archives/Computing/2007 November 25

= November 25 =

spyware removal
are there any anti-malware programs which you can download for free, do not hyave to register and will remove spyware? The Updater would like to talk to you! 01:09, 25 November 2007 (UTC)


 * Yes, try Spybot Search & Destroy or Ad-Aware 2007 Free. --24.147.86.187 (talk) 01:34, 25 November 2007 (UTC)


 * Those two are good, safe, choices. But beware of companies offering such things in general - sometimes they are in themselves merely tricks to get you to install software that contains malware.  Before installing any of them, do a Google search and see what other people are saying about them. SteveBaker (talk) 07:27, 25 November 2007 (UTC)


 * ok, but don't they have to be registered online before use? The Updater would like to talk to you! 11:42, 26 November 2007 (UTC) —Preceding unsigned comment added by WikiHaquinator (talk • contribs)


 * I have used Spybot Search & Destroy for some years and you don't need to register as far as I can remember. I haven't had any problems with it and it seems to get rid of anything nasty. GaryReggae (talk) 12:57, 26 November 2007 (UTC)


 * Windows Defender is free for users of Windows XP (Vista should already come with it) and doesn't require registration. Some people don't like it because it's Microsoft but do you really have any reason to trust Lavasoft et al anymore? In any case, if probably want at least 2 anti spyware software programs Nil Einne 08:17, 1 December 2007 (UTC)

Getting cookies earmarked for another domain
I'm not totally sure I have my head wrapped around HTTP cookies, but here's what I want to do:


 * 1) I am running a PHP script on mydomain.com. Its goal is to access anotherdomain.com as a spider—it accesses it programmatically, getting data.
 * 2) anotherdomain.com is only available to those with a username and password and uses a cookie as its authentication scheme. After authenticating, the site deposits a cookie with the name "adomaincookie" and a hash value. The cookie's domain is set to anotherdomain.com.
 * 3) What I want to do is have my php script at mydomain.com be able to get the hash value for "adomaincookie". Once I have that, I can have it send to cookie to the site as part of its HTTP request.

I don't have any access to anotherdomain.com other than as a user, do I can't edit any of its coding or whatever. Is it possible to do this? The name of the cookie does not change, but its hash value does. At the moment I have been manually looking it up in my browser's cookie list but this isn't practical—is there a way to automate the retrieval of this cookie that the other site has set? I've searched around but can't find a way to do it. Any thoughts would be appreciated. No, this is not for any nefarious deed, I am just doing a little data mining. --24.147.86.187 (talk) 01:32, 25 November 2007 (UTC)
 * I don't think you can. Otherwise it would be a serious security problem. If someone has your cookies, they can often log into sites you have been or retrieve other private information.


 * I suggest you use a program running directly on your computer (rather than from the Web); then it can access your cookies. --Spoon! (talk) 07:45, 25 November 2007 (UTC)


 * Yeah - but that wouldn't allow him to write a site that pretends to be PayPal by passing data transparently to the real PayPal whilst spying in on the data stream along the way. (I'm kidding - but that's the real reason why this doesn't work.) SteveBaker (talk) 08:40, 25 November 2007 (UTC)


 * Sure, but you'd think that any hash algorithm would at least factor in the IP address of the person using it so that it wouldn't work from another IP. (Whenever I do a hash I make sure the IP address is one of the factors because that alone helps a ton security-wise.) I guess what annoys me is that it is a trivial thing to get the cookie data with a program outside the browser, so by itself the security issue would already seem to be in theory quite compromised if that alone was the issue, but I understand why making it a little harder would be the case. Hmm, oh well, I'll figure out some sort of work-around. --24.147.86.187 (talk) 16:49, 25 November 2007 (UTC)


 * How is this a security issue? He wants the bot to log in with his own information, and keep track of his own cookie, so the bot can access the site. This does work- I've done it before- and it's not a security risk. Unless browsers are a security risk, because all he's asking is how to make his bot act like a browser in that it keeps track of cookies and returns them when asked -- ⁪ffroth 01:22, 1 December 2007 (UTC)

Fine print question
I was downloading realplayer when I stumbled on this in the fine print:

6. FIREWALL CONFIGURATION. The Software configures certain firewall applications such that the user is not alerted when the Software requests or receives data necessary for playback content over the UDP protocol.

What's UDP protocol? Yeah, I read the article on it, but it just looks like it was written in another language. Thank you. --Jeevies (talk) 06:10, 25 November 2007 (UTC)


 * In order to explain what UDP is, I first have to explain what it isn't. There are two main mechanisms ("protocols") for talking over the Internet - TCP and UDP.


 * TCP (Tramsission Control Protocol) is used for most things where it is vital that the data get there intact but which are not time critical (things like email and web surfing) - every piece of data that is sent has to be acknowledged by a response from the computer that was receiving that data. This enables chunks of data ("packets") that go missing can be retransmitted.  There are even mechanisms that retransmit data anyway if an acknowledgement isn't received by the sending computer because the acknowledgement data got lost!  TCP is complicated and relatively slow.


 * For other kinds of data - where a missing piece of data is not the end of the world - the UDP method (which stands for User Datagram Protocol) is much cheaper and more lightweight. The sending computer sends the data and just kinda hopes that it gets there - if it doesn't, it doesn't and that's that.   UDP is fast and efficient - but unreliable.


 * For something like RealPlayer, where data is time-sensitive, TCP is overkill and inefficient. If a frame 123 of a a particular video or sound file goes missinng - then by the time the receiving computer realises that it's got frame 122 and frame 124 has arrived, but 123 is missing, then sends off a 'packet went missing' message and the sending computer retransmits frame 123, the receiving computer is probably already in need of frame 125 and you (the user) already saw a jerk or heard a glitch in the stream.  So rather than messing around re-sending data that's already too late to be useful, it's more efficient to use UDP to send it.


 * There are common firewall settings that are intended to make your computer more secure by turning off protocols that you aren't using in order to give "The Bad Guys" one less way to attack your machine. Since (I suppose) UDP might be one of them, they have the RealPlayer installer switch the firewall settings over to allow these particular UDP packets to pass through the firewall instead of being blocked.  That's something you might (rightly) feel outraged about if they didn't get you to agree to it up-front.


 * UDP is also commonly used in online games where the fact that your opponent is now standing 5 centimeters to the left of where he was 30 milliseconds ago is a piece of information that's only useful to have for the next 30 milliseconds - by which time it's out of date. If it goes missing, there is no point in resending it, it's better to wait for the next update that says that he's now 10 .5 centimeters to the left.   So those kinds of routine updates go via super-efficient UDP.  On the other hand if he shoots at you - then that's a rather crucial piece of one-time data - which the game probably sends via TCP.


 * SteveBaker (talk) 07:21, 25 November 2007 (UTC)

Wow, thank you very much! I really like the online game analogy, since that happens to me lots. :D --Jeevies (talk) 08:17, 25 November 2007 (UTC)


 * Excellent answer, Steve. Mac Davis (talk) 05:04, 27 November 2007 (UTC)
 * You need to play more counter-strike steve! I mention CS because the gameplay is so intensely focused on consistent and unfaltering perfection in player skill.. the technical side of the game is actually a huge concern and Valve lets you control a lot of the networking settings to tweak it for your needs.. changing servers or geographical location can wreak havoc with your skill because it just "feels" different! Yeah, it's that important. Anyway, since it's so important most players are very familiar with networking glitches in CS. It's an extremely commonly-known phenomenon that when your packet loss is high, your shots sometimes don't even register at all (and by sometimes I mean like 1 in a thousand times, but like I said unfaltering perfection). See this page for the CS player common-knowledge explanation, and this if you're willing to dive in headfirst -- ⁪ffroth 23:45, 30 November 2007 (UTC)

Unix question: Getting specific lines from a text file
In Unix, head gives me the first n lines from a text file, and tail gives me the last n lines. But how do I get n lines starting from line x? The way I do it now is to first use head to get the first x+n lines, and then use tail to get the last n lines of that. But is there a way to do it by only using one command, and not having to calculate x+n? J I P | Talk 12:57, 25 November 2007 (UTC)
 * sed -n '10,15p' yourfile
 * or if you have a very large file you can make sed quit scanning after the desired line for speed:
 * sed -n '16q;10,15p' yourfile
 * Also possible with awk and perl, and I've seen the command "body" to complement head and tail. Weregerbil (talk) 13:14, 25 November 2007 (UTC)


 * My friend Philip Lantz once invented a little general-purpose utility "line" for extracting arbitrary lines from a text file or stream. I find it extremely handy.  (Yes, I could use sed, but I find "line" to be much more convenient.)  You can find my implementation at http://www.eskimo.com/~scs/src/#line.  If you use its -f  and -p options, it will do the x+n math for you. —Steve Summit (talk) 17:07, 25 November 2007 (UTC)


 * I find the solution of piping the output of head into tail very satisfying - but the pain of calculating x+n is certainly not negligable.  So write a shell script - you can easily add x and n using shell commands.  I use 'tcsh' out of familiarity - it lets you do math on shell variables using the '@' command - there is bound to be a way to do it with bash also:

#!/bin/tcsh # List the first N lines of a file starting at any given line. # $1 - first line in file (files start at ZERO!) # $2 - number of lines # $3 - filename @ end = $1 + $2 head --lines=$end $3 | tail --lines=$2


 * SteveBaker (talk) 18:42, 25 November 2007 (UTC)


 * The bash equivalent to the  line is   or  ; the latter syntax lets you put arithmetic anywhere without having to assign it to a variable (so that one could use the single line  ).  A nice point is that you can use all the augmented assignment operators (like  ) out of C.  --Tardis (talk) 17:41, 26 November 2007 (UTC)
 * I forgot one option: if you don't like  you can write   as a command.  This lets you write reasonable-looking things like  .  --Tardis (talk) 17:52, 26 November 2007 (UTC)
 * Or if you don't want to worry about which shell you're using, just use  like the gods of Unix intended. :-) —Steve Summit (talk) 23:55, 27 November 2007 (UTC)

tail +10 foo.txt | head -5 will give you five lines from foo.txt starting at line 10. The "+" symbol tells tail to start counting lines from the beginning of the file rather than the (usual) end.

Atlant (talk) 15:42, 26 November 2007 (UTC)

Keyboard + Trackball
Does anyone recommend a cheap bluetooth keyboard with a built in trackball or other "mouse" type device? I want to be able to sit on my couch and use my Mac mini using just the keyboard and whatever is built into it. —Preceding unsigned comment added by 71.195.124.101 (talk) 16:49, 25 November 2007 (UTC)
 * Have you tried using a Wii remote? I found a BT track ball here . Google is your friend! --24.249.108.133 (talk) 17:11, 29 November 2007 (UTC)

Wine on Leopard
Does anyone have any idea on how to build Opengl/Direct3D support into Wine for leopard? I downloaded the latest version, and it builds fine. The only problem is that it says it can't ind OpenGL on my system! Non 3D programs work fine in Wine, but gaming just crashes. I'm using a macbook pro. Please help! —Preceding unsigned comment added by 71.195.124.101 (talk) 18:19, 25 November 2007 (UTC)


 * No clue but these seems to be a common problem. Some discussion of it here. Sounds rather complicated. --24.147.86.187 (talk) 19:06, 25 November 2007 (UTC)

Python Console Focus
I've got a Python program that performs some animation in a Tkinter window, but uses the getch function from msvcrt to handle input. Is it possible to code the program to switch the focus back to the console after the window initialises, so that the user doesn't have to Alt Tab ? Robmods (talk) 18:37, 25 November 2007 (UTC)


 * You might succeed if you try using the win32api extension to call the SetFocus win32 api call. Alternatively, if you're just using the window to draw in, you might consider using PyGame instead of TkInter - both drawing and getting keyboard events are particularly easy in PyGame. -- Finlay McWalter | Talk 22:57, 25 November 2007 (UTC)

There is a full pvp mmorpg???
I want to know if exists a mmorpg that is only (or almost only) pvp.

I know that there are games like dark age of camelot, but in dark age of camelot you have to enter in zones to pvp, there are many mmorpgs like lineage 2 where the pvp is a very important part of game, but in none of then (at least the games that i saw) they are the main part of the game.

An example: Imagine planetside game, planetside is a pvp mmo, and the main aspect of the game is pvp, even if the team put some npc aliens or animals on some planets, this will not make planetside a PVE or PVM, because those aliens would be just a extra thing for the game, so the focus of the game would not become a PVE based game.

What is am wanting is a planetside or world war 2 online like mmo, but not a MMOFPS, I want a MMORPG.

If a game like this don't exist, but there is someone making it, you can tell the name of this game in production.

I know that don't are so many mmorpgs like this because of the problems of new players being killed many times by advanced players

201.8.163.51 (talk) 22:34, 25 November 2007 (UTC)


 * What are PVP/PVE/PVM etc? You need to explain such acronyms if you want people to help.  Astronaut (talk) 22:57, 25 November 2007 (UTC)

PVP = player versus player wikipedia has a article about it( http://en.wikipedia.org/wiki/Player_versus_player ) pvm = player versus monster and pve == player versus enviroment =  http://en.wikipedia.org/wiki/Pve 201.8.163.51 (talk) 23:24, 25 November 2007 (UTC)


 * In the ancient times there was Ultima Online. I never played it, but I remember someone other explaining to me that there were at least pure pvp-servers. (This isn't 100% sure) --212.149.216.233 (talk) 13:22, 26 November 2007 (UTC)


 * The issue isn't really the mass killing of newbies. It is the lack of RPG elements in a purely PVP environment. There are many PVP games - Id is responsible for a lot of it. Just grab a random game, such as Unreal Tournament. Watch it being played. It is a high-speed frag-fest. There is no time for RPG elements. So, you need to slow down the PVP action with non-PVP areas, PVE missions, and other common MMORPG things. If you have some clever idea for getting RPG elements into the high-speed PVP realm, you should work on developing the idea into a full-functioning game. -- k a i n a w &trade; 13:25, 26 November 2007 (UTC)


 * Id sucks nowadays. Valve and Epic are the premier FPS developers- the only good FPS developers as far as I'm concerned -- ⁪ffroth 23:23, 30 November 2007 (UTC)


 * EVE Online has large focus on PVP. (but its not a fantasy, its a space MMORPG) Once you go outside of "safe" areas, its free for all, and most systems operate on NBSI rules (Not Blue Shoot It, or shoot everybody who is not your friend). A pretty new player can fight and even win against older players if he is smart about it, but the EVE as a whole is pretty ruthless. Scamming is allowed as long as it does not involves RL money. Its possible to PvE, but even then you are not safe from PvPers. &mdash; Shinhan  &lt;&thinsp; talk &thinsp;&gt; 11:42, 28 November 2007 (UTC)

Yes, Eve Online has a large focus on pvp, but pvp its not primary (almost only) thing on the game, so, even if I was looking for a futuristic Rpg EVE online would not fit. Exdeathbr (talk) 17:27, 17 December 2007 (UTC)

By looking at darkfall article on wikipedia, darkfall (when release) may be the game that i am looking for. But After asking on some places, darkfall is not, is just a first person view ultima online, with manual targeting, non safe zones, non invencible guards and factions that are on war, in darkfall you would be able to not see the war if you wanted and problably if you wanted to play just the warside of the game problaby this will not be possible to do. Exdeathbr (talk) 17:28, 17 December 2007 (UTC)

Facebook over HTTPS?
Hi. I use Facebook over an unsecured wireless connection. I know that the logins are passed over HTTPS. But the site contents are not on HTTPS; and I am worried about the privacy of my information or what stuff I look at. Does anyone know of a good way to secure my Facebook accesses? (Using a secured wireless connection is not an option.)

P.S. While we are on that, can I use Wikipedia over HTTPS? Thanks, --131.215.166.100 (talk) 23:25, 25 November 2007 (UTC)
 * For Facebook, you might try accessing it over a Virtual Private Network. The connection from your machine to the VPN server would be encrypted; the VPN server would talk to Facebook in the clear over a wireline that we assume is more secure. Some people have access to a VPN through their employer or university, though there are organizations don't allow use of Facebook.


 * There is a secure way of accessing Wikipedia that is not encouraged because it is very processor-intensive. Rather than do that, a few people use a separate Wikipedia account when working from an internet cafe to avoid exposing their main password; this makes some sense for administrators. Regardless of your use of unsecured connections, be sure to register an email address for your account so it is easy to reset your password if it gets compromised. I notice you are posting this question from an IP address. This makes the previous responses moot because anonymous editors don't have accounts or passwords and can't be reached by 'email this user.' Before considering any of the above precautions, create an account first. EdJohnston (talk) 01:26, 26 November 2007 (UTC)
 * Wow, I didn't realize that Wikipedia didn't use HTTPS to authenticate log-ins, at the very least. That seems rather insecure, though I guess the stakes are low. --24.147.86.187 (talk) 02:01, 26 November 2007 (UTC)


 * You mean this is discouraged? I was using that overcome the great firewall of China when I was in China, before it was blocked. --antilivedT 01:37, 26 November 2007 (UTC)


 * Well, that's fine, you had no other option, but it's discouraged when it's done willy-nilly with no good reason. 213.112.18.120 (talk) 02:05, 27 November 2007 (UTC)
 * I don't know who discourage that, but I will actually give you this advice : ALLWAYS use this link when connecting on wikipedia. It's simply a good habit to have to use secure connection, it is not really cpu intensive on your side, hell even my 1998 pc can do that rather fast. It's server intensive yes, but no one really use that connection because wikipedia is a bit frisky on advertising a server intensive part. But good habit on security is never a bad thing. It's by "forgeting" to switch on secure medium (ie https gmail, tls imap server and so on) when in a public wireless space that you get screwed badly, and one mistake in the wrong place can earn you some big troubles.
 * Oh and before I forget, don't connect on facebook on a public space, because even if the bad guy(tm) can't get your credential, he can just intercept your cookie then use it to connect to your account exactly in the same way that those guy did with gmail. - Esurnir (talk) 04:51, 30 November 2007 (UTC)