Showing posts from June, 2016

Fedora 24, Vibrancy-Kali Linux Icon

You can get Vibrancy-Kali icons to Fedora 24 Gnome 3.20.2. Run Kali Linux in Gnome Box or VM and Copy the Folder Vibrancy-Kali from /usr/share/icons/ to USB Stick.
Copy The folder Vibrancy-Kali from USB to User Folder ~/.local/share/icons/

Now Install Tweak Tool :
dnf install gnome-tweak-toolor Run : 
gsettings set org.gnome.desktop.interface icon-theme 'Vibrancy-Kali'

ToInstall Arc-theme follow this :

What's Cookies?

A cookie is a small piece of data sent by a website to your browser. It helps the website to remember information about your visit, like your country and other settings. That can make your next visit easier and the site more useful to you.
We use cookies on some (but not all) pages to deliver personalized content or to tailor our information offerings or responses according to the way you use the site, and/or your current context on the site. We do not use cookies to gather or transmit any personally identifiable information about you.

Advanced SSH Tutorial

Generate a new stronger key : $~: sudo ssh-keygen -b 4096If it asks you to overwrite existing key, answer “yes”.
create the keys dir:
$~: sudo mkdir ~/.ssh/keysIn our setup we have one folder for each server, but you could just store all the keys in one folder, it makes no difference.
Generate new keys for each server you want to connect to Server1 :
$~: sudo ssh-keygen -b 4096 -C "server1"Change the location of where the key is saved. Enter file in which to save the key (~/.ssh/id_rsa): ~/.ssh/keys/server1check that the keys where generated.
$~: ls ~/.ssh/keysCreate a config file for the ssh hosts and add : $~: sudo nano /home/testuser/.ssh/config
# server1
Host server1
User user1
IdentityFile ~/.ssh/keys/server1Change permissions of the keys dir $~: sudo chmod -R 600 ~/.ssh/keys/Connect to the remote server
Now you’re all set to connect to the remote server, but as we have done the setup with keys, there are just a few more things we have to configure on t…

Docker, My Simple Tutorial

Install Docker Engine on Fedora Linux is simple just type :
$ dnf install docker Download Images from Canonical it's small size, just "50MB" : From Fedora : the Ububtu Image to Docker :
$ cat ubuntu-xenial-core-cloudimg-amd64-root.tar.gz | docker import - ubuntu/16.04 Import the Fedora Image to Docker :
docker load -i Fedora-Docker-Base-24-1.2.x86_64.tar.xzCheck Docker Images:
$ docker imagesRun Impoerted Image with Specifice name :
$ docker run --name=server0 -it ubuntu/16.04 /bin/bashAdd what you want to the container with "apt-get" and type exit.
Check the container :
$ docker ps -aNow we must Save the changes to Image :
$ docker commit -m "Added Apache2,PHP" -a "MiBellil" server0 ubuntu/16.04:v2
$ docker commit server0 ubuntu/16.04:v2Check Docker Images :
$ docker imagesTo run/attach/stop the Container type :
$ d…

Network Monitor (Simple Commands)

I Use netstat command : watch -n1 'netstat -nut | grep "ESTABLISHED"'and sometimes i use ss commad  : watch -t -n1 -x ss -tpat the end check this folder by using cat : cat /proc/net/

Lesson Never Get It (C)

IRC Channel :

<Sebastian> The * is significant. I have told you this before.
<Sebastian> MiB: What is sizeof (char)? What is sizeof "Command"? From the answer to these two questions, can you say that "Command" is a char?
<MiB> Sebastian, wow is it sizeof ?? thing
<Sebastian> MiB: Argument 2 needs to be something like "Command", which is not an int, not a char... It is something else.
<Sebastian> ,cc sizeof (char)
<candide> Sebastian: no output: sizeof(char) = 1
<MiB> Sebastian, okay not "int" not "char"
<Sebastian> MiB: { sizeof "Command" }
<candide> MiB: no output: sizeof "Command" = 8
<Sebastian> The error message tells you something about 'char *'... Let's see if that might work?
<Sebastian> MiB: { char *cmd = "Command"; sizeof cmd }
<candide> MiB: no output: sizeof cmd = 8; cmd = 0x4020c4 "Command"
<Sebastian> MiB: …

Zombie Scanning

It is possible to identify the  open ports on a target system without ever  giving that system any indication that you interacted with it. This extremely stealthy form of scanning is referred to as zombie scanning and can only be performed if another system exists on the network that has low network activity and incremental IPID sequencing.

SSH Password-less Login - Using Key Authentication

You can login to a remote Linux server without entering password, using ssh-keygen and ssh-copy-id as explained in this article.

ssh-keygen creates the public and private keys. ssh-copy-id copies the local-host’s public key to the remote-host’s authorized_keys file. ssh-copy-id also assigns proper permission to the remote-host’s home, ~/.ssh, and ~/.ssh/authorized_keys.
Create public and private keys using ssh-key-gen on local-host.$~: sudo ssh-keygen -b 4096Copy the public key to remote-host using ssh-copy-id.$ ssh-copy-id -i ~/.ssh/ remote-hostDone..

Alternative IP Configurations

To make a secondary ip address (so that we can reach another network for example) we need to make an alias interface.ifconfig eth0:0 netmask broadcast's it.
To get rid of it.ifconfig eth0:0 down

Terminal with Powerline

