zeldor.biz

Linux, programming and more

Copyright © 2025
Log in

What run level am I in?

June 13, 2010 by Igor Drobot Leave a Comment

Q: How can I find out what run level a system is in at the moment?

1. The runlevel command tells you what run level is running
2. The who -r command also tells you the run level

1
2
firewall ~ # /sbin/runlevel
N 2

firewall ~ # /sbin/runlevel N 2

or

1
2
firewall ~ # who -r
         run-level 2  2010-05-28 23:13

firewall ~ # who -r run-level 2 2010-05-28 23:13

Filed Under: Linux Tagged With: Linux, runlevel

Tcpdump to file

June 8, 2010 by Igor Drobot Leave a Comment

Very easy dumping of traffic with the w flag. You can use it for screen and later for wireshark analyses.

1
tcpdump -w http_traffic -n -i any port 80

tcpdump -w http_traffic -n -i any port 80

Filed Under: Linux Tagged With: Linux, tcpdump, traffic, wireshark

MySQL output pipe to file

June 7, 2010 by Igor Drobot Leave a Comment

1
SELECT password FROM vb_user INTO OUTFILE '/tmp/pwds.csv' FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n';

SELECT password FROM vb_user INTO OUTFILE '/tmp/pwds.csv' FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n';

Filed Under: Linux Tagged With: MySQL, to file

Xen 3.2 physical bridging

June 6, 2010 by Igor Drobot Leave a Comment

This article was written for Xen 3.2, it was successful tested on debian lenny 5.0.3

I describe how to use multiple physical network cards associated to different bridges and Virtual VE (guests). By default Xen uses ony one bridge and physical NIC -> eth0

First step is to create a script that will create the bridges for your physical NICs.

/etc/xen/scripts/your-script

– eth0 is used for the Xen Dom0
– eth1 is used for VE1
– eth2 is used for VE2

1
2
3
4
5
#!/bin/sh
NETBR="/etc/xen/scripts/network-bridge"
$NETBR start bridge="eth1_br" vifnum=1 netdev="eth1"
$NETBR start bridge="eth2_br" vifnum=2 netdev="eth2"
exit 0

#!/bin/sh NETBR="/etc/xen/scripts/network-bridge" $NETBR start bridge="eth1_br" vifnum=1 netdev="eth1" $NETBR start bridge="eth2_br" vifnum=2 netdev="eth2" exit 0

Don’t forget to make it executable! chmod +x your-script

This script will be called from
/etc/xen/xend-config.sxp

put this line to it:

1
(network-script your-script)

(network-script your-script)

and remove or comment this out:

1
2
(vif-script vif-bridge)
(network-script network-dummy)

(vif-script vif-bridge) (network-script network-dummy)

then you can configure the bridge for your VE (virtual-guest)
open your config /etc/xen/node1.cfg

and remove the standard bridge: vif = [ ‘ip=192.168.1.101,mac=00:16:3E:71:0B:18’ ]
add your new bridge: vif=[‘bridge=eth1_br’]

No routing configuration is needed! fellow

With following commands you can check your bridging configuration:
brctl show

Check the routing information
netstat -arn

Q: WHY is it interesting to use this kind of configuration?
A: The traffic cannot be sniffed by Dom0, DomN or Dom2

Some reasons:
1. If you get some problems with your primary NIC eth0 your xen dom0 will not be available but your guests are still alive and can communicate

2.If somebody hack your Xen Dom0 nobody can sniff ALL traffic of the VE’s, Guests

It is possible that this configuration will not work with older xen versions, your-script must be edited wassat

Have you any questions, please do not hesitate to contact me fellow

Filed Under: Debian, Linux, Networking, Virtualization Tagged With: Debian, Xen

The real Windows 98 Source Code

June 6, 2010 by Igor Drobot Leave a Comment


Windows 98 Source Code
Subject: Windows 98 Source Code
(not too new, but slightly improved)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/*
TOP SECRET Microsoft(c) Code
Project: Chicago(tm)
Projected release-date: Summer 1998
*/
 
#include "win31.h"
#include "win95.h"
#include "evenmore.h"
#include "oldstuff.h"
#include "billrulz.h"
#define INSTALL = HARD
 
char make_prog_look_big[1600000];
 
void main()
{
while(!CRASHED)
{
display_copyright_message();
display_bill_rules_message();
do_nothing_loop();
if (first_time_installation)
{
make_50_megabyte_swapfile();
do_nothing_loop();
totally_screw_up_HPFS_file_system();
search_and_destroy_the_rest_of_OS/2();
hang_system();
}
write_something(anything);
display_copyright_message();
do_nothing_loop();
do_some_stuff();
if (still_not_crashed)
{
display_copyright_message();
do_nothing_loop();
basically_run_windows_3.1();
do_nothing_loop();
do_nothing_loop();
}
}
 
if (detect_cache())
disable_cache();
 
if (fast_cpu())
{
set_wait_states(lots);
set_mouse(speed, very_slow);
set_mouse(action, jumpy);
set_mouse(reaction, sometimes);
}
 
/* printf("Welcome to Windows 3.11"); */
/* printf("Welcome to Windows 95"); */
printf("Welcome to Windows 98");
if (system_ok())
{
bsod(random_err());
crash(to_dos_prompt);
}
else
system_memory = open("a:\swp0001.swp", O_CREATE);
 
while(something)
{
sleep(5);
get_user_input();
sleep(5);
act_on_user_input();
sleep(5);
}
create_general_protection_fault();
}

/* TOP SECRET Microsoft(c) Code Project: Chicago(tm) Projected release-date: Summer 1998 */ #include "win31.h" #include "win95.h" #include "evenmore.h" #include "oldstuff.h" #include "billrulz.h" #define INSTALL = HARD char make_prog_look_big[1600000]; void main() { while(!CRASHED) { display_copyright_message(); display_bill_rules_message(); do_nothing_loop(); if (first_time_installation) { make_50_megabyte_swapfile(); do_nothing_loop(); totally_screw_up_HPFS_file_system(); search_and_destroy_the_rest_of_OS/2(); hang_system(); } write_something(anything); display_copyright_message(); do_nothing_loop(); do_some_stuff(); if (still_not_crashed) { display_copyright_message(); do_nothing_loop(); basically_run_windows_3.1(); do_nothing_loop(); do_nothing_loop(); } } if (detect_cache()) disable_cache(); if (fast_cpu()) { set_wait_states(lots); set_mouse(speed, very_slow); set_mouse(action, jumpy); set_mouse(reaction, sometimes); } /* printf("Welcome to Windows 3.11"); */ /* printf("Welcome to Windows 95"); */ printf("Welcome to Windows 98"); if (system_ok()) { bsod(random_err()); crash(to_dos_prompt); } else system_memory = open("a:\swp0001.swp", O_CREATE); while(something) { sleep(5); get_user_input(); sleep(5); act_on_user_input(); sleep(5); } create_general_protection_fault(); }

Filed Under: Fun, Windows Tagged With: Fun, Windows

  • « Previous Page
  • 1
  • …
  • 70
  • 71
  • 72
  • 73
  • 74
  • Next Page »
Yeaaah Cookie! We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok