Skip to content

{ Category Archives } Linux

UDP Flooder in C

Yesterday we where still working on some attacks on our  bench test  and we tried some exploits on IP phones that we found on the internet. Most of them where making DOS or DDOS on the phones, this means that the phones were basically freezing.  Then we made some modification to a C UDP flooder [...]

Tagged , , , , , , , , , , ,

Creating one Pixel in a BMP in C

This code was just a challenge, I wanted to create a simple image file with BMP headers.  The following code simply generate pink pixel . There is actually a pixel on this post somewhere there —> #include int main(void){ FILE *f; int filesize = 54 + 3*1*1; unsigned char bmpfileheader[14] = {‘B’,'M’, 0,0,0,0, 0,0,0,0, 54,0,0,0}; [...]

Tagged , , , , , ,

Who’s connected ?

To know who’s connected on your computer use the following commands : Commands : who : show the connected users : Linux/Mac last : show last connexion (passed ) : Linux / Mac lastb : show last connexion (failed) : Linux These files may also contain clues : /etc/passwd : local users /etc/group : local [...]

Tagged , , , , , , ,

Eject a dvd in command lines

A simple command to eject a DVD/ CD from the command line. To eject the DVD : eject /media/cdrom To close de drive : eject -t /dev/cdrom That’s it.

Tagged , , , ,

monitor your screens with xrandr

What’s xrandr ? Xrand is a command that can be use to configure a screen resolution as well as many other parameters of a screen To use xrand open a  shell and type server # xrandr you should see the actual configuration of your screen(s) to rotate them you can use this command xrandr –output [...]

Tagged , , , , , ,

How to know my public ip address with bash

this is a little bash script to know your public ip address #!/bin/bash wget http://www.monip.org/ 2> /dev/null echo “The public ip is :” perl -ne ‘print “$1\n” if m/((\d{1,3}\.){3}\d{1,3})/’ < index.html rm index.html That’s it.

Tagged , , , , ,

rsync To Upload/Download To/From your NAS over SSH

This trick can help you to save data over your network. first create a ssh certificate on both computers ( server (nas) + your computer ) export it to the the server Run the small script below #!/bin/bash #directory to backup BDIR=~noktec/Desktop/ #Destination IP IP=192.168.80.246 #destination DDIR=/home/noktec #UserName UN=noktec if [ -z $1 ] then [...]

Tagged ,

E-mail SSH Connections

This solution applies if you want to receive an e-mail when one connects to your server via SSH. open a command line and type in : vim ./.bashrc at the end of the file add the following command : # Email Notification on ssh connexion echo ‘NOTIFICATION – SSH acces in USERNAME on `hostname` the:’ [...]

Tagged , ,