Author Topic: Macchanger script  (Read 1761 times)

0 Members and 1 Guest are viewing this topic.

Offline teslas_moustache

  • Jr. Mitglied
  • **
  • Posts: 69
  • Branch: Stable
  • Desktop: Gnome
  • GPU Card: [AMD/ATI] RS880M [Mobility Radeon HD 4225/4250]
  • GPU driver: free
  • Kernel: 3.11.8-1-MANJARO (64-bit)
  • Skill: Novice
Macchanger script
« on: 23. March 2013, 21:39:03 »
I originally posted this to Newbie Corner because it's my first attempt at writing a bash script, but no one has replied so.....

It's intended to change my MAC address on startup, but it's not happening. I've got one script that turns off networking, changes the MAC, and turns networking back on. That works fine. But I have to run "sudo systemctl start macspoof@wlp2s0.service" to make it work.

Code: [Select]
#! /bin/sh
ip link set dev wlp2s0 down
macchanger -r wlp2s0
ip link set dev wlp2s0


The other one is a .service file that's supposed to run the above script at startup, but it's not happening.

Code: [Select]
[Unit]
Description=ZOMG! MAC! SPOOFER!!!!1! (This is just so I can see it in the forest of other stuff that runs at startup.)
Before=dhcpd@%i.service

[Service]
Type=oneshot
ExecStart=/bin/bash /home/chris/code/sh/macchanger.sh

[Install]
WantedBy=network.target


So I'm not sure what I'm doing wrong. Does anyone have any ideas?

Offline ringo

  • Held Mitglied
  • *****
  • Posts: 9684
  • www.manjaro-nl.org
    • Manjaro Belgium + forum
  • Branch: unsourced
  • Desktop: xfce
  • GPU Card: Nvidia Geforce 8600 GT (acer 23inch)
  • GPU driver: Free*
  • Kernel: linux kernel
  • Skill: Novice
Re: Macchanger script
« Reply #1 on: 01. April 2013, 15:11:12 »
did you build it from Net-install or just an edition?

Dutch go the dutch site :)

Offline ringo

  • Held Mitglied
  • *****
  • Posts: 9684
  • www.manjaro-nl.org
    • Manjaro Belgium + forum
  • Branch: unsourced
  • Desktop: xfce
  • GPU Card: Nvidia Geforce 8600 GT (acer 23inch)
  • GPU driver: Free*
  • Kernel: linux kernel
  • Skill: Novice
Re: Macchanger script
« Reply #2 on: 01. April 2013, 15:13:16 »
did you made macchanger executable? with chmod +x ?

Dutch go the dutch site :)

Offline marmot

  • Neuling
  • *
  • Posts: 5
  • I'm new. Be nice!
  • Skill: Novice
Re: Macchanger script
« Reply #3 on: 12. May 2016, 19:48:03 »