Skip to content

Instantly share code, notes, and snippets.

View juyeong's full-sized avatar
🤠

Juyeong Lee juyeong

🤠
View GitHub Profile
@juyeong
juyeong / productkey.vbs
Created January 1, 2021 06:40
Retrieve Windows product key
Set WshShell = CreateObject("WScript.Shell")
Function ConvertToKey(Key)
Const KeyOffset = 52
i = 28
Chars = "BCDFGHJKMPQRTVWXY2346789"
Do
Cur = 0
x = 14
Do
Cur = Cur * 256
@juyeong
juyeong / OkHttpXRayInterceptor.kt
Created December 1, 2019 06:02
OKHttpInterceptor to trace AWS X-Ray
package bot.data
import com.amazonaws.xray.AWSXRay
import com.amazonaws.xray.entities.Namespace
import okhttp3.Interceptor
import okhttp3.Response
class OkHttpXRayInterceptor : Interceptor {
companion object {
private val recorder = AWSXRay.getGlobalRecorder()
@juyeong
juyeong / LayoutInflater1.kt
Created December 14, 2018 06:29
LayoutInflater
val inflater: LayoutInflater = context.getSystemService(Context.LAYOUT_INFLATER_SERVICE)
val view: View = inflater.inflate(R.layout.my_layout, parent, false)
@juyeong
juyeong / decrypt_jenkins.rb
Created October 28, 2016 02:10
Decrypt jenkins password / token
#!/usr/bin/env ruby
# refer to
# https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/util/Secret.java
# https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/jenkins/security/ApiTokenProperty.java
require 'base64'
require 'digest'
require 'openssl'