Adsense

Friday, October 31, 2014

Study suggests milk doesn't strengthen your bones - it ages you instead


milk-bones
A research team from Uppsala University in Sweden has found that women who drink more than three glasses of milk per day were more likely to break their bones than women who drank less. 
This finding was part of a study conducted on more than 100,000 people in Sweden, based on how much diary they habitually consumed. The researchers monitored the diets of 61,400 women between 1987 and 1990 and 45,300 men through 1997 by asking them to fill out questionaries on how often they ate common dairy products such as milk, cheese, and yoghurt. The health of the female participants was monitored for 20 years after the questionnaires, and for 11 years afterwards for the males.
Publishing their results in the BMJ, the team says that in women, high milk intake led to a greater risk of bone fracture, and in both men and women, it was associated with a higher mortality rate.
"Women who drank three or more glasses a day had twice the chance of dying at the end of the study than those who drank less than one glass a day,” lead researcher Karl Michaelsson, a professor in medical epidemiology at Uppsala University, told BBC News. "And those who had a high milk intake also had a 50 percent higher risk of hip fracture."
Interestingly, unlike milk, when the diary product was fermented, like in yoghurt, the results were reversed. The participants who consumed more yoghurt showed a decreased risk of experiencing bone fractures. Michaelsson told BBC News that the difference could be down to the sugars that are found in milk - lactose and galactose. Both have been shown to accelerate ageing processes such as inflammation and oxidative stress in previous research using animals.
While the study involved a good amount of participants and was conducted over a relatively long period of time, the researchers are careful to point out that they’re not ready to draw causal conclusions just yet. Something they want to look at in the future is if alcohol consumption and weight could have had an effect on the results.
“As milk features in many dietary guidelines and both hip fractures and cardiovascular disease are relatively common among older people, improving the evidence base for dietary recommendations could have substantial benefits for everyone,” epidemiologist Mary Schooling from the City University of New York in the US, wrote in an accompanying editorial in the BMJ.

Thursday, October 30, 2014

Windows Network Simulation tool : FakeNet

FakeNet – Download

FakeNet is a tool that aids in the dynamic analysis of malicious software.  The tool simulates a network so that malware interacting with a remote host continues to run allowing the analyst to observe the malware’s network activity from within a safe environment.  The goal of the project is to:
  1. Be easy to install and use; the tool runs on Windows and requires no 3rd party libraries
  2. Support the most common protocols used by malware
  3. Perform all activity on the local machine to avoid the need for a second virtual machine
  4. Provide python extensions for adding new or custom protocols
  5. Keep the malware running so that you can observe as much of its functionality as possible
  6. Have a flexible configuration, but no required configuration
The tool is in its infancy of development.  We started working on the tool in January 2012 and we intend to maintain the tool and add new and useful features.  If you find a bug or have a cool feature you think would improve the tool please contact us.
Features
  • Supports DNS, HTTP, and SSL
  • HTTP server always serves a file and tries to serve a meaningful file; if the malware request a .jpg then a properly formatted .jpg is served, etc.  The files being served are user configurable.
  • Ability to redirect all traffic to the localhost, including traffic destined for a hard-coded IP address.
  • Python extensions, including a sample extension that implements SMTP and SMTP over SSL.
  • Built in ability to create a capture file (.pcap) for packets on localhost.
  • Dummy listener that will listen for traffic on any port, auto-detect and decrypt SSL traffic and display the content to the console.

Sunday, October 26, 2014

Extract all G.K questions: LokSewa

It's a little Python script that will extract all the questions.
copte the following codes and paste it notepad and save it as extract.py. run it with python support.
python should be installed before running this script.

# -*- coding: utf-8 -*-
import os
import re
import codecs
from bs4 import BeautifulSoup
import mechanize


def pre_database():
    for i in range(0,800): # Increase in range will increase the question, change 800 to any no. like 900.
        br = mechanize.Browser()
        link=br.open("http://www.gk.nepalwebtech.com/") # This script will only work for this site, but can be modified accordingly
        bt = BeautifulSoup(link)
        fnd= bt.find_all("div",{"class":"block"})