By default, the shell plugin gives you plenty of helpful data:
Login nameLocal timeCurrent working directory or path. The path is condensed automatically when it grows longer than the terminal width.The number of active background jobsThe hostname, when you connect via SSH to a remote system where powerline is installedThis saves you a lot of twiddling with your shell environment and complex scripting! To install the utility, open a terminal and run this command:
sudo dnf install powerlineThe rest of these instructions assume you’re using Fedora’s standard bash shell. If you’re using a different shell, check out the documentation for tips.
Next, configure your bash shell to use powerline by default. Add the following snippet to your ~/.bashrc file: if [ -f `which powerline-daemon` ]; then           powerline-daemon -q           POWERLINE_BASH_CONTINUATION=1           POWERLINE_BASH_SELECT=1           . /usr/share/powerline/bash/ fi Done.

Note : Source.

Back To DOS "Norton Commander"

Norton CommanderNorton Commander for Linux just install :mc.i686 : User-friendly text console file manager and visual shell
In Fedora just run : dnf install mc

Copy/Backup SD CARD IMAGE and watch progress (very nice alternative to dd)

Here we'll guide you through some copy/backup techniques for your Raspberry Pi system.
Install dc3dd in Fedora 22/23/24 use : dnf install dc3dd
Install dc3dd on Debian 8 (Jessie) :sudo apt-get update
sudo apt-get install dc3ddRun df -h to see what devices are currently mounted.
To Copy the Image to SD CARD run :
dc3dd if=2016-05-27-raspbian-jessie.img of="memoryCard"To Backup the SD CARD To a File run :
dc3dd of="memoryCard" if=2016-05-27-raspbian-jessie.imgdc3dd in Action :

root@kali:~# dc3dd
dc3dd 7.1.614 started at 2016-06-03 21:48:01 +0200
compiled options:
command line: dc3dd
sector size: 512 bytes (assumed)35 bytes (35) copied (??%), 6.31331 s, 0 K/s
input results for file `stdin':
     0 sectors + 35 bytes in
output results for file `stdout':
     0 sectors + 35 bytes out
dc3dd completed at 2016-06-03 21:48:08 +0200

UTF8 encoded PHP strlen()

I want to share something seriously important for newbies or beginners of PHP who plays with strings of UTF8 encoded characters or the languages like: Arabic, Persian, Pashto, Dari, Chinese (simplified), Chinese (traditional), Japanese, Vietnamese, Urdu, Macedonian, Lithuanian, and etc.
As the manual says: "strlen() returns the number of bytes rather than the number of characters in a string.", so if you want to get the number of characters in a string of UTF8 so use mb_strlen() instead of strlen().


// the Arabic (Hello) string below is: 59 bytes and 32 characters
$utf8 = "السلام علیکم ورحمة الله وبرکاته!";

var_export( strlen($utf8) ); // 59
echo "<br>";
var_export( mb_strlen($utf8, 'utf8') ); // 32

Python Mechanize Cheat Sheet

A very useful python module for navigating through web forms is Mechanize.
In a previous post I wrote about "Browsing in Python with Mechanize".
Today I found this excellent cheat sheet on scraperwiki that I would like to share.
Create a browser object and give it some optional settings.
import mechanize
br = mechanize.Browser()
br.set_all_readonly(False) # allow everything to be written to
br.set_handle_robots(False) # ignore robots
br.set_handle_refresh(False) # can sometimes hang without this
br.addheaders = # [('User-agent', 'Firefox')]Open a webpage and inspect its contents
response =
print # the text of the page
response1 = br.response() # get the response again
print # can apply lxml.html.fromstring()Using formsList the forms that are in the page
for form in br.forms():
  print "Form name:",
  print formTo go on the mechanize browser object must have a form selected

Browsing in Python with Mechanize

Browsing with MechanizeThe mechanize module in Python is similar to perl WWW:Mechanize.
It gives you a browser like object to interact with web pages.
Here is an example on how to use it in a program.
import mechanize
br = mechanize.Browser()"")
# Follow second link with element text matching regular expression
response1 = br.follow_link(text_regex=r"cheeses*shop", nr=1)
assert br.viewing_html()
print br.title()
print response1.geturl()
print  # headers
print  # bodyTo get the response code from a website, you can the response.code
from mechanize import Browser
browser = Browser()
response ='')
print response.codeGet all forms from a website
import mechanize
br = mechanize.Browser()"")
for f in br.forms():
    print fI found this post at that very accurate describes how
to emulate a browser in Python using mechani…

Useful PHP Functions and Features You Need to Know

Functions with Arbitrary Number of Argumentslet's see how we can build a function that accepts any number of arguments. This time we are going to utilize func_get_args():
use $args = func_get_args(); inside the function.Using Glob() to Find FilesThink of it like a more capable version of the scandir() function. It can let you search for files by using patterns. // get all php files
$files = glob('*.php');
/* output looks like:
[0] => phptest.php
[1] => pi.php
[2] => post_output.php
[3] => test.php
*/Memory Usage Information can use the memory_get_usage() function, and to get the highest amount of memory used at any point, we can use the memory_get_peak_usage() function.
CPU Usage InformationFor this, we are going to utilize the getrusage() function. Keep in mind that this is not available on Windows platforms.
print_r(getrusage());That may look a bit cryptic unless you already have a system administration background. Here is the explanation of eac…

Browse Offline with Google Chrome and Mozilla Firefox

How to browse offline with FirefoxClick on Firefox's menu, select "Developer", and we will find the Work Offline option.

How to browse offline with Chromewe need to click on the language bar and type:
chrome://flags/#show-saved-copyWe set it as "Enable: Primary", and click on the "Relaunch Now".

My (Secret & Mystery) Message

Version: GnuPG v1