• Breaking News

    Sunday, November 24, 2019

    CTF Program Help Ask Programming

    CTF Program Help Ask Programming


    CTF Program Help

    Posted: 24 Nov 2019 06:15 PM PST

    Hey all, I'm currently working to solve a CTF, and this is a puzzle on it. It says,

    " Attached is a snippet from a program that outputs a message. It is missing necessary functions to run, but there is enough present to allow you to understand what it is doing. Input the message this program would print out. "

    The code is below. Let me know if anyone finds anything!

    Section .data

    Msg db "2Y^Qbi6_b4Qij", 0

    Section .text

    Global start

    Start:

    Mov SI, msg

    Mov Ah, 14

    Print:

    Lodsb

    Add AL, 16

    Int 16

    Jmp print

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

    Python Website connection

    Posted: 24 Nov 2019 05:08 PM PST

    I am trying to log into a website through this webpage, any ideas?
    https://my.corehr.com/pls/coreportal_jdsp/cp_por_public_main_page.display_login_page

    Background: So I need to access my rota but the university blocks the webpage and I dont have an app for it so I am trying to write a python script that will email me the rota once its logged in. I can work the rest of the problem out as the rota is just a nice JSON file but I dont know how logging in would work.

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

    Can I get some help interpreting a snippet of React's source code ?

    Posted: 24 Nov 2019 10:52 AM PST

    Prototypal inheritance is something I neglected to understand more completely when I first took on JavaScript, so I am needing to get my chops up with it. Some stuff in the code below makes me unsure of how it should ideally be done.

    This is from the React open source code, from packages/react/src/ReactBaseClasses.js. I ommitted some chunks of code unrelated to the question in this snippet.

    ```javascript function Component(props, context, updater) { this.props = props; this.context = context; // If a component has string refs, we will assign a different object later. this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the // renderer. this.updater = updater || ReactNoopUpdateQueue; }

    Component.prototype.isReactComponent = {};

    function ComponentDummy() {} ComponentDummy.prototype = Component.prototype;

    function PureComponent(props, context, updater) { this.props = props; this.context = context; // If a component has string refs, we will assign a different object later. this.refs = emptyObject; this.updater = updater || ReactNoopUpdateQueue; }

    const pureComponentPrototype = (PureComponent.prototype = new ComponentDummy()); pureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods. Object.assign(pureComponentPrototype, Component.prototype); pureComponentPrototype.isPureReactComponent = true; ```

    So, my understanding of this is:

    • const pureComponentPrototype and PureComponent.prototype are assigned the same ref, which is an instance of ComponentDummy, which means that the PureComponent's prototype now consists of whatever was assigned to an instance in ComponentDummy's constructor (which is nothing) and the instance's __proto__, which is Component's prototype.

    • This seems to be a roundabout way to have PureComponent inherit Component prototypally, instead of the more commonly seen pattern PureComponent.prototype = Object.create(Component.prototype)

    • Along with this, Component's prototype is also merged with PureComponents. The comment "Avoid an extra prototype jump for these methods" seems to imply this was done so that Component's stuff is first on the prototype chain. I assume this is simply a performance benefit.

    • After all of that, it seems that the only difference between a PureComponent and a Component is that PureComponent inherits Component and has the prototype entry isPureReactComponent: true. PureComponent's constructor is even a copy-paste of Component's constructor.

    Unless those above observations are wrong, then I think I understand what is happening. It seems like the code could also look like this, which seems to be more like what you see when you Google "how to prototype inhertinance JavaScript".

    ``` function Component(props, context, updater) { this.props = props; this.context = context; this.refs = emptyObject; this.updater = updater || ReactNoopUpdateQueue; }

    Component.prototype.isReactComponent = {};

    function PureComponent(props, context, updater){ Component.call(this, props, context, updater); }

    PureComponent.prototype = Object.create(Component.prototype); Object.assign(PureComponent.prototype, Component.prototype); PureComponent.prototype.isPureReactComponent = true; ```

    My main question overall is really: What are the benefits of doing it the way that they did it?

    A lesser question would be about both inheriting Component's prototype and using Object.assign with it to the child's prototype. I assume that it is appropriate in this case, since there is only one level of inheritance and not too much stuff in the prototype itself, since doing this on a long chain of large prototypes would defy the point of the prototype chain itself, correct?

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

    Semi-Random Question: How to programmatically determine if someone has passed away?

    Posted: 24 Nov 2019 02:23 PM PST

    I'm curious if anyone has found a solid programmatic way of determining if a user has died? After some research, this seems more difficult than first thought. Birth records are not as readily available or consistent as I believed. I've considered the below, but I'm wondering if there might be a better way.

    1. Repeatedly email the user every X days/weeks/months and expect a response or link click. If they click a link in the email they're still alive. Otherwise...
    2. Require a subscription for a small amount (this is OK for my requirements). If a user's subscription cancels by not being able to charge, email them asking them to either cancel their account/service or set up a new payment method. If they take the required action then they're alive. If no response...

    Is there a better way? I feel like neither of the above is reliable enough to build a platform around. Thank you!

    submitted by /u/EvergreenTech-
    [link] [comments]

    Out of Order?

    Posted: 24 Nov 2019 12:55 PM PST

    I've been taking programming courses online for some time now and in the learning challenges, I always come across the same issue. I am asked to write code to determine something using variables defined later in the code, and when I go to compile it, the compiler says that the variable is not defined. Normally I could just fix this by putting the variables before the code, but in this latest course, it is restricting what part of the code I am allowed to edit and is locking the variables to after the part I'm allowed to write in. What can I do? Below is an example of the issue, calculating the volume of a pyramid. Only the line with the comment can be edited.

    ``` import java.util.Scanner;

    public class CalcPyramidVolume {

    /* Your solution goes here */

    public static void main (String [] args) { Scanner scnr = new Scanner(System.in); double userLength; double userWidth; double userHeight;

     userLength = scnr.nextDouble(); userWidth = scnr.nextDouble(); userHeight = scnr.nextDouble(); System.out.println("Volume: " + pyramidVolume(userLength, userWidth, userHeight)); 

    } } ```

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

    Can someone help me with this android studio error?

    Posted: 24 Nov 2019 11:08 AM PST

    A friend sent me an app that works fine for him but when I try to open it, I get an error saying:

    ERROR: plugin with id 'com.android.application' not found.

    I've tried to google it and try a few solutions but nothing seems to work. Does anyone have a solution that might work?

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

    Serial Communication question

    Posted: 24 Nov 2019 08:59 AM PST

    Trying to do some serial communication between an Arduino and a Raspberry, found the nice wiringpi library so I'm using that and it seems to work for the most part.

    The problem I'm running into is that I'm sending values between 0 and 10 to the Raspberry and I want it to do different actions depending on the values so I'm using a switch case but for some reason when I change the char I get from the serial communication to an integer something happens.

    The signal sent to the Raspberry is

    0 1 2 3 

    ect.. and the printout that I'm geting on the raspberry is

    0 -35 -38 1 -35 -38 2 -35 -38 3 -35 -38 ect... 

    I just cant for the life of me understand where the -35 and -38 is coming from, the Raspberry code is

    #include <iostream> #include <wiringPi.h> #include <wiringSerial.h> using namespace std ; int main(){ int serialDeviceId = 0; char dataChar = 0; // Setup for the serial comucation and connection... while(1){ dataChar = serialGetchar(serialDeviceId); int dataInt = dataChar - '0'; cout << dataInt<< endl; } return 0; } 

    If I comment out the cout then the -35 and -38 disappears, anyone have any ideas how to solve this?

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

    So i have no real knowledge in JavaScript so i just have a pretty simple (maybe) question about how to run things.

    Posted: 24 Nov 2019 08:08 AM PST

    https://github.com/tcorral/JSONC

    I am trying to use this to unpack some JSONC files but I am pretty lost on what i actually need to do. I have Node.js and a few other things that might be able to run it but when i try to run the jsonc.js it give me a JScript compilation error, i have downloaded the newest java just in case, so i am not sure if that is even the correct thing to be doing.

    Any kind of help would be appreciated.

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

    Complex Website Design

    Posted: 24 Nov 2019 05:58 AM PST

    Have an idea for a revenue share website but I looked on Fiverr for programmers and it seemed like a lot of spam. How do I find a programmer that can set up a somewhat complex idea for me?

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

    From the perspective of 1s and 0s, what does "working memory" look like?

    Posted: 24 Nov 2019 03:59 AM PST

    Regexp in javascript seems incredibly powerful, capable of abstracting away large chunks of iterative code, into a single line. Is Regexp an example of the power of "closer to the compiler" programming languages like C/C+ over higher languages like javascript/python?

    Posted: 24 Nov 2019 03:49 AM PST

    Databases: Collections of dice among many players

    Posted: 24 Nov 2019 03:21 AM PST

    Hi, I'm planning a digital board game where players can collect dice, much in the same way people collect trading cards.

    I'm planning on having the individual types of dice saved into a list called staticDiceData, and creating a relational table called diceCollectionData that links a player's profile id to a specific record in staticDiceData to represent that player owning a copy of that die.

    I realize that the size of diceCollectionData will become quite big (as every player could own hundreds or thousands of dice after a while), and I'm wondering if I should instead break it up into individual tables, one for every user. If this is the better option, how would I go about doing this?

    Thanks in advance!

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

    Setup inside setup in visual studio 19

    Posted: 24 Nov 2019 02:14 AM PST

    I have created a setup for my application made up of c#. It has a dependency .dll file which I have added, but the client also needs to run another setup. Is there a way in which I can somehow "embed" that second setup called B into my main setup A where A will install the main software and B will install a dependency.

    so that the user does not require to run two different setup

    I have created my setup using VS19

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

    What topics are programmers interested?

    Posted: 24 Nov 2019 03:37 AM PST

    I am building an automated newsletter for developers that uses an algorithm to fetch popular content which I then curate.

    I really want to improve it and am wondering what topics my newsletter should prioritise. For now, my newsletter talks about the tech industry, concrete programming and a little bit about design.

    What topics do you think programmers in general find interesting and want to hear more about?

    Thank you so much for your help

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

    Elevation column for Process Explorer

    Posted: 23 Nov 2019 11:16 PM PST

    Is there a column to display the elevation of a process in Process Explorer? I can't seem to find any that do it.

    Edit - I believe integrity level suffices.

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

    Hope to get some advice or insight from this subreddit

    Posted: 24 Nov 2019 01:49 AM PST

    No comments:

    Post a Comment