This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module github.com/jessepeterson/scep-go-kit-dep-example | |
go 1.21.3 | |
require github.com/smallstep/scep v0.0.0-20240925131050-18439bca3e8e | |
require github.com/smallstep/pkcs7 v0.0.0-20231024181729-3b98ecc1ca81 // indirect |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/mdm/enroll/transport_http.go b/mdm/enroll/transport_http.go | |
index 043a3e6..78a6fee 100644 | |
--- a/mdm/enroll/transport_http.go | |
+++ b/mdm/enroll/transport_http.go | |
@@ -3,8 +3,10 @@ package enroll | |
import ( | |
"context" | |
"errors" | |
+ "fmt" | |
"io/ioutil" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>PayloadContent</key> | |
<array> | |
<dict> | |
<key>PayloadDisplayName</key> | |
<string>Dock</string> | |
<key>PayloadIdentifier</key> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"log" | |
"github.com/groob/plist" | |
) | |
const cmdPlist = `C "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*.status.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"flag" | |
"fmt" | |
"log" | |
"os" | |
"github.com/boltdb/bolt" | |
"github.com/micromdm/micromdm/platform/pubsub/inmem" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
class DmgMounter(object): | |
"""Base class for Processors that need to mount disk images.""" | |
DMG_EXTENSIONS = ['.dmg', '.iso', '.DMG', '.ISO'] | |
#pylint: disable=invalid-name | |
def parsePathForDMG(self, pathname): | |
"""Helper method for working with paths that reference something |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
''' | |
Takes a list of file names/paths on stdin and checks to see if they have | |
unresolvable ACE entries in their ACLs. E.g. ACEs which have a non-resolvable | |
UUID on the system. | |
Usage: | |
find /some/file/path | /path/to/findbadacls.py | |
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import plistlib | |
pl = plistlib.readPlist(sys.argv[1]) | |
structs = [] | |
def struct_from_dict(name, vals): | |
global structs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import grp, pwd, os | |
from ctypes import * | |
from ctypes.util import find_library | |
libc = cdll.LoadLibrary(find_library('libc')) | |
# getgrouplist_2() is an undocumented API which, I beleive, retrives all of | |
# a user's groups instead of the maximum 16 groups which getgrouplist() gets |
NewerOlder