Eikonal Blog

2015.06.03

SourceForge has lost its common sense

Filed under: it, tools — Tags: , , , — sandokan65 @ 13:46

For long time the SourceForge was one of the most trusted open source projects repositories, where one could go to download the latest versions of numerous useful applications. They were a site safe from influence of various shady commercial interests, providing the installers and binaries as they are built by the project developers.

Few days ago it was announced on several technical sites that SourceForge has changed its business practice, and that it had went the CNET’s download.com way: they now repackage original installers into their own wrapper installers that (beside starting the contained original installer of the application one is interested in) perform drive-by installations of various cr*pware (adware, shareware, etc).

Following articles illustrate what is know about that change at this moment:


An afterthought: The same company that owns SourceForge is also owner of SlashDot discussion forum/site. So, I expect that they will go down the drain soon, too.


Update: Apparently this is going on for some time now:


Related: “C|Net’s Download.Com trojans” – https://eikonal.wordpress.com/2011/12/06/cnets-download-com-trojans/

2012.02.14

OpenSSL

  • HTTPS server banner:

      openssl s_client -connect:IPAddress:443

    after connection is established, type in “HEAD / HTTP/1.0” and press enter.

    Alternative:

      echo -e "HEAD / HTTP/1.0\n\n" | openssl s_client -quiet -connect IPAddress:443

  • NTTPS server banner

      openssl s_client -connect:IPAddress:563
      

  • IMAPS server banner:

      openssl s_client -connect:IPAddress:993
      

  • POP3S server banner:

      openssl s_client -connect:IPAddress:995
      

  • Identifying SSL cyphers:

      openssl s_client -connect website:443 -cipher EXPORT40
      openssl s_client -connect website:443 -cipher NULL
      openssl s_client -connect website:443 -cipher HIGH
      

  • Generating password hash four unix:

      openssl passwd -1 -salt QIGCa pippo
      

    output: $1$QIGCa$/ruJs8AvmrkmzKTzM2TYE.

  • Converting a PKCS12-encoded (or .pfx) certificate to PEM format:

      openssl pkcs12 -in CertFile.p12  -out NewCertFile.pem   -nodes. -cacerts
      

  • Converting a DER-encoded certificate to PEM format:

      openssl x509  -in CertFile.crt.  -inform DER  -out NewCertName.pem   -outform PEM
      

  • Download a proxy’s public certificate:

      openssl s_client-connect ProxyHostname:port   proxycert.pem
      

  • Create a key:

      openssl genrsa -des3 -out server.key 1024
      

  • Create a CSR (certificate signing request):

      openssl req -new -key server.key -out server.csr
      

  • Remove a password from a key:

      cp server.key server.key.org
      openssl rsa -in server.key.org -out server.key
      

  • Sign the CSR and create the certificate:

      openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
      cat server.crt server.key > certificate.pem
      

  • Encrypting a file:

      cat INFILE | openssl aes-256-ecb -salt -k PASSWORD > INFILE.ssl
      

  • Decrypting a file:

      cat INFILE.ssl | openssl aes-256-ecb -d -k PASSWORD > INFILE
      

2012.02.07

Excel sortIP macro

Filed under: transformers — Tags: , , — sandokan65 @ 14:39

