Feeds:
Posts
Comments

After the worrying signs (for more details see: https://fritzone.wordpress.com/2016/11/30/google-just-redlisted-my-netscanner/) today I have discovered that my most popular open source tool which allowed scanning of local networks (having around 90000 downloads from sourceforge) has been finally purged by sourceforge.

So if you try to access https://sourceforge.net/projects/netscan/ it will just give you the blank stare of an absent minded office droid.

It would have been nice from sourceforge at least an explanatory letter of why it happened, however I don’t expect anything like that.

my_tombstone

For upcoming projects… such as netscan 0.2 (see screenshot below) I will make sure to choose a different open source host.

Screenshot 2017-08-10 13.53.15

I have just recently rediscovered the source code of a text editor application I wrote … long time ago as a university project (possibly in 1999 or even before). It is sort of the resemblance of my favourite then editor, Borlands’ Turbo Pascals’ IDE. Just a hint to see how it looks:

te1

I was thinking that vow, today I’d really like to have it in my Linux console, since it’s basically a … text mode application. So I tried to read its’ source code… and that’s when it struck me that this application will never make on Linux, since … it uses direct memory addressing, such as:

type  scrtype=array[1..2000] of word;
var screen:scrtype absolute $B800:0;

and it’s full with assembly instructions and direct memory access, in the form of:

procedure flip;ASSEMBLER;
asm
 push ds
 mov ax, 0b800h
 mov es, ax
 mov ax, Tseg
 mov ds, ax
 xor si, si
 xor di, di
 mov cx, 1000
 db 0F3h, 066h, 0A5h
 pop ds
end;

Down even to the level of hardcoding the rep movs WORD PTR es:[edi],WORD PTR ds:[esi] instruction into hexa bytes since the builtin assembler of Turbo Pascal was choking on this instructions and did not compile it.

Little did I know in those days, about writing portable applications … what the heck, we didn’t even had a Linux computer at our university.

Today the times have changed a bit. I write all my applications in standard compliant C++, and test it on multiple systems, on various compilers and OS’s. That is the only way that ensures maximum portability and maintainability.

I suddenly have discovered that Google has just redlisted a tiny and free network scanning application I wrote some time ago: netscan. This happened recently, and I still do not understand why.

Interesting that it wasn’t redlisted since 2008, and recently it was added to the harmful programs site, thus presenting me with the following:

reds

every time I try to access https://sourceforge.net/projects/netscan/. I don’t know anything about the presence of harmful programs … there are definitely no harmful programs hidden in there, there never were and never will be, I just feel it’s an algorithmic mechanism kicking in based on some erroneous input.

netscan is a free and widely downloaded application, according to the statistics:

scanstat

which is opensource (sources can be obtained from  https://sites.google.com/site/fritzone/netscan) and I also offer some limited email support. Also an interesting fact to be observed from the graph is the drop of downloads from the introduction of the red-list.

To not to mention that till now, if you typed in “netscan” into the google search you would have got it in usually the second or third place, now it’s not even shown. duckduckgo (and yahoo) however are much closer to reality, they still “remember” the application:

ducks

 

Certainly there is support in order to remove the site from the red-list, but that is mostly aimed to self owned sites which have been hacked. Which is not my case… Now I’m trying to get it off the red list again…

An old engine

Totally not related to programming…

I have read about the first diesel engine (1938, Sulzer, number  241001-002 DE) utilized by the Romanian railway: http://www.derbysulzers.com/cfrprototype.html and I as very please that the article had also some nice photos. And it also mentioned that the train is at the Dej (city in Romania) rail depot. And to my biggest surprise, here it is:

https://www.google.no/maps/@47.1581106,23.9112557,3a,43.4y,188.75h,88.69t/data=!3m6!1e1!3m4!1s35jDZ_OegzoUDPE9A3lppw!2e0!7i13312!8i6656

Hm, what does a Windows XP screenshot do in Microsoft’s flagship Office product do? No idea, I just received it today:

xpbox

You just have to move your mouse to show the tooltips for the Message Options, and the screenshot will pop out in a second.

Regardless, clicking it will bring back the standard Windows 7 message box, so it seems a screenshot was lost in the transition somewhere.

7box

 

While trying to read some fine details about some C macros … I couldn’t. Somehow the browser rendered the parts of the

text describing the __COUNTER__ behaviour outside of the visible area …

ff_error

Ohh, might be that I use Firefox. Let’s see with Internet Explorer.

ie_error

Nope… Same problem.

Let’s fall back to our old friend … lynx.

lynx

Works as expected.

The following script goes into /usr/local/bin. Call it svn-color.py

#!/usr/bin/env python

"""
 Author: Saophalkun Ponlu (http://phalkunz.com)
 Contact: phalkunz@gmail.com
 Date: May 23, 2009
 Modified: June 15, 2009
 
 Additional modifications:
 Author: Phil Christensen (http://bubblehouse.org)
 Contact: phil@bubblehouse.org
 Date: February 22, 2010
"""

import os, sys, re, subprocess

tabsize = 4

colorizedSubcommands = (
	'st',
	'status',
	'add',
	'remove',
	'diff',
)

statusColors = {
    "M"     : "31",     # red 
    "\?"    : "37",     # grey
    "A"     : "32",     # green
    "X"     : "33",     # yellow
    "C"     : "30;41",  # black on red
    "-"     : "31",     # red
    "D"     : "31;1",   # bold red
    "\+"    : "32",     # green
}

def colorize(line): 
    for color in statusColors:
        if re.match(color, line):
            return ''.join(("\001\033[", statusColors[color], "m", line, "\033[m\002"))
    else:
        return line

def escape(s):
    s = s.replace('$', r'\$')
    s = s.replace('"', r'\"')
    s = s.replace('`', r'\`')
    return s

def line_exp(x):
    return {
        'A': "Added",
        'D': "Deleted",
        'M': "Modified",
        'R': "Replaced",
        'C': "Conflicts",
        'X': "Externals",
        'I': "Ignored",
        '?': "Untracked"
    }[x]

passthru = lambda x: x
quoted = lambda x: '"%s"' % escape(x)

if __name__ == "__main__":
    all_lines = []
    cmd = ' '.join(['svn']+[(passthru, quoted)[' ' in arg](arg) for arg in sys.argv[1:]])
    output = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
    cancelled = False
    for line in output.stdout:
        line = line.expandtabs(tabsize)
        if(sys.argv[1] in colorizedSubcommands):
            if not line.startswith("Performing") and len(line)>2:
                all_lines.extend( [line] )
        else:
            print line

    all_lines.sort()
    prev_beg = ''
    for line in all_lines:
		if prev_beg != line[0]:
			print line_exp(line[0])
			prev_beg = line[0]
		line = colorize(line.rstrip())
		line = line.translate(None, '\2')
		line = line.translate(None, '\1')
		print "\t", line

    print ""

And modify ~/.bashrc to contain:

alias svn=/usr/local/bin/svn-color.py