Geek vs. Nerd

Wednesday, October 26, 2011

WinPCap, C#, and VS2010



All I wanted to do was a send a single crafted packet in my C# application. Was that too much to ask? Apparently, yes. If you ended up looking at this post, you're probably having a similar issue. If you're trying to write a C# program in VS2010 that needs to send a custom individual packet, here's what you can do:


Step 0: (AKA: My setup before starting) Windows 7 Ultimate & Visual Studio 2010 Professional. This isn't necessarily required, it's just what I'm running.


Step 1: Download PCap.Net. Chances are, if you're trying to do something along these lines, you're already familiar with libpcap (the Linux library that tcpdump & Wireshark are built on) or WinPCap (the Windows C/C++ library that projects like Wireshark use on Windows systems). PCap.Net is a wrapper for WinPCap written in C, C++, & C#. It is made specifically for importing WinPCap functionality into C# / .NET projects. You need to download the most recent "Developer's Pack" and extract it somewhere on your machine.


Step 2: In your Visual Studio Project, Right-click on "References" in your Solution Explorer and select "Add Reference..."



Select the "Browse" tab at the top and navigate to your extracted PcapDotNet Developer's Pack. Decide if you are creating an x64 (64-bit) or x86 (32-bit) project and select the appropriate directory.








Once inside, navigate to 3rdParty/PcapDotNet. In this directory you will see several .dlls:


  • PcapDotNet.Analysis.dll

  • PcapDotNet.Base.dll

  • PcapDotNet.Core.dll

  • PcapDotNet.Core.Extensions.dll

  • PcapDotNet.Packets.dll




Highlight all of these .dlls (ctrl+A) and select "OK." You should now see them all listed under "References." You're now ready to get started with Pcap.NET!







Visit the PCap.NET project website for code examples on packet crafting, packet capturing, enumerating NIC (network interface card) information, and other related topics.


Labels: , , , ,

Wednesday, September 08, 2010

DVD Ripping: Intro


My first few posts are going to be a series of HOWTOs.  I've been working on ripping my DVD collection so I can a) watch them on my droid, and b) let people borrow them without being terrified they'll scratch the disc all to pieces.  To paraphrase my boss, there are only so many times you're willing to buy the same Pixar movie because of irremovable PB&J fingerprints.

On that note, let me just say that,  if you're here & reading this because you're some kind of script kiddy trying to augment his DVD collection for free, then screw you.  It's self-absorbed cretins like you that motivated the content distributors to start infecting our media with DRM.  So unless you actually own the movies you're trying to rip, go get your piracy walkthroughs somewhere else.

There.  That should be a sufficient disclaimer.

So when "ripping" a DVD, there are a few different things we are talking about.  I'll try to make an analogy with CDs since it's probably a safe assumption that anyone trying to figure out how to rip a DVD has probably already ripped a few CDs.

When ripping a disc, there are usually three different results a person is going for:

1)  An exact copy of the disc

2)  An exact copy of the media files on the disc.

3)  A portable version of the disc's contents.

Looking at these from the perspective of a CD, we would want the rip to produce:

1)  A copy of anything on the disc, including uncompressed audio files and extra features such as flash videos, images, weblinks, or other "extra features."

2)  Uncompressed audio files, probably .aac files on the order of 100 MB per song.

3)  .mp3 or .ogg files on the order of 5-10 MB per song.

You're probably the most familiar with the third option, since it's what you would use in your iPod, smartphone, or other mp3 device.  But numbers 1 & 2 also have their uses, especially when we start to consider DVD movies.  With DVDs, we have the same 3 options, only with a few extra details:

1)  An exact copy of the disc, (although we may want to remove region encoding so we can watch it wherever we are).

2)  An exact copy of the movie, (which may not include the menu, trailers, special features, subtitles, or even language track you want).

3)  A portable version of the movie, probably a .mp4 file you can view on your iPod, smartphone, or similar device.  File size can range, but something along the order of 750MB for 1 hour works as a "rule of thumb."

My next few posts will address each of these points, and address further possible issues you may come across.

Labels:

Return of the nerd


