I
I
illia_mykh2021-04-30 10:59:57
linux
illia_mykh, 2021-04-30 10:59:57

How to insert a variable into a given row?

How to copy the above line in the terminal with a command in Kali Linux?
The fact is that I am creating a program to automatically change the MAC address of the device, the root of the problem is that you cannot insert a derivative into the 14th line, since the 14th line is already considered as if it were played in the terminal. My idea was to copy the line above, which is the randomly generated poppy address, and paste it into the command. In short, I don’t have high hopes for this, but if someone has ideas, I’m waiting for help.
Thank you very much in advance.608bb8db93bee173063543.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
galaxy, 2021-04-30
@illia_mykh

The question is crap written, I read it three times and still did not understand.
There is an error in line 14: you need (for example) +instead of ,:

subprocess.call ("ifconfig wlan0 hw ether " + mac, shell=True)

S
SOTVM, 2021-04-30
@sotvm

nakuya???
all this can be avoided, but you need a ROOT CAUSE=why/why???
in the people it is called = crutches.
you set the task incorrectly and clumsily solve it
, what else could be worse)))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question