1. Welcome to the Brawl website! Feel free to look around our forums. Join our growing community by typing /register in-game!

Warning - 1337 Coders only

Discussion in 'Off Topic' started by Scoat2, Oct 8, 2014.

Thread Status:
Please be aware that this thread is more than 30 days old. Do not post unless the topic can still be discussed. Read more...
  1. Scoat2

    Scoat2 Well-Known Member

    Joined:
    Sep 26, 2013
    Messages:
    1,474
    Ratings:
    +390
    ---Warning---
    If you are not a serious coder, I highly discourage you from entering this site.
    Beginners, you have been warned.
    http://hackertyper.net/
    To the real mlg coders, I'm sure you'll understand everything on that site(type whatever you want once you get there);
    {
    Good luck, and keep structing those nblocks returning those while loops;
    }​
     
  2. SoMuchWinning

    SoMuchWinning Well-Known Member

    Joined:
    Nov 17, 2013
    Messages:
    6,462
    Ratings:
    +1,568
    Wat if I'm on my iphone
     
  3. Scoat2

    Scoat2 Well-Known Member

    Joined:
    Sep 26, 2013
    Messages:
    1,474
    Ratings:
    +390
    Does it work on a phone?
     
  4. SoMuchWinning

    SoMuchWinning Well-Known Member

    Joined:
    Nov 17, 2013
    Messages:
    6,462
    Ratings:
    +1,568
    It doesn't do shet :V
    Only a dark page with a red typing thingy animation.
     
  5. Scoat2

    Scoat2 Well-Known Member

    Joined:
    Sep 26, 2013
    Messages:
    1,474
    Ratings:
    +390
    Oh... just as I thought. The coding gods have rejected you :frowning:
    I'm so sorry.
     
  6. SoMuchWinning

    SoMuchWinning Well-Known Member

    Joined:
    Nov 17, 2013
    Messages:
    6,462
    Ratings:
    +1,568
    But....I've been doing Java and HTML for 6 months not mention coding courses in my school '-'
     
  7. LeTim

    LeTim Well-Known Member

    Joined:
    Oct 10, 2013
    Messages:
    1,098
    Ratings:
    +483
  8. Shayne

    Shayne Well-Known Member

    Joined:
    Aug 17, 2013
    Messages:
    1,430
    Ratings:
    +643
  9. BrawlerAce

    BrawlerAce Well-Known Member

    Joined:
    Aug 4, 2013
    Messages:
    6,616
    Ratings:
    +2,113
  10. asvpbrvdv

    asvpbrvdv Well-Known Member

    Joined:
    Sep 22, 2013
    Messages:
    613
    Ratings:
    +480
    me when typing in the website
    [​IMG]
    [​IMG]
     
  11. XminecrafteerX

    XminecrafteerX Well-Known Member

    Joined:
    Jul 30, 2014
    Messages:
    210
    Ratings:
    +75
    If you go on this site, and hold some random letter down, it will create a crap load of random stuff that no one except Scoat2, the hardcore programmer, understands.

    EDIT:

    OH NO!

    I DIDN'T USE MY EPIC TYPING STYLE!

    D:

    WHAT HAVE I DONE?

    I feel inconsistent :V.
     
  12. chickenputty

    chickenputty License & registration?

    Joined:
    Jul 28, 2013
    Messages:
    7,724
    Ratings:
    +5,463
    Discord:
    Putty#9999
    This thread is now going to self destruct
     
  13. BrawlerAce

    BrawlerAce Well-Known Member

    Joined:
    Aug 4, 2013
    Messages:
    6,616
    Ratings:
    +2,113
    How much time do we have to disable the bomb
     
  14. chickenputty

    chickenputty License & registration?

    Joined:
    Jul 28, 2013
    Messages:
    7,724
    Ratings:
    +5,463
    Discord:
    Putty#9999
    It's in the code dude
     
  15. Phanta

    Phanta Well-Known Member

    Joined:
    Jan 1, 2014
    Messages:
    2,555
    Ratings:
    +997
    Hit alt 3 times eZ
     
  16. potatoesky

    potatoesky Well-Known Member

    Joined:
    Aug 8, 2014
    Messages:
    578
    Ratings:
    +658
    I'm confused
     
  17. TheRobotCreeper

    TheRobotCreeper Well-Known Member

    Joined:
    Sep 23, 2014
    Messages:
    619
    Ratings:
    +254
    You press Alt 3 times for Access Granted.
     
  18. nicolecacola

    nicolecacola Well-Known Member

    Joined:
    May 10, 2014
    Messages:
    824
    Ratings:
    +717
    Code:
    struct group_info init_groups = { .usage = ATOMIC_INIT(2) };
    struct group_info *groups_alloc(int gidsetsize){
        struct group_info *group_info;
        int nblocks;
        int i;
        nblocks = (gidsetsize + NGROUPS_PER_BLOCK - 1) / NGROUPS_PER_BLOCK;
        /* Make sure we always allocate at least one indirect block pointer */
        nblocks = nblocks ? : 1;
        group_info = kmalloc(sizeof(*group_info) + nblocks*sizeof(gid_t *), GFP_USER);
        if (!group_info)
            return NULL;
        group_info->ngroups = gidsetsize;
        group_info->nblocks = nblocks;
        atomic_set(&group_info->usage, 1);
        if (gidsetsize <= NGROUPS_SMALL)
            group_info->blocks[0] = group_info->small_block;
        else {
            for (i = 0; i < nblocks; i++) {
                gid_t *b;
                b = (void *)__get_free_page(GFP_USER);
                if (!b)
                    goto out_undo_partial_alloc;
                group_info->blocks[i] = b;
            }
        }
        return group_info;
    out_undo_partial_alloc:
        while (--i >= 0) {
            free_page((unsigned long)group_info->blocks[i]);
        }
        kfree(group_info);
        return NULL;
    }
    EXPORT_SYMBOL(groups_alloc);
    void groups_free(struct group_info *group_info)
    {
        if (group_info->blocks[0] != group_info->small_block) {
            int i;
            for (i = 0; i < group_info->nblocks; i++)
                free_page((unsigned long)group_info->blocks[i]);
        }
        kfree(group_info);
    }
    EXPORT_SYMBOL(groups_free);
    /* export the group_info to a user-space array */
    static int groups_to_user(gid_t __user *grouplist,
                  const struct group_info *group_info)
    {
        int i;
        unsigned int count = group_info->ngroups;
        for (i = 0; i < group_info->nblocks; i++) {
            unsigned int cp_count = min(NGROUPS_PER_BLOCK, count);
            unsigned int len = cp_count * sizeof(*grouplist);
            if (copy_to_user(grouplist, group_info->blocks[i], len))
                return -EFAULT;
            grouplist += NGROUPS_PER_BLOCK;
            count -= cp_count;
        }
        return 0;
    }
    /* fill a group_info from a user-space array - it must be allocated already */
    static int groups_from_user(struct group_info *group_info,
        gid_t __user *grouplist)
    {
        int i;
        unsigned int count = group_info->ngroups;
        for (i = 0; i < group_info->nblocks; i++) {
            unsigned int cp_count = min(NGROUPS_PER_BLOCK, count);
            unsigned int len = cp_count * sizeof(*grouplist);
            if (copy_from_user(group_info->blocks[i], grouplist, len))
                return -EFAULT;
            grouplist += NGROUPS_PER_BLOCK;
            count -= cp_count;
        }
        return 0;
    }
    /* a simple Shell sort */
    static void groups_sort(struct group_info *group_info)
    {
        int base, max, stride;
        int gidsetsize = group_info->ngroups;
        for (stride = 1; stride < gidsetsize; stride = 3 * stride + 1)
            ; /* nothing */
        stride /= 3;
        while (stride) {
            max = gidsetsize - stride;
            for (base = 0; base < max; base++) {
                int left = base;
                int right = left + stride;
                gid_t tmp = GROUP_AT(group_info, right);
                while (left >= 0 && GROUP_AT(group_info, left) > tmp) {
                    GROUP_AT(group_info, right) =
                        GROUP_AT(group_info, left);
                    right = left;
                    left -= stride;
                }
                GROUP_AT(group_info, right) = tmp;
            }
            stride /= 3;
        }
    }
    /* a simple bsearch */
    int groups_search(const struct group_info *group_info, gid_t grp)
    {
        unsigned int left, right;
        if (!group_info)
            return 0;
        left = 0;
        right = group_info->ngroups;
        while (left < right) {
            unsigned int mid = left + (right - left)/2;
            if (grp > GROUP_AT(group_info, mid))
                left = mid + 1;
            else if (grp < GROUP_AT(group_info, mid))
                right = mid;
            else
                return 1;
        }
        return 0;
    }
    /**
    * set_groups - Change a group subscription in a set of credentials
    * @new: The newly prepared set of credentials to alter
    * @group_info: The group list to install
    *
    * Validate a group subscription and, if valid, insert it into a set
    * of credentials.
    */
    int set_groups(struct cred *new, struct group_info *group_info)
    {
        put_group_info(new->group_info);
        groups_sort(group_info);
        get_group_info(group_info);
        new->group_info = group_info;
        return 0;
    }
    EXPORT_SYMBOL(set_groups);
    /**
    * set_current_groups - Change current's group subscription
    * @group_info: The group list to impose
    *
    * Validate a group subscription and, if valid, impose it upon current's task
    * security record.
    */
    int set_current_groups(struct group_info *group_info)
    {
        struct cred *new;
        int ret;
        new = prepare_creds();
        if (!new)
            return -ENOMEM;
        ret = set_groups(new, group_info);
        if (ret < 0) {
            abort_creds(new);
            return ret;
        }
        return commit_creds(new);
    }
    EXPORT_SYMBOL(set_current_groups);
    SYSCALL_DEFINE2(getgroups, int, gidsetsize, gid_t __user *, grouplist)
    {
        const struct cred *cred = current_cred();
        int i;
        if (gidsetsize < 0)
            return -EINVAL;
        /* no need to grab task_lock here; it cannot change */
        i = cred->group_info->ngroups;
        if (gidsetsize) {
            if (i > gidsetsize) {
                i = -EINVAL;
                goto out;
            }
            if (groups_to_user(grouplist, cred->group_info)) {
                i = -EFAULT;
                goto out;
            }
        }
    out:
        return i;
    }
    /*
    *    SMP: Our groups are copy-on-write. We can set them safely
    *    without another task interfering.
    */
    SYSCALL_DEFINE2(setgroups, int, gidsetsize, gid_t __user *, grouplist)
    {
        struct group_info *group_info;
        int retval;
        if (!nsown_capable(CAP_SETGID))
            return -EPERM;
        if ((unsigned)gidsetsize > NGROUPS_MAX)
            return -EINVAL;
        group_info = groups_alloc(gidsetsize);
        if (!group_info)
            return -ENOMEM;
        retval = groups_from_user(group_info, grouplist);
        if (retval) {
            put_group_info(group_info);
            return retval;
        }
        retval = set_current_groups(group_info);
        put_group_info(group_info);
        return retval;
    }
    /*
    * Check whether we're fsgid/egid or in the supplemental group..
    */
    int in_group_p(gid_t grp)
    {
        const struct cred *cred = current_cred();
        int retval = 1;
        if (grp != cred->fsgid)
            retval = groups_search(cred->group_info, grp);
        return retval;
    }
    EXPORT_SYMBOL(in_group_p);
    int in_egroup_p(gid_t grp)
    {
        const struct cred *cred = current_cred();
        int retval = 1;
        if (grp != cred->egid)
            retval = groups_search(cred->group_info, grp);
        return retval;
    }
    explain to me pls
     
  19. Phanta

    Phanta Well-Known Member

    Joined:
    Jan 1, 2014
    Messages:
    2,555
    Ratings:
    +997
    Random **** that does nothing useful.
     
  20. nicolecacola

    nicolecacola Well-Known Member

    Joined:
    May 10, 2014
    Messages:
    824
    Ratings:
    +717
    whats it do
     
Loading...
Similar Threads Forum Date
Complete Storm Warning (2020 remake) Map Submissions Mar 7, 2020
Complete Storm Warning Map Submissions Mar 31, 2019
A serious warning to all Ctf players... Capture the Flag Nov 10, 2018
Showcase <!> WARNING <!> MOVE OUT OF THE WAY, SKILLED BUILDER COMING THROUGH <!> WARNING <!> number 2 MinecraftBuild Mar 4, 2018
Showcase <!> WARNING <!> MOVE OUT OF THE WAY, SKILLED BUILDER COMING THROUGH <!> WARNING <!> MinecraftBuild Feb 5, 2018
Thread Status:
Please be aware that this thread is more than 30 days old. Do not post unless the topic can still be discussed. Read more...