ezoic

Wednesday, July 11, 2018

Tuesday, July 10, 2018

Randomly generate user agents and ip in python

1. randomly generate user agent

installation:
pip install fake_useragent

usage:

from fake_useragent import UserAgent

ua=UserAgent()

ua.random

got a random user agent


2. randomly generate ip

'.'.join('%s'%random.randint(0, 255) for i in range(4))



Thursday, July 5, 2018

How to send emails on linux.

I use ubuntu system. How to find out which system you use, command is "uname -a".

I tried to send out email on ubuntu.

I tried on command line first.

I first installed postfix:

sudo apt-get install postfix

Then I tried the command:

echo "test message" | mailx -s "test subject" XXXX@xxx.com

And I got the following:


The program 'mailx' is currently not installed. You can install it by typing:
sudo apt-get install mailutils


So I installed mailx.

I got the message. 

And I put it in a linux shell script. Got it done. 

R is not a simple programming language, and it does better on reading excel files than python

R is not a simple programming language, and it does better on reading excel files than python . tried to read excel files to python and R. i...