403Webshell
Server IP : 192.64.112.168  /  Your IP : 18.188.245.104
Web Server : Apache
System : Linux nc-ph-2300-85.bluforrest.com 4.18.0-513.9.1.el8_9.x86_64 #1 SMP Sat Dec 2 05:23:44 EST 2023 x86_64
User : expressoneac ( 1128)
PHP Version : 8.0.30
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3.6/site-packages/procfs/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3.6/site-packages/procfs/utilist.py
#! /usr/bin/python3
# -*- python -*-
# -*- coding: utf-8 -*-
# SPDX-License-Identifier: GPL-2.0-only
#
# Copyright (C) 2007 Red Hat, Inc.
#

from six.moves import range


def hexbitmask(l, nr_entries):
    hexbitmask = []
    bit = 0
    mask = 0
    for entry in range(nr_entries):
        if entry in l:
            mask |= (1 << bit)
        bit += 1
        if bit == 32:
            bit = 0
            hexbitmask.insert(0, mask)
            mask = 0

    if bit < 32 and mask != 0:
        hexbitmask.insert(0, mask)

    return hexbitmask

def bitmasklist(line, nr_entries):
    hexmask = line.strip().replace(",", "")
    bitmasklist = []
    entry = 0
    bitmask = bin(int(hexmask, 16))[2::]
    for i in reversed(bitmask):
        if int(i) & 1:
            bitmasklist.append(entry)
        entry += 1
        if entry == nr_entries:
            break
    return bitmasklist

Youez - 2016 - github.com/yon3zu
LinuXploit