rss

M$ Windows: minimal howto

This post is a kind of minimal 'how to' for Micro$oft Windows.

Windows : basic command (to execute from [WINDOWS + R])

cmd           : classic console
powershell    : power shell command console
msinfo32      : host info
devmgmt.msc   : devices management (fr: Gestionnaire de périphériques)
certmgr.msc   : certificates managers
services.msc  : windows services
shell:Startup : show startup programs (if any)
NB: for ssl cf ssl howto

network related commands

  • list all LISTENING ports
netstat -ano
netstat -ano | find "LIST"
  • find an application from portsrc
netstat -ano | find "LIST"
==> Pick the wanted process id from the last column. Example pid "8112"
tasklist  | find "8112"
tasklist /svc | find "8112"
  • DNS lookup
nslookup www.google.fr
nslookup
server 8.8.8.8
www.google.fr

other usefull common tools

  • FileZilla (secure FTP)
  • Notepad++ (light editor)
  • Cygwin (unix like shell)
  • Process Hacker 2 (improved task list manager)

ssl certificates and truststore: minimal howto

This post is a kind of minimal 'how to' for SSL, certificates and truststore

Java error

javax.net.ssl.SSLHandshakeException: 
sun.security.validator.ValidatorException: PKIX path building failed: 
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Java workarounds

  • (bad and quick way) Disable all ssl check by configuration cf. UnsafeSSLHelper (from javabox github project)
  • (right way) Update the ssl verification chain. For example by importing new valid certificate(s) to your truststore.

Windows

  • Windows > List certificates:

    Start / Execute / certmgr.msc
  • Google Chrome > List certificates:

    go to Parameters, the search "ssl" (chrome://settings/search#ssl)


  • Import a certificate in a truststore file:

    Make a backup :
    cp %JAVA_HOME%/jre/lib/security/cacerts %JAVA_HOME%/jre/lib/security/cacerts.orig 
    
    Import a certificate :
    keytool -import -alias MyCert -keystore %JAVA_HOME%/jre/lib/security/cacerts -trustcacerts -file MyCert.cer
    

    (cf. commandes+keytool ...)

shared libraries "lib.so and lib.dll" file: minimal how to

This post is a kind of minimal 'how to' for the shared libraries : ex. under linux mylib.so or under windows my.dll

Windows





Linux

  • List library exported symbols (then functions)
readelf -s /usr/lib/libspreadsheet.so |grep workbook_sheet
nm -D /usr/lib/libspreadsheet.so |grep workbook_sheet
objdump -T /usr/lib/libspreadsheet.so |grep workbook_sheet



  • List library dependencies

readelf -d /usr/lib/libspreadsheet.so|grep NEEDED