Found this somewhere on web several months ago. Very useful for long lists of machines that one want to order by IP addresses.

    Option Explicit
    Sub sortIP() 'sorts IP addresses
    Dim i As Long, j As Long, k As Long
    Dim IP
    Dim rg()
    Dim RangeToSort As Range
    Dim IPaddress As String
    Dim IPColumn As Long
    
    IPaddress = "#*.#*.#*.#*"
    
    Set RangeToSort = Selection
    
    'If just one cell selected, then expand to current region
    If RangeToSort.Count = 1 Then
    Set RangeToSort = RangeToSort.CurrentRegion
    End If
    
    'Check if row 1 contains an IP address. If not, it is a header row
    
    'first find column with IP addresses. Check row 2 since row 1 might be a Header
    IPColumn = 1
    Do Until RangeToSort.Cells(2, IPColumn).Text Like IPaddress
    If IPColumn > RangeToSort.Columns.Count Then
    MsgBox ("No valid IP address found in Row 1 or Row 2")
    Exit Sub
    End If
    IPColumn = IPColumn + 1
    Loop
    
    If Not RangeToSort(1, IPColumn).Text Like IPaddress Then
    Set RangeToSort = RangeToSort.Offset(1, 0). _
    Resize(RangeToSort.Rows.Count - 1, RangeToSort.Columns.Count)
    End If
    
    
    
    'one extra column for the IP sort order
    ReDim rg(RangeToSort.Rows.Count - 1, RangeToSort.Columns.Count)
    
    
    
    For i = 0 To UBound(rg)
    For k = 1 To UBound(rg, 2)
    rg(i, k) = RangeToSort.Cells(i + 1, k).Text
    Next k
    IP = Split(rg(i, IPColumn), ".")
    For j = 0 To 3
    rg(i, 0) = rg(i, 0) & Right("000" & IP(j), 3)
    Next j
    
    Next i
    
    rg = BubbleSort(rg, 0)
    
    For i = 0 To UBound(rg)
    For k = 1 To UBound(rg, 2)
    RangeToSort.Cells(i + 1, k) = rg(i, k)
    Next k
    Next i
    
    End Sub
    '-------------------------------------------
    Function BubbleSort(TempArray As Variant, d As Long) 'D is dimension to sort on
    Dim temp() As Variant
    Dim i As Integer, j As Integer, k As Integer
    Dim NoExchanges As Boolean
    
    k = UBound(TempArray, 2)
    ReDim temp(0, k)
    
    Do
    NoExchanges = True
    
    For i = 0 To UBound(TempArray) - 1
    If TempArray(i, d) > TempArray(i + 1, d) Then
    NoExchanges = False
    For j = 0 To k
    temp(0, j) = TempArray(i, j)
    TempArray(i, j) = TempArray(i + 1, j)
    TempArray(i + 1, j) = temp(0, j)
    Next j
    End If
    Next i
    Loop While Not NoExchanges
    
    BubbleSort = TempArray
    
    End Function
    


    Related here: Excel to text – https://eikonal.wordpress.com/2011/02/14/excel-to-text/ | Excel files processing – https://eikonal.wordpress.com/2011/02/25/excel-files-processing/ | IT tips pages – https://eikonal.wordpress.com/2010/02/08/it-tips-pages/

2011.08.17

eBooks and eBook Format Transformers

Sites


Articles


Devices and other readers

  • Amazon’s Kindle
  • barnes and Noble’s Nook
  • FBReader — e-book reader for Unix/Windows computers – http://www.fbreader.org/

eBook format transformers

Kindle blogs

PDF

2011.06.20

Web applications

Mozilla Prism (aka WebRunner) & Chromeless

Embedded IE


Related here: HTML5 – https://eikonal.wordpress.com/2011/03/04/html5/ | Scripting user interfaces – https://eikonal.wordpress.com/2010/07/22/scripting-user-interfaces/

2011.05.19

Automation

Filed under: automation — Tags: , — sandokan65 @ 11:46

2011.04.25

Steganography

Filed under: crypto, infosec, privacy, tools — Tags: — sandokan65 @ 14:45
  • “New Tool Hides Data In Plain Sight On HDDs” (SlashDot; 2011.04.25) – http://it.slashdot.org/story/11/04/25/1558237/New-Tool-Hides-Data-In-Plain-Sight-On-HDDs
      “A group of researchers has developed a new application that can hide sensitive data on a hard drive without encrypting it or leaving any obvious signs that the data is present. The new steganography system relies on the old principle of hiding valuables in plain sight. Developed by a group of academic researchers in the US and Pakistan, the system can be used to embed secret data in existing structures on a given HDD by taking advantage of the way file systems are designed and implemented. The software does this by breaking a file to be hidden into a number of fragments and placing the individual pieces in clusters scattered around the hard drive.”

2011.03.04

HTML5

Filed under: tools, web tools — Tags: , , , , , — sandokan65 @ 13:47

Test sites that support HTML5

Conversion tools

2011.02.25

Excel files processing

