Wednesday, May 24, 2017

Linux: Force Close A Socket / Port On Server In a TIME_WAIT State

Finding out current TIME_WAIT settings

Type the following command$ cat /proc/sys/net/ipv4/tcp_fin_timeout
Sample outputs:
60
You can lower the value by typing the following command as root user:# echo 20 > /proc/sys/net/ipv4/tcp_fin_timeout
To set /proc/sys/net/ipv4/tcp_fin_timeout to 20 permanently, edit the file /etc/sysctl.conf and set it as follows:
net.ipv4.tcp_fin_timeout=20

Restating the network service

To restart the network service under RHEL / CentOS based systems, enter:# service network restart
OR
# /etc/init.d/network restart
Ubuntu / Debian Linux, user try the following command:
sudo service networking restart
OR
sudo /etc/init.d/networking restart

cutter command

Cutter is an open source program that allows Linux firewall administrators to abort TCP/IP connections routed over the firewall or router on which it is run.

EXAMPLES

To cut all connections from 192.168.1.10 to server, enter:# cutter 192.168.1.10
To cut all ssh connection from 192.168.1.1 to server, type:
# cutter 192.168.1.1 22
To cut all http connection from 192.168.1.5 to ssh server 202.54.1.20, run:
# cutter 202.54.1.20 192.168.1.5 80
See how to install and use the cutter command for more information here.

What is tt153.exe? The tt153.exe file is 0KB. The download links for this file are clean and no user has given any negative feedback. From the time it was offered for download, it has been downloaded 13 times. tt153.exe is a exe file made by PKWARE, Inc. for their n/a. The most recent version we have details of is: 4.5.20.2, size: 0KB, Path: C:\Windows\system32\

Method 4: Solving the tt153.exe Error Using the 
Windows System File Checker

  1. In order to complete this step, you must run the Command Prompt as administrator. In order to do this, all you have to do is follow the steps below.
    NOTE!We ran the Command Prompt using Windows 10. If you are using Windows 8.1Windows 8Windows 7Windows Vista or Windows XP, you can use the same method to run the Command Prompt as administrator.
    1. Open the Start Menu and before clicking anywhere, type "cmd" on your keyboard. This process will enable you to run a search through the Start Menu. We also typed in "cmd" to bring up the Command Prompt.
    2. Right-click the "Command Prompt" search result that comes up and click the Run as administrator" option.
    Running the Command Prompt as administrator
    Step 1:Running the Command Prompt as administrator
  2. Type the command below into the Command Line page that comes up and run it by pressing Enter on your keyboard.
    sfc /scannow
    Getting rid of Windows Dll errors by running the sfc /scannow command
    Step 2:Getting rid of Windows Dll errors by running the sfc /scannow command
  3. The process can take some time depending on your computer and the condition of the errors in the system. Before the process is finished, don't close the command line! When the process is finished, try restarting the software that you are experiencing the errors in after closing the command line.

Common tt153.exe Errors

If the tt153.exe file is missing or the software using this file has not been installed correctly, you can get errors related to the tt153.exe file. Dll files being missing can sometimes cause basic Windows softwares to also give errors. You can even receive an error when Windows is loading. You can find the error messages that are caused by the tt153.exe file.
If you don't know how to install the tt153.exe file you will download from our site, you can browse the methods above. Above we explained all the processes you can do to solve the dll error you are receiving. If the error is continuing after you have completed all these methods, please use the comment form at the bottom of the page to contact us. Our editor will respond to your comment shortly.
  1. "tt153.exe not found." error
  2. "The file tt153.exe is missing." error
  3. "tt153.exe access violation." error
  4. "Cannot register tt153.exe." error
  5. "Cannot find tt153.exe." error
  6. "This application failed to start because tt153.exe was not found. Re-installing the application may fix this problem." error

Dll Files Similar tott153.exe

Starting today warfare, by having total control of Windows OS (i think dll injections having the objectiv of leaving windows.mcs just working as demo..)

Spring Boot as a Windows Service

The documentation provided by Spring on deploying a Spring Boot application as a Windows Service is a little sparse. Indeed, here it is in full:
Spring Boot application can be started as Windows service using winsw.
A sample maintained separately to the core of Spring Boot describes step-by-step how you can create a Windows service for your Spring Boot application.
As the official reference guide is lacking detail, here is a step by step guide to building and deploying a Spring Boot application as a Windows Service.