So I've decided to start this back up again.  I recently got a Droid and found the "blogaway" app, so maybe I can use my commute time to post more regularly.  It will still be covering pretty nerdy topics most of the time, from computer/technology topics to comic books & sci-fi/fantasy.

If you find a post helpful or entertaining, please let me know by leaving a comment.  Otherwise it just seems like I'm talking to myself.

Labels:

Friday, November 30, 2007

Nerd Points: Academic Achievement

Article V: Academic Achievement

To maintain fairness in comparing two nerds, points should only be counted for the lowest level of education that both candidates had the opportunity to achieve. For instance, a PhD student cannot count points accrued in college or graduate school when comparing themself to a high school student. However, the PhD student may count graduate school when comparing himself to an individual who opted to get a real job after getting their bachelor's degree.

A) High School
  1. +10 pts per year you were in chess club, +5 pts.
  2. +1 point per year of foreign languages, x2 for non-European languages, x5 for dead languages (ancient Greek, Latin, etc.)
  3. +15 pts per year for any math/science based club (Math club, physics club, etc), +5 pts for being an officer
  4. +10 pts per year for membership in any other organizations with a GPA minimum, +2 pts for being an officer
  5. +5 pts per year for being in band, +2 pts for choir (+1 extra point for any solos)
  6. To convert your GPA into points (per year), subtract 3 from it and multiply by 25, rounding up. If you have a negative number, you have to subtract those points. Thus, 4.0 = 25 points, 2.5 = -13 points, etc.
  7. +2 pts per Honors class, +4 pts per AP class, +5 pts per class taken at a College or University while still in high school
  8. Standardized Test scoring: For AP tests, multiply your score by 3; for CLEPP, multiply score by 2; for ACT, subtract 25 then, if positive, multiply by 5; for SAT, divide by 20, subtract 50, then, if positive, double.
  9. Subtract your rank-in-class percentile from 101. Subtract 75. If positive, multiply by 4.
  10. +5 pts for each non-sport, non-musical competitions you were in or on a team for. If you placed, divide 5 by your placing and multiply by 3.
My High School score: 381

