< Return to Video

Udacity After Dark: "Hacking" Facebook

  • 0:00 - 0:05
    U
    AFTER DARK
  • 0:06 - 0:11
    Hello Internet!
    Welcome to Udacity After Dark.
  • 0:11 - 0:15
    I am Jesicca Uleman and I am
    a project manager here at Udacity.
  • 0:15 - 0:19
    And I am Cameron Pittman,
    I am a course developer here.
  • 0:19 - 0:21
    making front end
    web development courses.
  • 0:21 - 0:24
    And this is sort of I would say,
    you know, experiment—
  • 0:24 - 0:26
    -Yeah.
    -We're gonna see how this goes,
  • 0:26 - 0:30
    but we find a lot of interesting tidbits
    throughout the day and we think
  • 0:30 - 0:34
    that it's a really fun knowledge to share
    and we thought we would try to share
  • 0:34 - 0:37
    some of that knowledge with you guys,
    playing along at home.
  • 0:37 - 0:41
    Yeah. Jessica, I have a question for you.
    - I have an answer.
  • 0:41 - 0:45
    Have you ever wanted
    to play a prank on a friend?
  • 0:45 - 0:47
    -Yeah.
    -Me too. I—
  • 0:47 - 0:54
    It's obviously something that is fun to do
    and in fact once in college I accidently
  • 0:54 - 0:57
    sort of destroyed one my roommate's laptop—
  • 0:57 - 0:59
    That's kind of— not good.
  • 0:59 - 1:05
    Yeah. I— In the end I kind of regretted it.
    But it was, at the time, funny for a few seconds.
  • 1:05 - 1:08
    I went in and changed way too many
    settings on his computer.
  • 1:08 - 1:09
    -Oooh.
  • 1:09 - 1:12
    It was like in a different language,
    I think I like somehow like
  • 1:12 - 1:15
    destroyed its ability to
    like go to Windows—
  • 1:15 - 1:17
    I don't honestly know—
  • 1:17 - 1:20
    So did you somehow get into the registry
    and just start messing with files?
  • 1:20 - 1:24
    I think I was like drunk with power and
    just started doing everything I could.
  • 1:24 - 1:27
    Anyways, so he got to get it repaired
    and I felt like the biggest jerk.
  • 1:27 - 1:35
    But, you know, I think the little hacks we
    are going to do today aren't nearly as mean.
  • 1:35 - 1:40
    They are definitely reversible, so—
    Anyways, I've got my Facebook page open,
  • 1:40 - 1:46
    and, you know, it's a pretty standard Facebook page.
    The cool thing is, it is a website.
  • 1:46 - 1:52
    Facebook is a website like any other—
    -Really! Mind blown.
  • 1:52 - 1:57
    And Facebook, like in any other website,
    can be edited using DevTools.
  • 1:57 - 2:00
    Developer tools are provided by browsers,
    this time I'm using Chrome, but—
  • 2:00 - 2:06
    You could use whatever browser you wanted to.
    And they let you basically inspect and change
  • 2:06 - 2:08
    every aspect about a website.
  • 2:08 - 2:13
    You can figure out what is going on at
    pretty much all times. Which is pretty cool.
  • 2:13 - 2:15
    I like where this is going.
    I think where you are going with this.
  • 2:16 - 2:21
    Yeah. So anyways, I have my page up here
    and let's go ahead and make some changes.
  • 2:21 - 2:26
    So I'll go up to "View", and I go to "Developer"
    and "Developer Tools".
  • 2:26 - 2:29
    And that opens up this— Whoow!
    This scary message here.
  • 2:30 - 2:34
    This is Facebook telling people who
    don't know what they're doing
  • 2:34 - 2:40
    that if somebody else told them to come into
    DevTools, specifically come into the console
  • 2:40 - 2:43
    and make changes, that they're actually
    probably about to get hacked.
  • 2:43 - 2:46
    Which is true.
    We won't be using the console here.
  • 2:46 - 2:47
    -Right. Yeah.
  • 2:47 - 2:49
    This is a JavaScript console that let's you
    run commands against the website
  • 2:49 - 2:53
    and some of these commands running at
    Facebook would actually probably
  • 2:53 - 2:56
    give somebody access to your account.
    So don't do that.
  • 2:56 - 3:00
    We do not condone the use of that.
    Full disclaimer. But. For fun—
  • 3:00 - 3:02
    Because we are not actually
    trying to hack your account.
  • 3:02 - 3:05
    We are doing things that are
    playful and reversible.
  • 3:05 - 3:08
    So for that we'll come over here to
    the "Elements" pane.
  • 3:08 - 3:11
    In Elements pane it's showing you
    basically the structure of the web page.
  • 3:11 - 3:17
    It looks a lot like HTML and HTML is used
    to generate here the Elements pane,
  • 3:17 - 3:21
    but it's actually different than the HTML
    that the page got, because the elements
  • 3:21 - 3:25
    represent the DOM and the DOM can
    change over time.
  • 3:25 - 3:27
    So anyways, it does represent
    what's on the page.
  • 3:27 - 3:31
    So looking here,
    is there anything you'd like to change?
  • 3:31 - 3:34
    I think we should probably
    start with your name.
  • 3:34 - 3:35
    -My name.
    -Your name.
  • 3:35 - 3:37
    Make it something
    a little more accurate.
  • 3:37 - 3:39
    Something a little more accurate.
    Well, let's see.
  • 3:39 - 3:41
    This morning I
    forgot to brush my teeth.
  • 3:41 - 3:42
    Yeah, I noticed.
  • 3:42 - 3:44
    I think I know were we
    are going with this.
  • 3:44 - 3:47
    So what I did is I clicked
    on this little magnifying glass
  • 3:47 - 3:50
    and you'll see as I hover my mouse
    over different parts of the page
  • 3:50 - 3:54
    they get selected and then when
    you click on a part of the page,
  • 3:54 - 3:57
    it actually opens up down here,
    inside the Elements pane
  • 3:57 - 4:01
    and we can actually make changes.
    So it says Cameron Pittman,
  • 4:01 - 4:06
    I can double click on it and let's see,
    lets change my first name to—
  • 4:06 - 4:11
    Farty Mick, Farster, Pittman.
  • 4:12 - 4:17
    And I'll press Enter and now we can see that
    my name on the page has actually changed.
  • 4:17 - 4:23
    So if I were to let's say leave my laptop
    sitting around and then come back to it later,
  • 4:23 - 4:26
    I might have a
    momentary panic attack.
  • 4:26 - 4:28
    Well, or wonder how that happened.
  • 4:28 - 4:31
    Or wonder how so many people know,
    you know, about my [INAUDIBLE].
  • 4:31 - 4:37
    Well, sitting next to you, it's pretty
    hard to— yeah, yeah, lovely.
  • 4:37 - 4:40
    What else do we do?
  • 4:40 - 4:42
    You got a lot of friends there.
    -Yes.
  • 4:42 - 4:45
    I mean, I wonder how
    that happened.
  • 4:45 - 4:47
    You'd be surprised how
    persuasive I can be.
  • 4:47 - 4:51
    And how easily people
    accept Facebook friend requests.
  • 4:51 - 4:52
    Yeah,
    that's true.
  • 4:52 - 4:55
    So what I did just now is I right-clicked
    on this button here,
  • 4:55 - 4:59
    right-clicked on the friend button
    and I went to "Inspect element".
  • 4:59 - 5:06
    That actually automatically opens up
    this element inside DevTools, allright?
  • 5:06 - 5:08
    And so we can see that,
    allright, it's a link, because it has
  • 5:08 - 5:12
    an tag here, let's open it up,
    and look at that, there is that number,
  • 5:12 - 5:16
    1012. So just like before I can
    double-click on it and I feel like
  • 5:16 - 5:20
    what you're about to say is
    zero is a better representation?
  • 5:20 - 5:22
    I would say so.
    - Yeah, zero.
  • 5:22 - 5:27
    Allright. Maybe it's worse than that,
    may got've one friend. I am not even [INAUDIBLE].
  • 5:27 - 5:28
    How did that even happen.
  • 5:28 - 5:33
    Enter here and now you'll notice my friend
    count dropped by a thousand and thirteen.
  • 5:33 - 5:36
    Whow Whow Whow.
  • 5:36 - 5:37
    I know, it's a sad day.
  • 5:37 - 5:42
    That's even worse than the kid on
    South Park. I mean, he had no friends.
  • 5:42 - 5:46
    Anything else—
    I think that picture looks way to much like me.
  • 5:46 - 5:53
    So I've actually pulled up another picture of a
    cute cat here, because I know what the ladies like.
  • 5:53 - 5:57
    It's true. Cat pictures
    are an adorable thing.
  • 5:57 - 6:01
    I wish I haven't said
    that on camera. Sorry.
  • 6:01 - 6:05
    So anyways I came over here, so I copy
    the URL for that image and so I come over here
  • 6:05 - 6:09
    and I don't wanna actually change it,
    I just wanna change it in DevTools
  • 6:09 - 6:13
    so I am not gonna click that button.
    Instead, I'm gonna go to Dev Tools here
  • 6:13 - 6:21
    We can see that we've got this image tag that
    says and that just means it's an image.
  • 6:21 - 6:25
    and it's got source. It's got
    attribute called source, which I now,
  • 6:25 - 6:30
    if I hover over it, it shows my picture.
    And obviously we wanna change that.
  • 6:30 - 6:35
    So I will right-click and do
    "Edit as HTML", it is the easiest way to do it
  • 6:35 - 6:38
    and I can start changing it.
    So let's go into the HTML
  • 6:38 - 6:46
    and click, and click, here we go and I
    will paste the URL here and just click off it.
  • 6:46 - 6:51
    And now my Facebook
    page is a lot more adorable.
  • 6:51 - 6:52
    With a cool
    kitty up there.
  • 6:52 - 6:55
    It is, it really really is.
    it's—again—an improvement.
  • 6:55 - 6:59
    We just keep making things better.
    -I know. Thank you so much for your help.
  • 6:59 - 7:03
    Yeah, I do what I can. I really, really do.
    -It's good that you care.
  • 7:03 - 7:05
    The good news is
    this is not permanent.
  • 7:05 - 7:09
    We are not actually
    changing my Facebook page,
  • 7:09 - 7:13
    so if I hit "refresh", everything,
    probably, and it looks it does,
  • 7:13 - 7:15
    everything goes
    back into normal.
  • 7:15 - 7:17
    And that's a beautiful thing.
    I mean, 'cause you don't wanna be
  • 7:17 - 7:20
    that jerk, that you know, changes
    your friends page, actually goes through,
  • 7:20 - 7:23
    changes the image,
    changes their name,
  • 7:23 - 7:25
    it takes them like 20 minutes
    to get their page back to normal
  • 7:25 - 7:27
    Right, 'cause you go to
    "Settings" and all that—
  • 7:27 - 7:30
    Right, I mean that's— and you might
    not even have that much time either.
  • 7:30 - 7:32
    I mean, you might not
    have the time to change everything.
  • 7:32 - 7:35
    Nice and quick way to
    provide a momentary panic attack
  • 7:35 - 7:37
    like a good friend.
  • 7:37 - 7:40
    Right. It shows you care.
    It really does.
  • 7:40 - 7:43
    So hopefully you guys
    enjoyed this first lesson
  • 7:43 - 7:47
    in our experimental
    Udacity After Dark segment.
  • 7:47 - 7:50
    If you have any feedback for us,
    we'd love to hear what you think.
  • 7:50 - 7:52
    Maybe there are also topics
    that you'd like us to cover,
  • 7:52 - 7:55
    so hit us up on YouTube
    and let us know there.
  • 7:55 - 8:00
    Don't forget you can also visit on Twitter
    or Google+ or whatever social network
  • 8:00 - 8:03
    you feel like putting up
    on the page right now.
  • 8:03 - 8:06
    Sounds good.
    Well, yeah. So until next time.
  • 8:06 - 8:07
    -See you.
    -Well see ya!
  • 8:08 - 8:11
    U
    UDACITY
Title:
Udacity After Dark: "Hacking" Facebook
Description:

more » « less
Video Language:
English
Duration:
08:12

English subtitles

Revisions