Giter Site home page Giter Site logo

hac_passwords's Introduction

HAC_Passwords

These scripts come without warranty of any kind. Use them at your own risk. I assume no liability for the accuracy, correctness, completeness, or usefulness of any information provided by this site nor for any sort of damages using these scripts may cause.

This project is for Arkansas Public Schools to set their students HAC passwords to a predefined password. Unfortunately we couldn't use Powershell to accomplish this task as parts of the student profile page is rendered via Javascript. This project invokes a headless browser and submits the tasks as needed.

This project has been changed from node.js using Puppeteer to Powershell using Selenium. This process now takes about 5:30 to set up 100 students.

ChromeDriver.exe and the Selenium WebDriver.dll are included in this project:

We must download Chromium v110 separately as it is too large for github.

Manual Steps

Automatic Method (possible breakage on URL changes.)

Invoke-WebRequest -Uri "https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/Win_x64%2F1084068%2Fchrome-win.zip?alt=media" -OutFile "$($env:temp)\chrome-win.zip"
Expand-Archive -Path "$($env:temp)\chrome-win.zip" -DestinationPath .\bin\ -Force

This project will use the default CognosModule profile by default. If you wish to use other credentials you can specify the CognosModule profile name with the -CognosConfig parameter.

Command Line

hac_passwords.ps1 [-CognosConfig <String>] [-CSV <String>] [-ForcePasswordChange] [-DisplayProgress]

Errors

Errors will be stored at .\logs\errors.csv so you can parse it and take additional actions afterwards.

CSV Example

students.csv

Student_id,Student_loginid,Student_password
801001234,[email protected],P@ssw0rd
801001235,[email protected],P@ssw0rd2
.\hac_passwords.ps1 -CSV students.csv

Stdin Pipe

'Student_id,Student_loginid,Student_password
801001234,[email protected],P@ssw0rd
801001235,[email protected],P@ssw0rd2' | .\hac_passwords.ps1

Think Bigger!

You would need to use some logic here to only set passwords for students who need it. Don't be setting all students over and over.

Invoke-SqlQuery -Query "SELECT Student_id,Student_email AS Student_loginid,Password AS Student_password" | ConvertTo-CSV | .\hac_passwords.ps1

hac_passwords's People

Contributors

carbm1 avatar

Watchers

James Cloos avatar  avatar Chuck Smith avatar

Forkers

carbm1

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.