Why run as a service?

At the heart of Spring Boot’s ethos is the idea that the application is entirely self-contained. The default packaging builds an executable jar that can be run as
The JAR contains an embedded Tomcat server – no external server required. If you have Java installed, you can run Spring Boot. This is fine if you want to run the app interactively from command line but not so good if you want to run it on a production server. In production, you’ll most likely want it to start up automatically when the server starts and automatically restart when it fails. That is, you want to run it as a service. This gives us two options:
  1. Package the application as a ‘traditional’ web application WAR and deploy into an external Tomcat, running as a service.
  2. Create a service directly from the executable JAR.
If you already have an existing web server machine with Tomcat installed, option 1 may be best. If you’re on a newly provisioned Windows (or Linux) server, option 2 is likely easier.
An interesting third option is to run the executable JAR in a Docker container. If Docker is available to you, this could be the best choice. For now though, lets assume that the required target environment is Windows Server and that Docker is not available.

Service Wrapper

To run an executable JAR as a Windows service, it must be wrapped as a Windows exe so that Windows can run it natively. A couple of good  packages exist for this. One is the Tanuki Java Service Wrapper. I’ve used it before and it’s powerful, reliable and easy to configure. This is available under the GPL v2 licence – great for open source projects and acceptable for internal projects. If your product is proprietary / closed-source, you’ll need to pay for a commercial licence.
An alternative is winsw which has a less restrictive licence. This is the wrapper suggested by Spring and the wrapper I’ve chosen. One drawback with winsw is that it requires the .NET framework (currently v2.0).

Running a JAR as a service

You can grab the winsw exe from the project Jenkins repo. Change the name of the exe to match the service you want installed. I renamed mine to from winsw-1.19.1-bin.exe to windows-service-demo-wrapper.exe. Put this in a directory with your Spring boot application jar. You’ll also want to add any application.properties necessary to configure your app.
The only file you need to create is the winsw config XML file. This should be named to match your renamed executable (windows-service-demo-wrapper.xml to match windows-service-demo-wrapper.exe). This tells winsw what to run as a service. Basic configuration looks like this:
    Windows Service Demo
    Demo Spring Boot Windows service
    java
    -jar windows-service-demo.jar
The options set here are:
  • id: Identifier of the service. You may need this to start / stop the service from command line
  • name: Name of the service as shown in the services.msc snap-in
  • description: Description of the service as shown in the services.msc snap-in
  • executable / arguments: The executable and arguments to start the service. This reflects how we’d start it from command line: java -jar windows-service-demo.jar
With that in place, open a cmd window as administrator in this directory and type:
All being well, this will install windows-service-demo as a service as shown in the services.msc snap-in:
services
The service is stopped by default so right click on it to start it.
Verify it’s running by opening a browser and navigating to localhost:8080. Log files are created in the directory with the renamed winsw exe.
The service can be uninstalled just as easily:
winsw offers options to configure behavior of the service and the wrapper which can control logging, service account and service startup type. See the config file reference for details.

Packaging the application

The application distribution package now consists of four files:
  • Spring Boot executable JAR: the application itself
  • application.properties: application configuration (if necessary)
  • windows-service-demo-wrapper.exe: the Windows service wrapper (renamed from the original winsw.exe)
  • windows-service-demo-wrapper.xml: the winsw service wrapper configuration
We can use Maven bundle these as a distribution using the Maven Assembly Plugin. An example of this is at snicoll-scratches on GitHub.
Here’s a somewhat simplified quick and dirty version. I’ve not bothered pulling winsw as a Maven dependency. I’ve just added the exe to my own source control.
The assembly xml looks like this:
    
        zip
    
    
        
        
            ${project.build.directory}
            /
            
                ${project.build.finalName}.jar
            
        
        
        
            ${project.basedir}/src/assembly/resources
            /
        
    
and is invoked from from the maven-assembly-plugin, bound to the package phase:
maven-assembly-plugin
3.0.0
${project.basedir}/src/assembly/service-assembly.xml
service-assembly
package
single
This working example is in my Github.