B) College (Bachelor's degree)
  1. If your major(s) are a pure science, +15 points for each one; if engineering, +10 each. Half points for each minor.
  2. If you have already graduated, convert your undergraduate hours into points by subtracting 130 from your total number of hours.
  3. If you were on an academic scholarship, convert the award into points by calculating what percentage of your tuition was paid for, and divide by 2, (may be calculated per year).
  4. +25 pts for each full-time semester under 8 it took you to graduate.
  5. -75 points if you were ever on academic probation for your department or scholarship
  6. +5 points for every full-time semester over 8 it took you to graduate.
  7. +50 pts. for each published or presented a paper at an academic journal or conference before graduation.
  8. +10 pts. for each 500-level course or higher taken while working on your bachelor's degree, double for 600-level, triple for 700-level
  9. + 3 pnts for each year spent at a private university, +2 pnts for each year spent at a vocation/technical college
  10. -15 points for each year spent in a fraternity/sorority with a GPA requirement less than 3.5
My points for college: 315

Tuesday, November 20, 2007

Nerd Points: The Basics

IV. The Basics

Here are the basics. Some of these will be expanded upon in later portions. When this occurs, points may be accumulated, even if some topics seem to be duplicated. I give my own scores for comparison; they may be considered those of a moderately above-average nerd. No score should be considered a "maximum" amount of nerdiness. The max will grow as the list develops; any portion of the list may be used to give a fairly accurate relationship between 2 potential nerds. The more of the list that is considered, the more accurate the comparison between the 2.
  • If you are male, + 5 pts.
  • If you regularly wear glasses, +5 pts.
  • If you regularly wear contacts, +2 pts.
  • If you wear glasses instead of contact for medical reasons, +3 pts.
  • If you have asthma, +5 pts.
  • If you have never had the opportunity to kiss or be kissed by the opposite sex, +10 pts.
  • If you wear a pocket protector, +25 pts.
  • If you have ever bought a pocket protector, +5 pts. for each, +5 each if it was for yourself
  • If you own a sliderule, +15 pts.
  • If you've ever written a program for a graphing calculator, +10 pts. for each.
  • If your voice is still changing, and you are over 16 years old, +1 point for each year over 16.
  • If you live with your parents, and you are over 18 years old, +3 pts. for each year over 18.
  • If you work in Technical Support, Computer Repair, or any other computer-related field, +5 pts.
  • If your job is part-time, +5 pts.
  • If you've ever used a social networking or online dating service, other than Myspace or Facebook, +2 points for each. (Yes, MMORPGs and FPSs count)
  • If you know what an MMORPG or an FPS is, +1 point each.
  • If you've ever played a tabletop RPG, +2 points for each campaign.
  • If you own more than 1 computer, +2 points for each.
  • If you tried to consider a gaming console in the previous question as a computer, +1 point extra for each.
  • For every time you've seen any one of the Lord of the Rings, +1 points.
  • For every time you've seen Monty Python: Search for the Holy Grail, +2 points.
  • +10 points for every comic book TITLE you own that is older than you are.
  • For every degree you have, including high school diploma, +1 point.
My score for this section: 119

Sunday, November 18, 2007

NERD POINTS©: Justifications

III. Justifications
A. Nerdiness - Some things must be agreed upon as basics, or else I understand that your view of "nerdiness" may differ from my own so widely, that this rating system, even as a guideline, is useless to you. We must have some sort of agreement on what makes on person more "nerdy" than another, especially if we are saying that "nerd" is a title anyone can bestow upon themself. To that end, I will line out those things I consider "nerdy" qualities. These are the things which would cause one person to be rated more of a nerd than another person.

  1. Propensity for academic achievement
  2. Interest in technology
  3. Affinity for science fiction, fantasy, or other "escapism" genres and mediums
  4. Enormous obsession with anything else in this list, or even a benign subject that is taken to an extreme
  5. Social awkwardness in areas not related to the above categories, (especially when the encounter involves members of the opposite sex.
It is important to reiterate some points made in the discussion about "geeks;" a person may still be quite a high-ranking nerd, even if they fall short in one or more of these categories, or any of their subcategories, especially if they make up for it in another.

B. Gender - In the points as I lay them out, I will try to be as consistent as possible when referring to male and female nerds, as well as the similarities and differences between them. In truth, many girls may be as big, if not bigger nerds than their male counterparts. However, nerdom is another predominantly male-dominated sector, and some of the rules will reflect this. As an example, we shall consider the idea of "singleness." A large part of the stereotype of nerds is their inability to "get a date." This holds true for both males and females. However, because their are so few females in the nerd sector, it is much more difficult for a male nerd to get a date than a female nerd. If a male nerd mentions dressing up for an anime convention, I'm not sure any female, even a nerdy one, would consider this a turn-on. So for males, dressing up for an anime convention would be more "nerdy." However, for a female to dress up (depending upon what she dressed as), this would be a serious turn-on for many guys, whether or not they were nerds. So while it would still boost her nerd status in one arena (ie, dressing up as fictional character) it would low her nerd status in another (ie, ability to impress the opposite sex). So I will try to say "opposite sex" when I mean a person of the opposite sex of the individual whose nerdiness is being rated, but if a rule specifically mentions gender, then that rule is gender-specific.

Saturday, November 17, 2007

NERD POINTS©: Definitions

I. PURPOSE
At the behest of a couple of friends, I've decided to set down in print a method of tallying "Nerd Points." First off, let me say that I realize there's about a bajillion websites with interactive quizzes to rate your nerdiness; this isn't anything like that. Opinions differ widely on what makes. Some people are likely more accurate than others, but it's still a matter of opinion. If I'd been able to use the "copyleft" image in the title instead of copyright, I would have. I would like for this to be a method for others to develop their own system of rules, which may or may not be the same as mine and my friends.


II. PREAMBLE
A. NERDS -The first thing we must do to be able to provide a quantitative system of accumulating "nerd points," first we must define what a nerd is. In my opinion, the simplest definition of a nerd is recursive, (that is, uses the word in its definition). In my opinion a "nerd" is anyone who willingly calls him/herself a nerd. I realize this is a rather broad definition, but I think it is the truest. Now, I do not discount that one person can be MORE of a nerd than another, or that one person is perhaps a nerd in name only, but this simple leaves us with the task of codifying how to rank one person's nerd status. This is the goal of Nerd Points.

B. NORMIES- I also feel it is worth it to define a couple of things that a nerd is not. Individuals with a very low "nerd point" score AND uncomfortable with calling themself a nerd may consider themselves, for the purposes of this ranking system, a "normal" person (hereafter referred to as a normy). Normies may have a few points; certainly just the fact that you simply enjoyed "Lord of the Rings" or have played "Munchkin" once or twice does not make you a nerd, especially if you are uncomfortable using the word to refer to yourself. One point does not make you a nerd. Two points doesn't either. I will not set a numerical value under which you may consider yourself a "normy;" I leave that for each individual to decide for themself how comfortable they are with own nerdiness, without becoming an entire, full-blown nerd.

C. DORKS - Another category of individuals stemming from Nerd Points is simply an extension of our definition of the word "nerd." If a nerd is anyone who willingly calls him/her-self a nerd, then we need a word for people who are unwilling to call themselves "nerd." More than likely, you know someone who will fit many of the rules, and have a large amount of nerd points, yet they are unwilling to call themself a "nerd." I will refer to these individuals as "dorks." This is the line that ever "Normy" must walk for his or herself. If your nerd point score is low, there is no dishonor in not labeling yourself a "nerd." However, if your nerd point is high, and you are just in denial, then you have entered the world of the dork: awkward and unfit for "normy" society, but unwilling to commit and engage in "nerd" society.

D. GEEKS - Our final category is actually a subset of nerd. Nerdom, as we have defined it, is very broad. It encompasses many different aspects of life, from our job/school activities and hobbies, to our relationships and entertainment choices. That being said, some individuals may rank extremely high in one area, but not as high in another area. This is the "geek." They may have very specific specialized knowledge in one particular area, say the Marvel Universe or particle physics, but never could get through an extended edition DVD of Lord of the Rings. Again, I must say that, if they are willing to call themself a "nerd," they should be welcomed into the fold. They should not be looked down on for not being as much of a "nerd" as others; their specialized knowledge is a boon to them. I simply do not have the ability to award points in any specific category that I do not fall into, so any geek other than a comic book or computer geek would not receive a proportional number of points.

Saturday, June 17, 2006

Spier-Man and Catwoman?

In case you hadn't heard, the BBC has reported 2 recent shake-ups in the comic book world, Spider-Man going public and Batwoman joining the all-girls team. There are some things that I can understand and, in some manner, support when comic books take on real-world issues. I have no problem with them trying to have super-heroes face some type of real-world issues upon occassion, but these recent announcements just really hack me off.

It is one thing to have your core characters face and deal with issues, it's quite another to change those characters or go back on their established histories just so you can tow some kind of party line. I found it rather absurd and bizarre that they would change a character so drastically after 40+ years in a particular role. The issue with Spider-Man was not so much an agenda with that particular character, but the current storyline in Marvel on “Super-hero registration” is an open response to real-world government actions and a perceived overstepping of constitutional boundaries for the sake of “safety.” My screename was my dissatisfied reaction to feeling preached at by my comic books, which are supposed to be an ESCAPE from real-world stress and propaganda.

My favorite super-hero, for those of you that don't know, was the Flash. I found it a little when the Pied Piper decided to "come out" in the late 80s, but the time they are a'changin', and it offered Wally West, the third Flash, a chance to deal with this issue and learn from it. Piper has kept this part to his character, and it adds depth as well as reality to Wally's non-supero life. But for DC to take an established hero, such as Batwoman, and use her to springboard into a homosecual character just to appeal to a particular demographic or something, is not only lazy and unimaginative, but also an indignant divorce from the legacy of comic book history.

This is probably the most disappointed I've been in comic books since they reintroduced Supergirl 2 years ago without so much as a nod or a recognition of the 2 previous incarnations of the character. I mean seriously, everyone can remember Superman died, but not who filled his shoes while he was gone?