*** WEB

#include <string>
#include <fstream>
#include <vector>
#include <algorithm>
#include <regex>
using namespace std;
int main(int argc, char* argv[])
{
	while (true)
	{
		system("python3 GetUrl.py");
        ifstream fr1;
        fr1.open("weburl.txt");
        vector<string> urlList;
        string temp;
        while (getline(fr1, temp)) urlList.push_back(temp);
        fr1.close();
        ifstream fr2;
        fr2.open("fuck.txt");
        vector<string> fuckList;
        while (getline(fr2,temp))fuckList.push_back(temp);
        fr2.close();
		for_each(fuckList.begin(), fuckList.end(), [&](string& fuck)
		{
			for_each(urlList.begin(), urlList.end(), [&](string& url)
			{
				system((regex_replace(fuck, regex("\\$url\\$"), url)).c_str());
			});
		});
	}
}
import paramiko,os,sys
class SSH(object):
    def __init__(self, ip, port, user, pw):
        self.ssh = paramiko.SSHClient()
        self.ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
        self.ssh.connect(ip, port, user, pw)

    def Send(self, path):
        with open(path,'r') as f:
            r=f.read().split('\n')
        for i in r:
            stdin, stdout, stderr = self.ssh.exec_command(i)
            print stdout.read().decode("utf-8")
            print stderr.read().decode("utf-8")

s=SSH(sys.argv[2],sys.argv[3],sys.argv[4],sys.argv[5])
s.Send(sys.argv[1])

 

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注