# Creating required folders
        os.makedirs('c:\\test\\database\\tmp')
        os.mkdir('c:\\test\\database\\pre_data')

# Creating data.txt file to save all unmanaged questions including input forms of html
        opn= open('c:\\test\\database\\tmp\\data.txt', 'w')
        opn.write(str(fnd))
        opn.close()

# Removing html tags from saved in data.txt and saving it to done.txt file. pure text is saved on done.txt
        soup=BeautifulSoup(open("c:\\test\\database\\tmp\\data.txt"))
        all_txt= ''.join(soup.findAll(text=True))
        encoded=all_txt.encode("utf-8")
        opn= open('c:\\test\\database\\tmp\\done.txt', 'w')
        opn.write(encoded)
        opn.close()

# Removing line breaks of done.txt file and saving it to mad.txt file
        file = open('c:\\test\\database\\tmp\\done.txt', 'r')
        twit = open('c:\\test\\database\\tmp\\mad.txt','w')
        for line in file.readlines():
            if re.search('\S', line):    twit.write(line)
        twit.close()
        file.close()
       
# Removing the firs and last line from mad.txt and saving it to frd.txt       
        twit = open('c:\\test\\database\\tmp\\mad.txt')
        lines= twit.readlines()
        w = open("c:\\test\\database\\tmp\\frd.txt",'w')
        w.writelines([item for item in lines[1:-1]])
        w.close()

# finalizing and compiling database source
        w = open("c:\\test\\database\\tmp\\frd.txt")
        fin=open("c:\\test\\database\\pre_data\\quest_data_" + str(i) +".txt",'a')
        lines= w.readlines()

        for line in lines:
            if line==', \n':
                print 'processing ... ' +line
            else:
                fin.writelines(line)
        fin.close()
        w.close()
        twit.close()

        # deleting tmp files
        os.remove('C:\\test\\database\\tmp\\data.txt')
        os.remove('C:\\test\\database\\tmp\\done.txt')
        os.remove('C:\\test\\database\\tmp\\frd.txt')
        os.remove('C:\\test\\database\\tmp\\mad.txt')


 # Creating database
def post_database():
    fin=open("c:\\test\\database\\pre_data\\quest_data_0.txt",'r')
    lines= fin.readlines()
    num_lines = [l for l in lines if l != '\n']
    filename= raw_input("enter filename : ")
    man=0
    print len(num_lines)
    wait=raw_input('wait')
    for i in range(0,(len(num_lines)-5)) :
        if(i%5)==0 and (len(num_lines)-5)!=0:
            quest = lines[i]
            print quest
            ans1 = lines[i+1]
            print ans1
            ans2 = lines[i+2]
            print ans2
            ans3 = lines[i+3]
            print ans3
            ans4 = lines[i+4]
            print ans4
            corr = 'A'
            cor=corr.upper()
            data = '{"groupDesc":"","ques":""%s","A":"%s","B":"%s","C":"%s","D":"%s","corr":"%s","exp":""},' % (quest,ans1,ans2,ans3,ans4,cor)
            print ' Writing to file..........' + data
            target = open("C:\\test\\database\\tmp\\"+filename+".txt",'a')
            #wait=raw_input('Press Enter for next question ....')
            target.write(data)

    target.close()
    file = open("C:\\test\\database\\tmp\\"+filename+".txt", 'r')
    twit = open("C:\\test\\database\\done_"+filename+".txt",'w')
    twit.close()
    twit = open("C:\\test\\database\\done_"+filename+".txt",'a')
    for line in file:
        line= line.replace('\n','')
        twit.write(line)

    twit.close()
    file.close()

operation=raw_input('Enter 1 to create Post-Database \n Enter 2 to create pre-Database \n Note: Post Database is a final porcedure    = ')
if (operation==1):
    post_database()
else:
    pre_database()