Skip to content

Instantly share code, notes, and snippets.

View ctkqiang's full-sized avatar
👨‍💻
请我喝咖啡吗?

钟智强 ctkqiang

👨‍💻
请我喝咖啡吗?
View GitHub Profile
@ctkqiang
ctkqiang / Buffer Overflow Tutorial in Kali.md
Created May 15, 2019 03:08 — forked from apolloclark/Buffer Overflow Tutorial in Kali.md
Buffer overflow demonstration in Kali Linux, based on the Computerphile video
#!/use/bin/env python3
import tkinter
from tkinter import *
from tkinter.filedialog import asksaveasfilename
from PIL import Image, ImageTk, ImageGrab
window = tkinter.Tk()
window.geometry("520x800")
window.title("STARLABS BIOSCIENCE SDN BHD")
package com.johnmelodyme.bloodsugarcontrolv1;
/*
*このページは、読み込みに伴うスプラッシュです。
* これは John Melody Melissa によってコーディングされています。
* このライセンスは、商標、サービスマーク、
* または貢献者のロゴ(準拠するために必要な場合を除く)
* セクション3.4の通知要件)。
**/
Guys I have Some issue:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: my.kylogger.johnmelodyme.iot.embedded.serialcommunicationuart, PID: 11607
java.lang.IllegalStateException: Could not execute method for android:onClick
My Source :
public void OpenSerial(View view){
String baudtext = Baud.getSelectedItem().toString();
// I use Java , in kotlin is almost the same I guess
...
//Global
private Firebase firebase;
//something
...
// in onCreate();
firebase = Firebase.getInstance();
...
FirebaseUser firebaseUser = firebase.getCurrentUser();
@ctkqiang
ctkqiang / base64.dart
Last active May 3, 2020 19:10
Hey guys am i doing it right or wrong? My intention is to decode hashes I just encoded of an image. How do I decode ? My code Need reviewed .
//encode:
Future<void> _encryptionBinary() async {
int x = 0;
int y = 100;
print("Please Enter {content} you want to encrypt: ");
String _requestUserFileInput = IO.stdin.readLineSync();
List _binary = await new IO.File(_requestUserFileInput).readAsBytesSync();
String _encodedFile = base64.encode(_binary);
print("Encoded Binary: $_encodedFile".substring(x, y));
}
@ctkqiang
ctkqiang / base64.php
Created May 3, 2020 19:13
Hey guys am i doing it right or wrong? My intention is to decode hashes I just encoded of an image. How do I decode ? My code Need review ::
<?php
// My intention is to decodeencrypted image hashes
// and export back to File(image.extension)
echo "Decrypt {string} or {file}? [input: \"str\" || \"bin\", type \"exit()\" for quit the programme]";
$__userInputOption = rtrim(fgets(STDIN));
if ($__userInputOption == "str"){
echo "Please enter {string} you want to decode: \n";
$_input = rtrim(fgets(STDIN));
$_encodedString = base64_decode($_input);
echo "Encoded String: ".$_input."\n";
@ctkqiang
ctkqiang / base64.py
Created May 3, 2020 20:11
I am so stuck at decoding an encoded image, Mind help?
#encoder:
import base64
_userOriginalBinaryfile = input("Please Enter the Location of the file design to encrypt: ")
with open(_userOriginalBinaryfile, "rb") as _inputFile:
_input_file_data = _inputFile.read()
_encodeData = base64.b64encode(_input_file_data)
_encodeMessage = _encodeData.decode("utf-8")
print(_encodeMessage)
package src.decryption;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.security.spec.KeySpec;
import java.util.Scanner;
import javax.crypto.Cipher;
import javax.crypto.SecretKey;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.IvParameterSpec;
package src.encryption;
/*
* @string encryption sample
*/
import java.io.UnsupportedEncodingException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Arrays;
import java.util.Base64;
import java.util.Scanner;