How to grep or search .jar files for OpenSSL?

How do I search the .jar files for Openssl on my MAC? You can check the JAR files with the following script: #!/usr/bin/env bash JAR_FILES=(“httpmime-4.1.3.jar” “libGoogleAnalyticsServices.jar” “opentok-android-sdk-2.3.1.jar” “sc-light-jdk15on-1.47.0.2.jar” “scpkix-jdk15on-1.47.0.2.jar” “scprov-jdk15on-1.47.0.2.jar” “socketio.jar”) for jar_file in “${JAR_FILES[@]}” do echo “************ $jar_file ************” grep ‘1.0.1h’ “$jar_file” done You should replace the string ‘1.0.1h’ with the vulnerable OpenSSL version … Read more

NASM issue on OSX 64-bit [duplicate]

If you’re using nasm 2.11.08, there is a issue documented here to do with relative addressing combined with multiple entries in the data section. You can do one (or both) of two things to be certain. First, you can have a look at the generated assembler code to investigate what it’s actually churning out. That’s … Read more

Applescript; opening an app in Space number N

In OS X 10.5 or 10.6, Spaces assignments can be accessed and changed via the scriptable interface to System Events.app: tell application “System Events” set x to application bindings of spaces preferences of expose preferences set x to {|com.apple.textedit|:4} & x — Have TextEdit appear in space 4 set application bindings of spaces preferences of … Read more

NSWindow contentView not cover full window size – macOS & SwiftUI

I just used the following variant in AppDelegate, the content of ContentView and others can be any func applicationDidFinishLaunching(_ aNotification: Notification) { // Create the SwiftUI view that provides the window contents. let contentView = ContentView() .edgesIgnoringSafeArea(.top) // to extend entire content under titlebar // Create the window and set the content view. window = … Read more

Getting Mouse Coordinates in Swift

You should take a look at NSEvent method mouseLocation edit/update: Xcode 11 • Swift 5.1 If you would like to monitor events on any window when your app is active, you can add a LocalMonitorForEvents matching mouseMoved mask and if it is not active a GlobalMonitorForEvents. Note that you need set to your window property … Read more

MacOSX – File extension associate with application – Programmatically

To register a new file extension with an application use the following defaults command. Replace PUT_FILE_EXTENSION_HERE_WITHOUT_PERIOD with the file extension i.e. txt. Replace org.category.program with the com/org name of your program i.e. com.apple.itunes. $ defaults write com.apple.LaunchServices LSHandlers -array-add \ “<dict><key>LSHandlerContentTag</key> <string>PUT_FILE_EXTENSION_HERE_WITHOUT_PERIOD</string><key>LSHandlerContentTagClass</key> <string>public.filename-extension</string><key>LSHandlerRoleAll</key> <string>org.category.program</string></dict>” Once you have added the file extension to the launch services, … Read more

SSH -L connection successful, but localhost port forwarding not working “channel 3: open failed: connect failed: Connection refused”

ssh -v -L 8783:localhost:8783 [email protected] … channel 3: open failed: connect failed: Connection refused When you connect to port 8783 on your local system, that connection is tunneled through your ssh link to the ssh server on server.com. From there, the ssh server makes TCP connection to localhost port 8783 and relays data between the … Read more