Posts

Showing posts from 2017

How To Make Kernel Kill OOM Apps

I'm Using Fedora 64bit 3GB of RAM ... so kill this one .. #include <stdio.h>
#include <stdlib.h>
#define MEGABYTE 1024*1024

int main(int argc, char *argv[]) {
  void *myblock = NULL;
int count = 0;

while (1){
    myblock = (void *) malloc(MEGABYTE);
if (!myblock) break;
    printf("Currently allocating %d MB\n", ++count);
  }
  exit(0);
}

Symantec ThreatCon Rating

Image
The ThreatCon is currently at Level 2: Elevated.
On April 11, Microsoft released its scheduled patch update for July 2017. This month's update covers vulnerabilities in Internet Explorer, Microsoft Edge, Microsoft Windows, Microsoft Office and Microsoft Office Services and Web Apps.Visual Studio for Mac, .NET Framework, Silverlight,Adobe Flash Player.

Customers are advised to apply all patches as soon as possible

Microsoft Security Bulletin Summary for April 2017:
https://portal.msrc.microsoft.com/en-us/security-guidance/releasenotedetail/42b8fa28-9d09-e711-80d9-000d3a32fc99 Symantec ThreatCon Rating The Symantec ThreatCon rating is a measurement of the global threat exposure, delivered as part of Symantec DeepSight Threat Management System. ThreatCon Level 2
Medium : Increased alertness
This condition applies when knowledge or the expectation of attack activity is present, without specific events occurring or when malicious code reaches a moderate risk rating. Under this condition, a ca…

Honda Just Invented a Self-Balancing Motorcycle

Image
Honda Just Invented a Self-Balancing Motorcycle That Never Falls Over .... :)

How to Hide Text in a .Text File Windows

Image
This Is a Picture Will Enplane Everything :

C Programming / Linux – Color Text Output (printf)

Image
I'm Using GNOME Terminal 3.20.3 and Fedora 24.
#include <stdio.h>
char fail_color[] = "\033[31;1m";
char pass_color[] = "\033[32;1m";
char color_end[] = "\033[0m";
char Yellow[] = "\033[33;1m";
char Blue[] = "\033[34;1m";
char Purple[] = "\033[35;1m";
char White[] = "\033[37;1m";
char DarkGray[] = "\033[30;1m";
char Y_highligth[] = "\033[33;7m";
int main(int argc, char const *argv[]) {
  printf("%sPass\n%sFail\n%sNormal\n",pass_color, fail_color, color_end);
  printf("%sYellow\n", Yellow);
  printf("%sBlue\n", Blue);
  printf("%sPurple\n", Purple);
  printf("%sWhite\n", White);
  printf("%sDarkGray\n", DarkGray);
  printf("%sYellow highligth\n", Y_highligth);
  return 0;
}
OutPut :

My DNF "yum" Configuration

cat /etc/dnf/DNF.conf
[main]
gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=True
keepcache=True
exclude=libreoffice* opera*
throttle=100k

Serving Web Pages `NetCat`

You can even use netcat to act as a web server: while true; do nc -l -p 8080 < index.html ; donewould serve the page index.html until you close the terminal window.

Booting an ISO image using QEMU

You have an iso image and you want to boot from it without restarting the system, simply use qemu virtual machine as below (-m 512 says qemu will be use 512 Mb of RAM from system):
qemu-system-x86_64 -boot d -cdrom linux.iso -m 512 It is also possible to use your regular cdrom device too. If the device is /dev/cdrom you can boot a cd in the device like that:
qemu-system-x86_64 -boot d -cdrom /dev/cdrom -m 512 Above examples not use any harddisk, so it is suitable for live cd image case. If you want to install a distribution to a harddisk image file, you need to create harddisk image file first: qemu-img create hdd.img 10G In this example we're created an image of 10 GB. Now we can use this file as harddisk in our qemu boot: qemu-system-x86_64 -boot d -cdrom linux.iso -m 512 -hda hdd.img

Enable Super Hidden Administrator Account on Windows 7 & 10

Search for CMD in the start menu and right-click on Command Prompt and select Run as Administrator.
In the Elevated Command Prompt, type and execute the following command.
net user administrator /active:yes

Google Chrome Manual Password Generation

Image

"Fedora" Checking Internet Connection

Image

"Microsoft" Checking Internet Connection

Image
This is The IP : 104.40.210.32

How to install Web Server on Fedora

Source
Installing Apache
su -c 'dnf group install "Web Server"' This command installs the entire Web Server package group. The group includes other commonly used tools such as:
*PHP and Perl support
*The squid caching proxy
*Documentation Traffic analysis tools If for some reason you don’t want these helpful packages,
you can install the web server by itself.  Use this command:
su -c 'dnf install httpd' Configuring the Firewall  su -c 'firewall-cmd --add-service=http --add-service=https --permanent' su -c 'firewall-cmd --reload'OR
su -c 'firewall-cmd --add-service=http --add-service=https'

Coding Faster with Emmet

Emmet is a plugin for many popular text editors which
greatly improves HTML & CSS workflow:

http://emmet.io/

Connect GNS3 to the Internet "No ROOT"

Image
The Idea Here is by making "TUN/TAP device { tap0 }" for your normal user.
root@temp:~# ip tuntap add dev tap0 mode tap user user group userThen add it to one of our existing bridges:
root@temp:~# brctl addif virbr0 tap0Last step make the state to up:
root@temp:~# ip link set tap0 upAnd start GNS3 as Normal user Add Cloud to the Map , go to the tab "NIO TAP" and add our previously created.
Thanks To Source

Note : You Should Have " virbr0 " Bridge

Using Fonts in XTerm

It's Simple :
xterm -fa 'Monospace' -fs 14

Sending raw Ethernet packets from a specific interface in C on Linux

Lately austinmarton’ve been writing some code to send packets to a specific MAC address from a specific interface. He is sure this will come in handy again so here is how it goes:

Continue Reading ..

Source :


/* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version.*/#include<arpa/inet.h>#include<linux/if_packet.h>