Skip to content

Instantly share code, notes, and snippets.

View saniaky's full-sized avatar
👋

Alexander saniaky

👋
  • Web
  • Online
View GitHub Profile
@saniaky
saniaky / gist:7fe9c245209403b2ab567e437b9882aa
Created May 4, 2017 13:34
Check remote server SSL certificate
true | openssl s_client -connect site.com:443 -servername site.com | openssl x509 -noout -text | grep DNS:
@saniaky
saniaky / example.java
Created August 29, 2015 19:42
Java reflection api
public void getObject(Object obj) {
try {
for (Field field : obj.getClass().getDeclaredFields()) {
//field.setAccessible(true); // if you want to modify private fields
System.out.println(field.getName()
+ " - " + field.getType()
+ " - " + field.get(obj));
}
} catch (IllegalAccessException e) {
e.printStackTrace();