- a simple url encoder/decoder

 a simple url encoder/decoder


Wirtschaft (120) Österreich (92) Pressefreiheit (65) IT (51) Staatsschulden (30) code (29) EZB (19) Pensionssystem (13) France (1) music (1)


AWS CodePipeline for android Github project

A short summary, how to create an amazon code pipeline and build project by using an android java github as source repository. (inspired by j-a.f)

I have choosen my github schnapslet project android subtree for trial.

Login into amazon webservices console

Click on "Create pipeline"

Choose pipeline settings

Enter a "Pipeline name" and a service role for your new pipeline here. Click "Next".

Choose source provider

Choose Gitub, authorize with your github credentials or choose a public github project, choose repositoty, choose branch, then click "Next".

Add build stage

Choose AWS CodeBuild and click on "Create project".

Create build project

In section "Project" configuration fill out "Project name" (Description - optional).

In section "Environment", I choosed the simplest way with "Managed image" as environment image, "Ubuntu" as operating system, "Android" as runtime, "aws/codebuild/android-java-8:26.1.1" as runtime version, default new service role.

In subsection "Additional configuration", you can enable a VPC on your virtual Ubuntu build server, e.g. if you want to login with ssh; you can select various performance features here, like "15 GB memory, 8 vCPUs" for your build server, you can set manually environment variables here and so on. We didn't need that here for only a simple proof of concepts.

In section "Buildspec" I choosed "Insert build commands", then switched to source editor and edited the following buildspec.yaml:
version: 0.2
  #install: #commands: # - command
  #pre_build: #commands: # - command
     - sudo chmod 755 $CODEBUILD_SRC_DIR/android/Schnapslet/gradlew
     - $CODEBUILD_SRC_DIR/android/Schnapslet/gradlew init -i
     - $CODEBUILD_SRC_DIR/android/Schnapslet/gradlew build -i
     - $CODEBUILD_SRC_DIR/android/Schnapslet/gradlew build --build-file $CODEBUILD_SRC_DIR/android/Schnapslet/app/build.gradle -i
#post_build: #commands: # - command
#artifacts: #files: # - location
#cache: #paths: # - paths

Finally click "Continue to CodePipeline".

Now click "Next", when you are back again on "Add build stage" site.

Add deploy stage

I skipped that option for that proof of concept.


Rewiew "Pipeline settings", "Add source stage", "Add build stage", "Add deploy stage" here and finally click "Create pipeline".

Release change

Finally "Release change".

You can configure your "Build project" seperatly now here:
e.g. if you want to change your buildspec.yaml or view different build logs.


Html-Sql-Injection Detection

A very simple prototype of html injection detection in MS SQLServer, please notice, that real detection is much more complex...

If Exists(Select Top 1 object_id From tempdb.sys.tables Where name = '##InjWatch')
Delete From ##InjWatch
Create Table ##InjWatch ( ctext nvarchar(Max), tab varchar(768), col varchar(768)

Declare InjectCursor Cursor FAST_FORWARD READ_ONLY For 
  Select 'Cast([' + + '] as nvarchar(max))' as c_cast, as c_name, '' + + '.[' + ']' as sT_name
  From sys.tables T
  Inner Join sys.columns c
    On  c.object_id = T.object_id
    and c.max_length > 16 and c.system_type_id In (Select system_type_id From sys.types Where name In('varchar', 'nvarchar''char''nchar''text''ntext'))
  Inner Join sys.schemas s
    On s.schema_id = T.schema_id

Declare @c_cast varchar(1024), @c_name varchar(768), @sT_name varchar(768)
Open InjectCursor
Fetch Next From InjectCursor Into @c_cast, @c_name, @sT_name

  Declare @execSQL nvarchar(max)
  Set @execSQL = 'insert into ##InjWatch (ctext, tab, col) '+
    'select ' + @c_cast + ' as ctext, ''' + @sT_name + ''' as tab, ''' + @c_name + ''' as col ' +
    ' from ' + @sT_name + ' with (nolock) ' +
    ' where (' + @c_cast + ' like ''%<%'' and ' + @c_cast + ' like ''%>%'') ' +
    ' or ' + @c_cast + ' like ''%script:%'' or ' + @c_cast + ' like ''%://%''' +
    ' or ' + @c_cast + ' like ''%href%'' or ' + @c_cast + ' like ''%return %''' +
    ' or ' + @c_cast + ' like ''%mailto:%'''
  Execute sp_executesql @execSQL;
  Fetch Next From InjectCursor Into @c_cast, @c_name, @sT_name
Close InjectCursor
Deallocate InjectCursor

Select Distinct * From ##InjWatch


Schnapsen in java

Schnapsen (Schnapslet) Sources for Android Studio

Schnapslet android sources are located under:


Use Andoid Studio to rebuild or modify Schnapslet sources

Android StudioAndroid Studio startingAndroid Studio Android Studio SourcesAndroid Studio build

You can install pre builded .apk android application installer package app-Schnapslet_release.apk or use the unsigned debug build app-Schnapslet_debug.apk to test or run Schnapslet under android

Schnapslet Android Schnapsen as Android Aplication Menu mit Start, Ende und Hilfe Schnapsen - Kartenspiel Schnapsen Android Aplication   


Generate WSDL on the fly, with CodeDom instead WSDL:EXE

Generate WSDL on the fly, with CodeDom instead WSDL:EXE


var wsdlDescription = ServiceDescription.Read(YourWSDLFile);
var wsdlImporter = new ServiceDescriptionImporter();
wsdlImporter.ProtocolName = "Soap12"; //Might differ
wsdlImporter.AddServiceDescription(wsdlDescription, null, null);
wsdlImporter.Style = ServiceDescriptionImportStyle.Server;
wsdlImporter.CodeGenerationOptions = System.Xml.Serialization.CodeGenerationOptions.GenerateProperties;
var codeNamespace = new CodeNamespace();
var codeUnit = new CodeCompileUnit();
var importWarning = wsdlImporter.Import(codeNamespace, codeUnit);
if (importWarning == 0) {
var stringBuilder = new StringBuilder();
var stringWriter = new StringWriter(stringBuilder);
var codeProvider = CodeDomProvider.CreateProvider("Vb");
codeProvider.GenerateCodeFromCompileUnit(codeUnit, stringWriter, new CodeGeneratorOptions());
File.WriteAllText(WhereYouWantYourClass, stringBuilder.ToString(), Encoding.UTF8);

} else {




Dim SoapClient As MSSOAPLib30.SoapClient30
Dim XMLDoc As MSXML2.DOMDocument40
Dim vCol As Collection
Dim abc As Variant

Set SoapClient = New MSSOAPLib30.SoapClient30

Set XMLDoc = New MSXML2.DOMDocument40
SoapClient.ClientProperty("ServerHTTPRequest") = True

SoapClient.MSSoapInit(" dl",
"CurveWebServiceService", "CurveWebService")

SoapClient.ConnectorProperty("Timeout") = 30000
SoapClient.ConnectorProperty("UseSSL") = 0

abc = SoapClient.getCurve("EMGLN", "YC_EUR_LIBOR", "GDAXML")

XMLDoc.validateOnParse = False
XMLDoc.LoadXml abc