Showing posts from November, 2015

Trace Application in Linux

Using Strace,
Installaions "Fedora":
 dnf install strace Running :
strace -Tttvfs 1024 -o <output_file> <command>

Fortran, C and C++ for Windows

Download from : and install it or extract it to C:\MinWG and if you use winsock.h or winsock2.h, compile it like below.

Compile the Code with : gcc code.c -lws2_32

this help from IRC channel.
<Love4Boobies> Move the -lws2_32 at the very end.

Python MySql

Simple use of MySql Python

mysql> CREATE TABLE pc_data (
    -> pc_title VARCHAR(100) NOT NULL,
    -> pc_command VARCHAR(100) NOT NULL,
    -> pc_ip VARCHAR(100) NOT NULL,
    -> pc_result VARCHAR(200) NOT NULL,
    -> PRIMARY KEY ( pc_id )
    -> ); cursor.execute("INSERT INTO pc_data ( pc_title, pc_command, pc_ip, pc_result)
                    VALUES ( "PC", "ipconfig", ipaddress, useragent );") 1:

>>import _mysql >>db=_mysql.connect()
>>db.query("select * from comPc where com_id = 1")
>>r = db.use_result()
>>import MySQLdb

Flask Reqest environ

 request.environ['  set from below   ']
{'wsgi.multiprocess': False,
'SERVER_SOFTWARE': 'Werkzeug/0.8.3',
'PATH_INFO': '/',
'werkzeug.server.shutdown': <function shutdown_server at 0x7f303c4c6b18>,
'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Fedora; Linux i686; rv:41.0) Gecko/20100101 Firefox/41.0',
'HTTP_CONNECTION': 'Keep-Alive',
'REMOTE_PORT': 17727,
'wsgi.url_scheme': 'http',
'SERVER_PORT': '8080',

Java for Linux

Java Downloads for Linux
## java ## alternatives --install /usr/bin/java java /usr/java/latest/jre/bin/java 200000
## javaws ## alternatives --install /usr/bin/javaws javaws /usr/java/latest/jre/bin/javaws 200000
## Java Browser (Mozilla) Plugin 32-bit ## alternatives --install /usr/lib/mozilla/plugins/ /usr/java/latest/jre/lib/i386/ 200000
## Java Browser (Mozilla) Plugin 64-bit ## alternatives --install /usr/lib64/mozilla/plugins/ /usr/java/latest/jre/lib/amd64/ 200000
## Install javac only if you installed JDK (Java Development Kit) package ## alternatives --install /usr/bin/javac javac /usr/java/latest/bin/javac 200000 alternatives --install /usr/bin/jar jar /usr/java/latest/bin/jar 200000

Linux and Unix screen command

Installing in Fedora yum install screen Start screen for the first time : mib@itsecur1ty ~ $ screen Show screen parameter : Type “Ctrl-A” and “?” without quotes. Then you will see all commands or parameters on screen.
To get out of the help screen, you can press “space-bar” button or “Enter“. Re-attach the screen : mib@itsecur1ty ~ $ screen -r Use screen -ls to see how many screen are available : mib@itsecur1ty ~ $ screen -ls if you want to restore screen : mib@itsecur1ty ~ $ screen -r "number"Note : Alternatives to GNU Screen for Linux Terminal :Tmux and dvtm dtach.