Code Monkey home page Code Monkey logo

signposhscripts's Introduction

SignPoshScript

WPF GUI written im PowerShell to sign your scripts.

Prerequisites

You need to import at least one CodeSigning Certificate into your users certificate store at: Cert:\CurrentUser\My\

The enhanced key usage (EKU) must be Code Signing (1.3.6.1.5.5.7.3.3)

Files

  • CodeSigningTool.exe - precompiled executable of the PoSh Sign.ps1 script
  • SignPS.ps1 - WFP / PowerShell source code

signposhscripts's People

Contributors

betahydri avatar

Stargazers

 avatar  avatar

signposhscripts's Issues

Not showing up any certificates to use

I tried several tutorials to create a cert (like https://adamtheautomator.com/how-to-sign-powershell-script/ for example)
and i also tried the following code which was generated by phind:

param (
    [switch]$skipUAC = $false
)

if (-Not $skipUAC) {
    if (-Not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) {
        if ([int](Get-CimInstance -Class Win32_OperatingSystem | Select-Object -ExpandProperty BuildNumber) -ge 6000) {
            $CommandLine = "-File `"" + $MyInvocation.MyCommand.Path + "`" " + $MyInvocation.UnboundArguments
            Start-Process -FilePath PowerShell.exe -Verb Runas -ArgumentList $CommandLine
            Exit
        }
    }
}
function Generate-Certificate {
    $cert = New-SelfSignedCertificate -DnsName 'localhost' -CertStoreLocation 'cert:\LocalMachine\My'
    $store = New-Object System.Security.Cryptography.X509Certificates.X509Store 'Root', 'LocalMachine'
    $store.Open('ReadWrite')
    $store.Add($cert)
    $store.Close()
}
Add-Type -AssemblyName System.Windows.Forms
$form = New-Object System.Windows.Forms.Form
$form.Text = 'Certificate Generator'
$generateButton = New-Object System.Windows.Forms.Button
$generateButton.Text = 'Generate Certificate'
$generateButton.Add_Click({ Generate-Certificate }) # We'll define this function later
$form.Controls.Add($generateButton)
$form.ShowDialog()

but your tool still shows no cert to use:

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.