Code Monkey home page Code Monkey logo

Comments (3)

MaxXyzzy avatar MaxXyzzy commented on June 15, 2024

You can add | sed 's/=//g' to the end of that line to remove the padding:

p=`system_profiler SPHardwareDataType | awk '/Serial/ {print $4}' | tr '[A-Z]' '[K-ZA-J]' | tr 0-9 4-90-3 | base64 | sed 's/=//g'`

from shell-intune-samples.

cashxx avatar cashxx commented on June 15, 2024

Ahh forgot about sed. Thanks, didn't think of that, will make note of that and try it. Should be added to script as not allow simple passwords I would think would be common setting people set. I also noticed that the password is spread all through logs. Not sure that is a good thing. This isn't the safest setup, but something and better than having the same password on everything. Thank you!

from shell-intune-samples.

feddy84REW avatar feddy84REW commented on June 15, 2024

This also seems to work fine, im rather new so its not that pretty :)
p=$(echo -n "$(system_profiler SPHardwareDataType | awk '/Serial/ {print $4}')" | tr '[A-Z]' '[K-ZA-J]' | tr 0-9 4-90-3 | base64)
its not just the == and since i was doing the script to get the base64 from a windows device my padding was "Cg==" so i needed to it cleaner

from shell-intune-samples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.