Code Monkey home page Code Monkey logo

posh-ubiquiti's People

Contributors

hasechris avatar justingist avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

posh-ubiquiti's Issues

General run problems

Hi,

i tried to run your Module but kept getting this bullshit:

PS F:\Eigene Dateien\Chris\Downloads> Decrypt-UBNTBKP -ubntbkp .\autobackup_5.9.26_20181029_0600_1540792800030.unf
Create-AesManagedObject : Die Benennung "Create-AesManagedObject" wurde nicht als Name eines Cmdlet, einer Funktion, einer Skriptdatei oder eines
ausführbaren Programms erkannt. Überprüfen Sie die Schreibweise des Namens, oder ob der Pfad korrekt ist (sofern enthalten), und wiederholen Sie den
Vorgang.
In F:\Eigene Dateien\Chris\Downloads\Posh-UBNT.psm1:14 Zeichen:19
+     $aesManaged = Create-AesManagedObject -key $key -IV $iv
+                   ~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Create-AesManagedObject:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Es ist nicht möglich, eine Methode für einen Ausdruck aufzurufen, der den NULL hat.
In F:\Eigene Dateien\Chris\Downloads\Posh-UBNT.psm1:15 Zeichen:5
+     $unencryptedData = $decryptor.TransformFinalBlock($encryptedstrin ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

Es ist nicht möglich, eine Methode für einen Ausdruck aufzurufen, der den NULL hat.
In F:\Eigene Dateien\Chris\Downloads\Posh-UBNT.psm1:16 Zeichen:5
+     $aesManaged.Dispose()
+     ~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

Ausnahme beim Aufrufen von "WriteAllBytes" mit 2 Argument(en):  "Der Wert darf nicht NULL sein.
Parametername: bytes"
In F:\Eigene Dateien\Chris\Downloads\Posh-UBNT.psm1:18 Zeichen:5
+     [io.file]::WriteAllBytes($outfile,$unencryptedData)
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ArgumentNullException

PS F:\Eigene Dateien\Chris\Downloads>

I found these missing functions in your credits O.o Why have you left them out? These are needed. After that i kept getting this error:

PS F:\Eigene Dateien\Chris\Downloads> Decrypt-UBNTBKP -ubntbkp .\autobackup_5.9.26_20181029_0600_1540792800030.unf
Es ist nicht möglich, eine Methode für einen Ausdruck aufzurufen, der den NULL hat.
In F:\Eigene Dateien\Chris\Downloads\Posh-UBNT.psm1:15 Zeichen:5
+     $unencryptedData = $decryptor.TransformFinalBlock($encryptedstrin ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

Ausnahme beim Aufrufen von "WriteAllBytes" mit 2 Argument(en):  "Der Wert darf nicht NULL sein.
Parametername: bytes"
In F:\Eigene Dateien\Chris\Downloads\Posh-UBNT.psm1:18 Zeichen:5
+     [io.file]::WriteAllBytes($outfile,$unencryptedData)
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ArgumentNullException

Hm, Whats the problem here... Oh i see. $decrypter.TransformFinalBlock cannot exist at line 15. You forgot the line in front of it!

From PowershellAes.ps1:

function Decrypt-String($key, $encryptedStringWithIV) {
    $bytes = [System.Convert]::FromBase64String($encryptedStringWithIV)
    $IV = $bytes[0..15]
    $aesManaged = Create-AesManagedObject $key $IV
    $decryptor = $aesManaged.CreateDecryptor();
    $unencryptedData = $decryptor.TransformFinalBlock($bytes, 16, $bytes.Length - 16);
    $aesManaged.Dispose()
    [System.Text.Encoding]::UTF8.GetString($unencryptedData).Trim([char]0)
}

The 5th line is missing!

Now it ran superb. I will upload a commit with the running Module Version.

So many dependencies and nothing is provided

To start with you call Create-AesManagedObject but provide no reference to the source other than thanking someone. The code in the basic form does not work. If you are going to share, give more indication of the dependencies so that others can also appreciate your efforts. But for now, it's a flop, doesn't work, a failure. Sorry for the bluntness but really sugar coating it enables laziness.

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.