(Flo Rida) You spin my head right round, right round When you go down, when you go down down... (Kesha) You spin my head right round, right round When you go down, when you go down down...
(Flo Rida) Heyy! Hopped out of that house with my swagger Hop in that with girl, I got places to go! People to see, time is precious I look at my crowd and they out of control Just like my mind where I'm going No women, no shorties, no nothin but clothes No stoppin now, my parolees on role I like my jewlrey, that's always on gold I know the storm is comin My pockets keep tellin me it's gonna shower Call up my homies that's home Then pop in the night cuz it's meant to be ours We keep a fade away shot cuz we ballin it's platinum patrone that be ours Lil mama, I owe you just like the flowers Girl you to drink with all that and power clubs
(Flo Rida) You spin my head right round, right round When you go down, when you go down down... (Kesha) You spin my head right round, right round When you go down, when you go down down...
(Flo Rida) From the top of the pole I watch her go down She got me throwin my money around Ain't nothin more beautiful to be found It's goin down down... From the top of the pole I watch her go down She got me throwin my money around Ain't nothin more beautiful to be found It's goin down down...
(Flo Rida) Heyy! Shawty must know I'm not playin My money love her like a numba one fan Don't look at my mouth, let her talk to my fans My Benjamin Franklins... A couple of grands, I got rubberbands My paper planes makin a dance Get dirty all night, that's part of my thing Keep building castles that's made out of sand She's amazing, the fire blazing Hotter than cajun Girl won't you move a lil closer? Time to get paid, it's maximum wage That body belong on a poster I'm in a daze, that bottom is wavin' at me Like damnit I know you You wanna show like a gun out of holster Tell me whatever and I'll be your roper cuz...
(Flo Rida) You spin my head right round, right round When you go down, when you go down down... (Kesha) You spin my head right round, right round When you go down, when you go down down...
(Flo Rida) From the top of the pole I watch her go down She got me throwin my money around Ain't nothin more beautiful to be found It's goin down down... From the top of the pole I watch her go down She got me throwin my money around Ain't nothin more beautiful to be found It's goin down down...
(Flo Rida) Yeah! I'm spendin my money I'm out of control Somebody help me She's takin my bank roll. But I'm king of the club And I'm wearin the crown Poppin these bottles Touchin these models Watchin they asses go down down....(echo)
(Flo Rida) You spin my head right round, right round When you go down, when you go down down... (Kesha) You spin my head right round, right round When you go down, when you go down down... (Flo Rida) You spin my head right round, right round When you go down, when you go down down... (Kesha) You spin my head right round, right round When you go down, when you go down down...
1. “module_init” and “__initcall” will be added into a new section called “.initcall6.init”
2. The macro “__initcall” and “module_init” (include/linux/init.h) will group all such functions into a single section called “.initcall6.init” and all these functions get executed on system bootup by the function “do_initcalls” (init/main.c)
3. init() -> do_basic_setup() -> do_initcalls()
4. The functions will be collected between the symbols “__early_initcall_end” and “__initcall_end” in the file (arch/x86/kernel/vmlinux.lds.S -> arch/x86/kernel/vmlinux.lds)
5. All the __initcalls are arranged in kernel the range from 0 to 7. Hence kernel does the initialization in order
for DIR in $DOCDIRS; do echo "creating Documentation/$DIR/Makefile" mkdir -p Documentation/$DIR touch Documentation/$DIR/Makefile done -----------------------------------------------------
1. allocate 12GB of HDD space 2. Install FC11 on VMware 3. Review and modify partitioning layout 4. Delete VolGroup, sda1 and sda2 partitions 5. Create 512MB swap space 6. Create EXT3 file system and mount pount "/" 7. Select "customize now" for software selection 8. Un-select everything in software selection 9. A total of 179 packages will get installed.
mkdir /mnt/cdrom vi /etc/fstab >> /dev/cdrom /mnt/cdrom iso9660 defaults 0 0 mount /dev/cdrom cd /mnt/cdrom/Pakages rpm -ivh createrepo + DEPENDENCY FILES rpm -ivh yum + DEPENDENCY FILES cd /mnt createrepo .
cd /etc/yum.repos.d/ vi fedora.repo >> enabled=0 vi fedora-updates.repo >> baseurl=file:///mnt >> #baseurl >> #mirrorurl >> enabled=1 >> gpgcheck=0
yum install ftp make which vim ctags gcc ncur* man-pages yum install dhclient bzip2 kerenal-devel man ntsysv gpm yum install openssl* ...
vi /etc/syscofig/network-scripts/ifcfg-eth0 >> DEVICE=eth0 >> BOOTPROTO=dhcp >> ONBOOT=yes
mv /bin/vi{,.old} ln -s /usr/bin/vim /bin/vi
vi /sbin/mkinitrd >> after "mknod /dev/hvc0 c 229 0" >> mknod /dev/sda b 8 0 >> mknod /dev/sda1 b 8 1 >> mknod /dev/sda2 b 8 2 vi /etc/fstab >> /dev/sda1 / ext3 defaults 0 0 >> /dev/sda2 swap swap defaults 0 0
Download the config file for 2.6.31 from here. Download the config file for 2.6.31 (with S/W shutdown) from here
cd /usr/src/kernels tar xjvf linux-2.6.31.tar.bz2 mv config.31 .config make oldconfig make make modules_install make install
list *reverse(list *current) { list *prev = NULL; list *next = NULL;
while(current) { next = current->next; //tricky: save the next node current->next = prev; //point current to previous current->prev = next; //point current to next prev = current; current = next; }
typedef struct list{ int val; struct list *next; struct list *prev; }list;
list *getfirst(list *head) { while(head && head->prev) head = head->prev; return head; }
list *getlast(list *head) { while(head && head->next) head = head->next; return head; }
void print(list *head1) { list *head = NULL; list *end = NULL;
head = head1; printf("to next: "); while(head) { printf("%d->", head->val); head = head->next; } printf("NULL\n");
head = getlast(head1); printf("to prev: "); while(head) { printf("%d->", head->val); head = head->prev; } printf("NULL\n"); }
list *insert(list *head, int val) { list *new = (list*)malloc(sizeof(list)); new->val = val; new->prev = NULL; new->next = head;
if(head) head->prev = new;
return new; }
list *reverse(list *current) { list *prev = NULL; list *next = NULL;
while(current) { next = current->next; //tricky: save the next node current->next = prev; //point current to previous current->prev = next; //point current to next prev = current; current = next; }
return prev; }
int main() { list *head = NULL;
head = insert(head, 10); head = insert(head, 20); head = insert(head, 60); head = insert(head, 51); head = insert(head, 73); head = insert(head, 19); head = insert(head, 10); head = insert(head, 81); head = insert(head, 95); printf("before reverse:\n"); print(head);
printf("after reverse:\n"); head = reverse(head); print(head);
before reverse: to next: 95->81->10->19->73->51->60->20->10->NULL to prev: 10->20->60->51->73->19->10->81->95->NULL after reverse: to next: 10->20->60->51->73->19->10->81->95->NULL to prev: 95->81->10->19->73->51->60->20->10->NULL
list *reverse(list *current) { list *prev = NULL; list *next = NULL;
while(current) { next = current->next; //tricky: save the next node current->next = prev; //point current to previous prev = current; current = next; }
list *reverse(list *current) { list *prev = NULL; list *next = NULL;
while(current) { next = current->next; //tricky: save the next node current->next = prev; //point current to previous prev = current; current = next; }
return prev; }
int main() { list *head = NULL;
head = insert(head, 10); head = insert(head, 12); head = insert(head, 20); head = insert(head, 17); head = insert(head, 25); head = insert(head, 3); head = insert(head, 75); head = insert(head, 49); head = insert(head, 32); printf("before reverse: "); print(head);
head = reverse(head); printf("after reverse: "); print(head);
printf("number of nodes in the tree is %d\n", count(head1)); printf("Max depth of the tree is %d\n", depth(head1)); printf("comparison for both the tree is \"%s\"\n", compare(head1, head2)?"true":"false");
yum install createrepo mkdir -p /mnt/iso mount /dev/cdrom /mnt/iso cd /mnt createrepo . cd /etc/yum.repos.d/ edit all repo files and make enabled=0 -------------------iso.repo------------------- [localrepo] name=My Repo baseurl=file:///mnt/iso/ enabled=1 gpgcheck=0 ----------------------------------------------
Traceback (most recent call last): File "/usr/bin/yum", line 29, in yummain.main(sys.argv[1:]) File "/usr/share/yum-cli/yummain.py", line 172, in main base.doTransaction() File "/usr/share/yum-cli/cli.py", line 302, in doTransaction problems = self.downloadPkgs(downloadpkgs) File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 798, in downloadPkgs remote_pkgs.sort(mediasort) File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 747, in mediasort a = a.getDiscNum() File "/usr/lib/python2.5/site-packages/yum/packages.py", line 485, in getDiscNum return int(fragid) ValueError: invalid literal for int() with base 10: '' ----------------------------------------------- vi /usr/lib/python2.5/site-packages/yum/packages.py +485 return int(fragid) ==> return int() -----------------------------------------------
1. One technology involves enabling users to gain instant access to a laptop's e-mail, browser and other basic functionality -- without booting Windows at all. 2. The second technology enables an Internet-based message to wake a Windows PC from sleep mode.
Dell Latitude On Dell announced this week a new feature called Latitude On that enables the use of e-mail, Web surfing, basic personal information manager functionality and document reading -- all without booting Windows. The Latitude On feature uses a low-power Intel ARM processor, flash storage and Linux (SUSE Linux Enterprise Desktop 10) separate from the laptop's main CPU, hard drive and Windows operating system. If you use only Latitude On, battery life lasts not hours but days, according to Dell.
Intel Remote Wake Intel introduced new technology yesterday called Remote Wake, a chip set and software development kit that enables a PC to be "awakened" over the Internet when in sleep mode. This will enable you to dump your land-line phone and use a PC-based VoIP phone without leaving your PC on all the time.
------------------test.php------------------ <?php echo "Welcome to our site " . stripslashes($name); ?> --------------------------------------------
-> http://localhost/test.php?name=John -> http://localhost/test.php?name=<script language=javascript>alert('Hey, you are going to be hijacked!');</script>" -> http://localhost/test.php?name=<script language=javascript>setInterval("window.open('http://www.google.com','innerName')",1000);</script> --------------------------------------------
if ( !validateQueryString ( $name ) ) { echo "The cross site scripting is not allowed."; } else { echo "Welcome to our site " . stripslashes($name); } ?> --------------------------------------------
NAC stands for Network Access Control. 802.1X is the IEEE standard for port-based network access control.
NAC provides Endpoint security. The end point device can be a Laptop connected to a corporate network or a VPN client. Depending on the security policy NAC will do user authentication, periodic health checks and policy enforcement.
-> User authentication can be by portal login, 802.1x etc. -> Health check is done by a custom made Java applet, which runs on client, collect useful device information. Microsoft’s built-in NAP client also does the same job. -> Policy enforcement, the most important part in a NAC, is done by SSCP, SSCPLite (Nortel proprietary), 802.1x etc.
=> NAC creates database with the information forwarded by NAC client. The policy decision is made based on corporate policy and database information. NAC server is also known as Policy Decision Point.
=> Policy enforcement point can be Switch, router, VPN gateway or firewall. Most commonly used access control techniques are VLAN segregation and packet filtering ACLs.
Future of NAC: Some NAC policy servers are: 1. Cisco's Access Control Server (ACS) 2. Juniper's Unified Access Controller (UAC) 3. Microsoft's Network Policy Server (NPS) 4. Nortel's Secure Network Access (NSNA) 5. Trusted Computing Group's Trusted Network Connect (TNC)
IF-MAP is a standard client/server, XML-based SOAP, protocol for accessing a Metadata Access Point. The IF-MAP server has a database for storing information about network security events and objects (users, devices, etc.). The IF-MAP protocol defines a powerful publish/subscribe/search mechanism and an extensible set of identifiers, and data types.
=> Integrity measurements are carried between the TNC Client and TNC Server on a protocol called IF-TNCCS (Trusted Network Connect Client-Server). => For communication with NAP Client and NAP Server Microsoft used protocol called System of Health (SoH). Later donated to TCG as IF-TNCCS-SOH.
=> Consolidated IF-TNCCS enables Client-Server interoperability between NAP and TNC. => industry has agreed on TNC standard for NAC, except Cisco.
PPP is a data link protocol commonly used to establish a direct connection between two networking nodes. PPP can provide connection authentication, transmission encryption privacy, and compression.
PPP -> alone provides username/password authentication (CHAP, PAP) PPP + EAP -> Any type of authentication (EAP-MD5, PEAP) PPP + EAP + RAS -> works fine PPP + EAP + RAS + AAA -> RADIUS protocol takes care of the authentication EAPOL + RAS + AAA -> 802.1x
L2TP and Microsoft’s secure RAS made PPP popular. EAP is a universal authentication framework. EAPOL is a standard for passing EAP over LAN.
802.1x is an IEEE standard for Port-Based Network Access Control. 802.1x works at Layer 2 to authentication and authorize devices on LAN switches and wireless APs. It won’t work with multiple PC's connecting to a switch via a hub.
-> The user/client that wants to be authenticated is called a supplicant. -> The actual server doing the authentication, typically a RADIUS server, is called the authentication server. -> And the device in between, such as a wireless access point, is called the authenticator.
Benefits of IEEE 802.1X 1. Leverages existing standards EAP and RADIUS 2. Authentication based on Network Access Identifier and credentials 3. Centralized authentication, authorization, and accounting 4. Scalable through EAP types 5. Supports password authentication and One-Time Passwords (OTP)
// Populate body // Main element and namespace SOAPElement be = bd.addChildElement(env.createName("doGoogleSearch", "namesp1", "urn:GoogleSearch")); be.addChildElement("key").addTextNode("OS7mOjxQFHIztxIYU9yb8y3ibYgY4w2o").setAttribute("xsi:type","xsd:string"); be.addChildElement("q").addTextNode("ls").setAttribute("xsi:type","xsd:string"); be.addChildElement("start").addTextNode("0").setAttribute("xsi:type","xsd:int"); be.addChildElement("maxResults").addTextNode("5").setAttribute("xsi:type","xsd:int"); be.addChildElement("filter").addTextNode("0").setAttribute("xsi:type","xsd:boolean"); be.addChildElement("restrict").setAttribute("xsi:type","xsd:string"); be.addChildElement("safeSearch").addTextNode("0").setAttribute("xsi:type","xsd:boolean"); be.addChildElement("lr").setAttribute("xsi:type","xsd:string"); be.addChildElement("ie").addTextNode("latin1").setAttribute("xsi:type","xsd:string"); be.addChildElement("oe").addTextNode("latin1").setAttribute("xsi:type","xsd:string");
server.crt: The self-signed server certificate. server.key: The private server key. ca.crt: The Certificate Authority's own certificate. --------------------------------------------------------
1. Download the latest Java SE Development Kit (JDK) from here (JDK 6 Update 14). 2. Download the latest Eclipse IDE for Java EE Developers from here.
How to create a sample Java Project in Eclipse: 1. File -> New -> Java Project 2. Give project name, Use default JRE 3. Navigate -> Show In -> Package Explorer 4. Right click on project src, New -> Class 5. Give Name, Modifier, Create stubs and Comments 6. Run and Debug the code at Run menu
----------------------test.java---------------------- public class test {
public static void main(String[] args) { System.out.println("Hello world!!!\n"); }
------------------------------------------------------- 1. Save TestApplet2.java, test2.html and mymanifest inside the website's home page 2. Make sure JRE is installed in the machine. 3. javac TestApplet3.java 4. jar cvfm TestApplet3.jar mymanifest TestApplet3.class 5. del TestApplet3.class 6. http://localhost/test3.html 7. appletviewer -classic test2.html 8. java -jar TestApplet3.jar -------------------------------------------------------
------------------------------------------------------- 1. Save TestApplet2.java and test2.html inside the website's home page 2. Make sure JRE is installed in the machine. 3. javac TestApplet2.java 4. http://localhost/test2.html 5. appletviewer -classic test2.html -------------------------------------------------------
public class HelloWorldApplet extends Applet{ public static void main(String[] args){ Frame frame = new Frame("Roseindia.net"); frame.setSize(400,200); Applet app = new HelloWorldApplet(); frame.add(app); frame.setVisible(true); frame.addWindowListener(new WindowAdapter(){ public void windowClosing(WindowEvent e){ System.exit(0); } }); } public void paint(Graphics g){ g.drawString("Hello World!",200,100); } } ------------------------------------------------------- -----------------------test.html----------------------- <html> <head> <title>A Simple Applet program</title> </head> <body> <APPLET CODE="HelloWorldApplet.class" WIDTH=700 HEIGHT=500> </APPLET> </body> </html> -------------------------------------------------------
------------------------------------------------------- 1. Save HelloWorldApplet.java and test.html inside the website's home page 2. Make sure JRE is installed in the machine. 3. javac HelloWorldApplet.java 4. http://localhost/test.html 5. appletviewer -classic test.html -------------------------------------------------------
VMware Server - The free VMware Server is a hosted virtualization platform that installs like an application on any existing server hardware and partitions a physical server into multiple virtual machines. VMware ESXi - The free VMware ESXi doesn't require and Host operating system, the avoidance of host os provides nmatched levels of performance and reliability.
Download Vmware Server 2.0.1 from here. Download Vmware Server 1.0.9 from here.
--------How to install VMware Server (2.0.1) on windows host machine-------- 1. Download VMware Server 2.0.1 from here. 2. Download Fedora Core 7 here. 3. Start the VMware, login with local username and password without domain. 4. Virtual Machine >> Create Virtual Machine -> Name: FC7 -> Operating System: Linux Operating System -> Memory Size: Recommended Size -> Create a New Virtual Disk (10GB+) -> Add a Network Adapter >> Network Connection: Bridged -> DVD Drive: use ISO Image -> Don't add a Floppy Drive -> Don't add a USB controller 5. Power ON and install Fedora Core 11 6. Summary >> Status >> VMware Tools >> Install VMware Tools 7. su; cp /media/VMware Tools/VMwareTools-7.7.5-156745.tar.gz /root 8. tar xzvf VMwareTools-7.7.5-156745.tar.gz; cd vmware-tools-distrib 9. ./vmware-install.pl ERROR!!!!! 10. Get vmware-tools patch for linux 2.6.29 from here. 12. Combine the patch files and apply -> cd vmware-tools-distrib/lib/modules -> cp -r source source-backup; cd source -> tar xzvf vmwaretools-7.7.5_156745_for_2.6.29.tgz -> ls *.tar | xargs -n1 tar xvf -> sed -i 's/--- /--- original\//g' *.patch -> sed -i 's/+++ /+++ work\//g' *.patch -> ls *.patch | xargs cat > all -> mv all all.patch -> patch -p1 < all.patch 13. ./vmware-install.pl STILL ERROR!!!!!! ----------------------------------------------------------------------------
/* A structure to declare how data is decoded */ struct pcidump_info { int offset; /* the data item to retrieve */ unsigned long bitmask; int bool; /* true or false */ char *string; };
switch (len=read(fd,buffer,PAGE_SIZE)) { case 0: fprintf(stderr,"%s: %s: no data\n", argv[0], fname); exit(1); case -1: fprintf(stderr,"%s: %s: %s\n", argv[0], fname, strerror(errno)); exit(1); default: break; } if (len < 64) { buffer[len]='\0'; fprintf(stderr," %s: %s: %s\n", argv[0], fname, buffer); exit(1); } if (len % 64) { fprintf(stderr," %s: %s: incorrect data size: %i\n", argv[0], fname, len); exit(1); }
for (end = buffer+len, curr = buffer; curr < end; curr += 256) { struct pcidump_info *ptr; unsigned int datum;
for (ptr = dumpinfo; ptr->string; ptr++) { /* * Perform a little-endian read of the item */ datum = curr[ptr->offset] | (curr[ptr->offset+1]<<8) | (curr[ptr->offset+2]<<16) | (curr[ptr->offset+3]<<24); datum &= ptr->bitmask; printf(ptr->string, ptr->bool ? (datum ? 'y' : 'n') : datum); } printf("\n"); } return 0; }
lspci
gcc -o pcidump pcidump.c ./pcidump /proc/bus/pci/00/12.0 Compulsory registers: Vendor id: 0x1022 Device id: 0x2000 Command Register: 0x0003 Status Register: 0x0280 Revision id (decimal): 16 Programmer Interface: 0x00 Class of device: 0x0200 Header type: 0x00 Multi function device: n Optional registers: Cache line size (decimal): 0 Latency timer (decimal): 64 Is Built-In-Self-Test available: Base Address 0 (B0): 0x00001401 Base Address 1 (B1): 0x00000000 Base Address 2 (B2): 0x00000000 Base Address 3 (B3): 0x00000000 Base Address 4 (B4): 0x00000000 Base Address 5 (B5): 0x00000000 Subsystem id: 0x2000 Subsystem vendor: 0x1022 Expantion Rom base address: 0x00000000 Interrupt line (decimal): 9 Interrupt pin (decimal): 1 Min bus grant time (decimal): 6 Max bus latency acceptable (decimal): 255