Filed under: perl, scripting, transformers — Tags: — sandokan65 @ 23:55

Related here: Excel sortIP macro – https://eikonal.wordpress.com/2012/02/07/excel-sortip-macro/ | Excel to text – https://eikonal.wordpress.com/2011/02/14/excel-to-text/ | IT tips pages – https://eikonal.wordpress.com/2010/02/08/it-tips-pages/

2011.02.14

Excel to text

Filed under: perl, scripting, tools, transformers — Tags: , — sandokan65 @ 14:11
  • excel2txt (by Ken Youens-Clark) – http://search.cpan.org/~kclark/excel2txt/excel2txt [Perl] – convert Excel data to delimited text files
    • Example use:

      > excel2txt PasswdFiles.xls
      Processing PasswdFiles.xls
      Writing 'passwdfiles-fiapp1.txt'
      Writing 'passwdfiles-fiapp2.txt'
      Writing 'passwdfiles-fiapp3.txt'
      Writing 'passwdfiles-fiapp4.txt'
      Writing 'passwdfiles-fiapp6.txt'
      Writing 'passwdfiles-fiapp7.txt'
      Writing 'passwdfiles-fiapp8.txt'
      Writing 'passwdfiles-fiapp9.txt'
      Writing 'passwdfiles-fidb1.txt'
      Writing 'passwdfiles-fidb2.txt'
      Writing 'passwdfiles-fidb3.txt'
      Writing 'passwdfiles-fidb4.txt'
      Writing 'passwdfiles-fiweb1.txt'
      Writing 'passwdfiles-fiweb2.txt'
      Writing 'passwdfiles-fiweb3.txt'
      Writing 'passwdfiles-fiweb4.txt'
      Done, processed 1 Excel file, created 16 data files.
      

Related here: Excel sortIP macro – https://eikonal.wordpress.com/2012/02/07/excel-sortip-macro/ | Excel files processing – https://eikonal.wordpress.com/2011/02/25/excel-files-processing/ | IT tips pages – https://eikonal.wordpress.com/2010/02/08/it-tips-pages/

2011.02.10

File systems over anything

Filed under: Uncategorized, web tools — Tags: , , — sandokan65 @ 16:25

2010.10.05

sed tricks

Filed under: scripting, transformers — Tags: , , — sandokan65 @ 15:58

These one-liners are collected from various sites and articles on web – see the list of Sources at the bottom of this posting.

  • Deleting all empty lines from the input file:
    sed ‘/^$/d’ 
  • In-place replacement:
    sed –i ‘/^$/d’ INPUTFILE
  • In-place replacement with backup of original file:
    sed –ibak ‘/^$/d’ INPUTFILE
  • In-place deletion of all occurences of a string in a file:
    sed –i ‘/WORDTOBEDELETED/d’
  • How to replace the first occurrence only (of a string match) in a file, using sed
    sed '0,/THISSTRING/s//TOTHATSTRING/' INPUTFILE
  • Append environment variable PATH with sed:
    sed -e '/^PATH/s/"$/:\/usr\/lib\/myprog\/bin"/g' -i /etc/environment
  • Remove all whitespace from beinning of lines:
    sed 's/^[ \t]*//g' foo
  • Deleting the / from all html files contained in current folder:
    sed -i ‘s/src=”\//src=”/g’ *.html
  • Greedy matching:
    % echo "foobar" | sed 's///g'
    bar
    
  • Non greedy matching:
    % echo "foobar" | sed 's/]*>//g'
    foobar
    

Sources:

References


Related here: Command line based text replace – https://eikonal.wordpress.com/2010/07/13/command-line-based-text-replace/.

Related here: Scripting languages – https://eikonal.wordpress.com/2010/06/15/awk-sed/ | Unix tricks – https://eikonal.wordpress.com/2011/02/15/unix-tricks/ | SED tricks – https://eikonal.wordpress.com/2010/10/05/sed-tricks/ | Memory of things disappearing > nmap stuff > getports.awk – https://eikonal.wordpress.com/2010/06/23/memory-of-things-disappearing-nmap-stuff-getports-awk/ | AWK – https://eikonal.wordpress.com/2011/09/30/awk/

