this post was submitted on 23 Aug 2023
1274 points (98.8% liked)

Programmer Humor

23545 readers
2164 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
top 50 comments
sorted by: hot top controversial new old
[–] WarmSoda@lemm.ee 99 points 2 years ago (4 children)

Let's pretend someone didn't know how to do that on an android. How would you explain it to them?

[–] pineapplelover@lemm.ee 115 points 2 years ago (2 children)

On android when you go to the wifi settings you're currently connected to there should be a setting for randomizing mac address per connection or per network. If you change it to per connection, once you disconnect and reconnect your mac address should change. On per network, it will randomly generate the mac address for the first connection and keep that address for that wifi forever.

[–] WarmSoda@lemm.ee 23 points 2 years ago (2 children)

Excellent explanation, thank you. Never knew what that difference was.

[–] AnarchistArtificer@slrpnk.net 4 points 2 years ago (1 children)

Thanks for asking the question! I've never needed to know it, and I've done enough android tinkering that I'm fairly sure I could find it quite easily if needed, but I enjoy my social media being peppered with bits of learning wherever possible. I'm a big fan of ambient curiosity

[–] WarmSoda@lemm.ee 3 points 2 years ago

Same here. Thanks :)

[–] pineapplelover@lemm.ee 3 points 2 years ago

Yeah, recently I was on school wifi and it kept bothering me to log in and figured I needed to switch to per network or it would bother me everytime to sign into the captive portal.

[–] kspatlas@artemis.camp 4 points 2 years ago (2 children)

I think per connection is a GrapheneOS thing unless I'm wrong

[–] SuperIce@lemmy.world 31 points 2 years ago

On stock (Pixel) Android, if you enable Developer Options, there is a setting under Networking called "Wi-Fi non-persistent MAC randomization" that randomizes the MAC per connection for networks that have randomization enabled.

[–] Meruten@lemmy.dbzer0.com 8 points 2 years ago (6 children)

Samsung's OneUI does this by default for all connections .

[–] SteveTech@programming.dev 4 points 2 years ago (1 children)

I don't have a Samsung, but I'm pretty sure that's still randomised per network, per connection can be enabled in the developer options somewhere.

[–] derock@lemmy.derock.dev 6 points 2 years ago

I have a Samsung and it's per network, even if you forget and rejoin it keeps the same random Mac address. You need to enable a developer setting to have it randomize when you join.

load more comments (5 replies)
[–] Steeve@lemmy.ca 94 points 2 years ago (2 children)

Just google it you dumb piece of shit - Stack overflow user

Marked as duplicate

[–] bappity@lemmy.world 23 points 2 years ago (1 children)

I know you wanted this solution but that solution is shit here's my one instead

[–] noli@programming.dev 26 points 2 years ago (1 children)
[–] bappity@lemmy.world 26 points 2 years ago* (last edited 2 years ago) (2 children)

WHAT WAS THE SOLUTION!!!!!!!!1!!1!!!!
9 years ago

[–] hitmyspot@aussie.zone 3 points 2 years ago

I'm sorry, your comment has not been posted. This thread is closed as it has been marked as [SOLVED]

[–] FooBarrington@lemmy.world 4 points 2 years ago (1 children)

Most Android phones have an option to randomize MAC per WiFi, enabled by default. Maybe you can trigger a new MAC by forgetting the network and reconnecting?

[–] SuperIce@lemmy.world 7 points 2 years ago (2 children)

If you enable Developer Options, there is a setting under Networking called "Wi-Fi non-persistent MAC randomization" that randomizes the MAC per connection for networks that have randomization enabled.

load more comments (2 replies)
load more comments (1 replies)
[–] jetsetdorito@lemm.ee 63 points 2 years ago (1 children)

fun fact, an early iPhone jailbreak would always change the phones wifi mac to the same address, so there was a meme for a while that if you had a jailbroken iPhone you couldn't use airport wifi

[–] cordlesslamp@lemmy.today 3 points 2 years ago

Why would anyone do that? If there's 2 jailbreak iphones on the same network then non of them would have internet access due to IP conflict?

[–] navi@lemmy.tespia.org 50 points 2 years ago (1 children)

This comes back to bite you when you purchase in-flight wifi which is tied to your MAC address. Make sure to disable that option for the in-flight access point!

[–] derock@lemmy.derock.dev 20 points 2 years ago (1 children)

on an AA flight I was recently on, they gave out free 20 mins of internet for watching a 15s ad, but this was once per device type of deal. In this case, turning on randomized mac addresses meant I get free inflight wifi for the entire flight!