Transformers

Filed under: transformers — Tags: , , , , , — sandokan65 @ 14:49

DJVU to PDF

Mail processing tools

CSV to/from LDIF

Finding difference of two MS Word documents

2010.09.13

Windows tools

VARIOUS

System information tools / Gathering system information

Benchmarking

RAM tools

Hard disk size usage

Hard disk defragmentation

Partitioning hard disks

Currently running processes

Port mappers / Currently open ports

  • FPort by Foundstone@McAfee – http://www.foundstone.com/us/resources/proddesc/fport.htm; [FREEWARE]
  • CurrPorts – http://www.snapfiles.com/get/cports.html [FREEWARE] – it allows viewing a list of ports that are currently in use, and the applications using them. You can close a selected connection and also terminate the process using it, and export all or selected items to a HTML or text report. Additional information includes the local port name, local/remote IP address, highlighted status changes and more. Other features include logging of changes, custom filters and more.
  • Opened Ports Viewer by Gaijin – http://www.gaijin.at/en/dlopview.php… displays a list with all opened ports on a machine, including the associated process (similar the console command “netstat”). The port list can be sorted and filtered. An export function enables youto save the list as HTML, CSV or plain text file. Opened Ports Viewer can be used in multi-user environments and on USB sticks.

Control of startup programs

System maintenance and Patching

Mics:

Registry cleaning and maintenance

Uninstallers

Undeleting/recovering files

Misc:

Recovering product keys

Backup

  • Oops!Backup by Altaro – http://www.altaro.com/timemachine/index.php [COMMERCIAL]
  • Misc

    Toolkits

    Spam protection


    Here: Security tools –https://eikonal.wordpress.com/2010/07/28/security-tools/ | Portable tools – https://eikonal.wordpress.com/2010/01/08/portable-applications/.

    2010.08.03

    Archiving and compression tools

    Filed under: tools — Tags: , , , , — sandokan65 @ 10:24

    2010.07.28

    Security tools

    2011.02.28: This post was getting too large, so I broke it into smaller pieces:


    There are still some smaller islands of content that do not yet deserve separate postings:

    Patch Management

    • GFI Languard
    • NSS
    • Lumension
    • EndPoint

    Sites:

    IT Management

    Datamining / logs management

    Password analysis

    Various collections

    Misc


    Sources:


    See also local info at this blog:

    Version control systems

    Filed under: tools — Tags: , , , , — sandokan65 @ 10:25

    2010.07.22

    Scripting user interfaces

    Filed under: web tools — Tags: , , , , , — sandokan65 @ 13:32

    Browser scripting:

    2010.07.13

    Command line based text replace

    sed

    • sed 's/Mark Monre/Marc Monroe/' 1.txt > 2.txt
    • find ./* -type f -exec sed -i 's///g' {} \;

    The “replace” command

    • Syntax:
      replace OLD-STRING NEW-STRING OUTPUT-FILE
    • Example:
      $ replace UNIX Linux  newfile
    • Example:
      $ cat /etc/passwd | replace : '|'
    • Partial support for regular expressions: \^ – matches start of line, and $ matches end of line.
    • Example: replace all IP address 192.168.1.2 start of line:
      $ replace \^192.168.1.2 192.168.5.10  newfile
    • a bash script, ‘fixer.sh’
      #!/bin/bash
      replace CHANGEFROM CHANGETO $1.tmp
      rm $1
      mv $1.tmp $1
      

      now run this command line:

      $ grep CHANGEFROM |cut -d':' -f1 |xargs -n 1 fixer.sh

      the results is that all files in the directory (or whatever you grep for) will be changed automagically.
      just make sure the grep doesn’t include the fixer script itself, or it will die half-way through changing when execute permissions are reset!


    Perl


    Sources:


    Related: Regular expressions – https://eikonal.wordpress.com/2010/04/02/regular-expressions/ | Perl online – https://eikonal.wordpress.com/2010/02/15/perl-online/

    2010.07.12

    netcat

    Filed under: infosec, tools — Tags: — sandokan65 @ 23:34
    Older Posts »

    Blog at WordPress.com.