[–] RealJoL@feddit.de 20 points 2 years ago

Tragic airplane crash: Over 2700 suspected dead due to airplane data log

[–] mindbleach@lemmy.world 46 points 2 years ago (3 children)

Why's it need to be temporary, anyway? It's an airport. Nobody's sticking around.

[–] shroomato@lemm.ee 22 points 2 years ago

Unless you're Tom Hanks

[–] IphtashuFitz@lemmy.world 7 points 2 years ago (1 children)

You haven’t “flown” recently, have you?

[–] mindbleach@lemmy.world 24 points 2 years ago (2 children)

Why, did they add a week-long quarantine in baggage check? It's an airport. The whole point is to show up and leave. Even if the wait lasts longer than the flight.

If your ass in there longer than 24 hours, the wifi should be considered an apology.

load more comments (2 replies)
[–] malloc@programming.dev 5 points 2 years ago

Long time ago, it was probably due to overcrowding. Very easy to get shit quality of service once it hits a certain time of day.

But with advances in wireless technology (backhaul, 5Ghz, MIMO, …) I think that’s no longer the case.

[–] original_ish_name@lemm.ee 35 points 2 years ago (7 children)

Your airport wifi doesn't ask for your email, phone number, bank number of your life savings, etc?

[–] snake@lemmy.world 18 points 2 years ago (3 children)

Usually it asks for an email, but you can just input a fake one.

[–] 0x2d@lemmy.ml 5 points 2 years ago

for a lot of captive portals I type random crap like stevejobs@apple.com or jdjdidneiejdjeksneidnei@gmail.com

load more comments (1 replies)
load more comments (6 replies)
[–] kool_newt@lemm.ee 12 points 2 years ago* (last edited 2 years ago)

I use this to make MACs for my VMs and virtual NICs. The 00:16:3E prefix means it's Xen virtualization, so change this part as needed.

#!/usr/bin/python

# macgen.py script to generate a MAC address for guests on Xen

import random

def randomMAC():
	mac = [ 0x00, 0x16, 0x3e,
		random.randint(0x00, 0x7f),
		random.randint(0x00, 0xff),
		random.randint(0x00, 0xff) ]
	return ':'.join(map(lambda x: "%02x" % x, mac))

print (randomMAC())

Use

$ macgen.py 
00:16:3e:17:ed:b1
[–] kspatlas@artemis.camp 8 points 2 years ago

GrapheneOS has per connection MAC which can be useful in situations like this

[–] original_ish_name@lemm.ee 4 points 2 years ago

I spoofed my MAC once when I went to a router page of a hotel and it said it was logging the request

[–] fidodo@lemm.ee 4 points 2 years ago

Are there airports that still do this? Every airport I've been to in the last decade has had free Wi-Fi.

[–] radix@lemm.ee 4 points 2 years ago (3 children)

In general, I thought IP addresses are mutable while MACs stay the same, and I thought that's why the outside world uses IPs to identify networks while routers inside a network use MACs to identify specific devices. If you can change your MAC arbitrarily, doesn't that risk making the router's job more difficult? Why not just assign yourself a different internal IP?

[–] FiskFisk33@startrek.website 19 points 2 years ago (1 children)

I mean yeah, but in this case you want to make the routers job of shutting you out more difficult.

[–] radix@lemm.ee 3 points 2 years ago

Fair point!

[–] ramjambamalam@lemmy.ca 17 points 2 years ago* (last edited 2 years ago) (1 children)

Changing your MAC will make older messages undeliverable, but that just means the connection will be momentarily interrupted until you establish new connections after re-connecting to the WiFi.

Why not just assign yourself a different internal IP? Because a. the router probably wants to assign you one itself via DHCP; and b. the router isn't looking at your IP address to lock you out; it's looking at your MAC address.

If your IP address is where in cyberspace you are, a MAC address is who you are. If you want to fool the bouncer, change your name, not your address.

[–] radix@lemm.ee 3 points 2 years ago

I see! Thanks for the explanation! Didn't put two and two together to realize that the router basically reads MACs and writes IPs.

[–] fneu@discuss.tchncs.de 3 points 2 years ago (1 children)

The router recognizes a device based on its MAC and assigns an IP address. Traditionally, the MAC stays the same, so you’re right. In this case, OP doesn’t want to be recognized by the (airport) router. There is software for spoofing the MAC address for most platforms. Changing the MAC address has recently become more popular due to privacy concerns and on some operating systems it’s supported out of the box.

load more comments (1 replies)
load more comments
view more: next ›