420chan now has a web-based IRC client available, right here
Leave these fields empty (spam trap):
Name
You can leave this blank to post anonymously, or you can create a Tripcode by using the float Name#Password
A subject is required when posting a new thread
Subject
Comment
[*]Italic Text[/*]
[**]Bold Text[/**]
[~]Taimapedia Article[/~]
[%]Spoiler Text[/%]
>Highlight/Quote Text
[pre]Preformatted & Monospace text[/pre]
1. Numbered lists become ordered lists
* Bulleted lists become unordered lists
File

Sandwich


Community Updates

420chan now supports HTTPS! If you find any issues, you may report them in this thread
Security, FTP and MITM attacks by Samuel Grandville - Wed, 11 Oct 2017 16:15:57 EST ID:fDdwArgq No.37213 Ignore Report Reply Quick Reply
File: 1507752957499.jpg -(83736B / 81.77KB, 883x431) Thumbnail displayed, click image for full size. 83736
I'm not going to perform any attacks whatsoever, I'm more interested about securing my server and learning more about possible attack scenarios. So pardon my stupid questions.

I'm not going to explain every detail why my current system uses technology x or protocol y, because I'm writing this on my phone and I don't want to write too much with this, so please, let's just assume!

My server acts as a FTP server. FTP credentials are transfered in plaintext, what are the possible ways to steal my precious FTP login credentials? I would assume that a MITM attack would be one of them? Does the attacker need an access to my server's router or to the router I'm logging in from? If I disable WiFi, what kind of attack vectors still exists?

Please do explain! Thanks for in advance!
>>
Alice Wullerbury - Wed, 11 Oct 2017 17:11:28 EST ID:4Jf4geC2 No.37214 Ignore Report Quick Reply
If you're connecting to the server over 3G wireless, then that's a lot more easily sniffable than 4G wireless is, and someone might be able to pull the plaintext FTP packets from that.

Otherwise, your workplace could sniff the packets (if you're connecting from work). Your work's or home's ISP could sniff the packets, and your server's ISP could sniff the packets as they come into the server itself.
>>
Rebecca Fuckingham - Wed, 11 Oct 2017 17:54:26 EST ID:BBXKtFPn No.37215 Ignore Report Quick Reply
>If I disable WiFi, what kind of attack vectors still exists?

That depends. When was your Windows 98 box last patched?
>>
Caroline Blackgold - Thu, 12 Oct 2017 00:36:17 EST ID:4Jf4geC2 No.37217 Ignore Report Quick Reply
There's also the gamut of typical attack vectors that might affect any computer system, such as somebody remotely compromising your router or hacking your operating system, or you accidentally getting some malware onto the same machine that you're using for FTP hosting.
>>
Albert Saddlelock - Thu, 12 Oct 2017 16:07:56 EST ID:fDdwArgq No.37218 Ignore Report Quick Reply
>>37214
Interesting, didn't know about that at all...


A ridiculous sequence of courses by Doris Blatherstock - Sun, 04 Jun 2017 02:38:16 EST ID:HC1vVHLz No.37033 Ignore Report Reply Quick Reply
File: 1496558296564.jpg -(18091B / 17.67KB, 480x360) Thumbnail displayed, click image for full size. 18091
Hello, I made and actually did all this (including the 'grad level' research electives, except for the coding theory book)
https://functionalcs.github.io/curriculum/

It's easier than it looks, it took me 3 years to do that. I did it about 3-4 hrs a day at first but then everything kind of snowballed and I finished it with only 1hr a day after the first year. These days I'm finishing The Art of Computer Programming series, I'm done up to book 4A and doing 4B draft at the same time. I just do it 20-30mins a day.

I cannot shill TAOCP enough, it totally changed me from amateur to professional computer scientist by just doing hundreds and hundreds of exercises. 20mins a day, for one year, it's all you need for the first book. Anyway, pick and choose what you want from this list and enjoy

I make money from cloning shopify apps, and I work P/T on https://turtle.ai/ though much more infrequently these days. I started out shilling myself on elance (now "upwork") as a jr developer and literally taking jobs from 3rd world countries for less than I would spend on lunch. I also work 2 days a week at my local university doing "ML" (statistics) for a cancer research lab making peanuts but it's research, and fun to do, and I don't need the money. The book in that above link, "Parallel and Sequential Algorithms" was directly responsible for the lab hiring me. Anyway anons I'm here to tell you to try this have a good day.
11 posts omitted. Click Reply to view.
>>
Ernest Sumblewell - Wed, 27 Sep 2017 12:57:04 EST ID:M+uLLNpk No.37195 Ignore Report Quick Reply
>>37194

How do you know their recommendations? How do you know that this is the same person that wrote whatever else you are thinking of?
>>
Jack Dartcocke - Fri, 06 Oct 2017 00:37:16 EST ID:eZVREo4y No.37209 Ignore Report Quick Reply
>>37195
I've stalked this guy to no end, I know his writing style at minimum. Regardless, if someone fooled me, I wouldn't mind following another anons stellar blog and recommendations.
>>
Archie Bridgekut - Sat, 07 Oct 2017 09:24:59 EST ID:h1AD0QpE No.37210 Ignore Report Quick Reply
is this shit actually worthwhile doing till the end? I really want to become better, and I would spend the time, I'm just asking if the curriculum is decent
>>
Doris Fuckingridge - Wed, 11 Oct 2017 21:15:16 EST ID:eZVREo4y No.37216 Ignore Report Quick Reply
>>37210
yes
>>
Walter Hummlebad - Fri, 13 Oct 2017 21:26:35 EST ID:BBXKtFPn No.37219 Ignore Report Quick Reply
>>37210
The curriculum is decent, but probably not worthwhile unless you're pursuing a degree. If you're looking to be a programmer with the working knowledge of a typical CS graduate, this is not how you do that.


Website by notavailableanymore - Sun, 08 Oct 2017 16:41:03 EST ID:MaIITRSI No.37212 Ignore Report Reply Quick Reply
File: 1507495263354.png -(9099B / 8.89KB, 800x800) Thumbnail displayed, click image for full size. 9099
my first website ever, www.notavailableanymore.com


C++: TRY-CATCHING for Bounds by Nicholas Blacklock - Thu, 03 Aug 2017 20:40:54 EST ID:HsZblEoz No.37132 Ignore Report Reply Quick Reply
File: 1501807254829.png -(32495B / 31.73KB, 500x386) Thumbnail displayed, click image for full size. 32495
Hay PROG!
With C++, I'm doing a lot of computation with arrays/vectors and always running into bounds/BAD_ACCESS errors. I'm here to ask if using try-catch blocks to handle these guaranteed thrown exceptions is a good idea.

You can find my code snippet at https://pastebin.com/uWM3MXxs
7 posts omitted. Click Reply to view.
>>
Phoebe Chimblewell - Mon, 07 Aug 2017 23:38:55 EST ID:JneGddQE No.37142 Ignore Report Quick Reply
>>37141
well since you told me not to think about it, I wanna think about it now. Care to explain??
>>
Rebecca Crunderned - Tue, 08 Aug 2017 02:41:20 EST ID:P6PS9CBz No.37143 Ignore Report Quick Reply
Often times try-catch semantics are more expensive than a simple if-check. The reason for this is because of all the work that modern operating systems have to set up in order to make try-catch blocks work. When an exception is thrown, what tends to happen is that the processor's hardware exception interrupt vector is triggered (which punts you over to kernel-mode to handle it). When the interrupt vector determines that this is a software-initiated exception, it hands the exception off to the OS kernel to handle. Then when the OS kernel deems that this exception isn't one the special kernel software interrupts, it hands it off to the usermode program's exception handler. After all of that, your program goes into a special mode where it gets the chance to handle the exception or get force-exited by the OS. That's *a crapton* more work that the processor has to do versus a simple if-check.
>>
Jack Heshfield - Tue, 08 Aug 2017 18:32:03 EST ID:akqfogJa No.37144 Ignore Report Quick Reply
>>37143
That's not how exceptions are always handled. It's a different story for every implementation, but in general the catch can stand around looking dumb for a long time.
>>
Charles Gallylat - Thu, 24 Aug 2017 17:54:54 EST ID:9QSfnS0r No.37166 Ignore Report Quick Reply
>>37143
That may be true, but I doubt that modern compilers won't optimize exceptions you handle yourself to the point where there's practically no difference because 99% of the time you already know exactly which exceptions you want to catch in which order at compile time.
>>
Fanny Wondleson - Sat, 07 Oct 2017 16:29:47 EST ID:JfbkjUm/ No.37211 Ignore Report Quick Reply
>>37143
Yep.
But if you know that the exception will happen infrequently, and you have a lot of if's, then it's possible that all branch mispredictions you might get add up to an even greater penalty. As you say, unless it's performance critical it's not worth thinking about.
And if it is performance critical, the only way you'll know is by measuring.


my little project by Henry Hondledock - Mon, 02 Oct 2017 10:12:55 EST ID:JLm2mO7q No.37207 Ignore Report Reply Quick Reply
File: 1506953575466.png -(119125B / 116.33KB, 407x409) Thumbnail displayed, click image for full size. 119125
is it possible to make a file automatically open after downloading (any brower)?
>>
William Hickleshit - Mon, 02 Oct 2017 19:16:15 EST ID:gezKXAce No.37208 Ignore Report Quick Reply
>>37207
Sure, in Firefox, you can go to about:preferences#applications and set up what you want to happen.
In Chrome, after you download a file, you can click the little arrow beside it and choose to always opens files of this type.


Porn scraper by William Sicklespear - Sun, 01 Oct 2017 05:52:25 EST ID:+UW/1Srw No.37203 Ignore Report Reply Quick Reply
File: 1506851545125.png -(1964993B / 1.87MB, 1140x642) Thumbnail displayed, click image for full size. 1964993
I have a login to nubilefilms.com and am considering writing a quick scraper.

There is somewhere in the ballpark of 500GB of 1080p content plus loads of images.

Any interest?
>>
Edward Nellyfoot - Sun, 01 Oct 2017 14:05:29 EST ID:9QSfnS0r No.37204 Ignore Report Quick Reply
It might be faster just to download an webrip that already exists and then manually get the stuff that's missing from the site.

Anyway you have 2 approaches:
  • Use something like beautifulsoup and make sure you get all the auth working
  • Inject jQuery into the site with tampermonkey and try to find some way to save the extracted elements to disk.
>>
William Sicklespear - Sun, 01 Oct 2017 22:11:46 EST ID:+UW/1Srw No.37205 Ignore Report Quick Reply
>>37204
I write scrapers for a living, BeautifulSoup is my favourite soup.
>>
Doris Blackcocke - Mon, 02 Oct 2017 09:03:59 EST ID:BBXKtFPn No.37206 Ignore Report Quick Reply
>>37205
If you're getting paid to write scrapers with Python, you should invest in Scrapy.


School Project by Thomas Sanningstock - Sat, 30 Sep 2017 20:59:23 EST ID:33yd9LRh No.37201 Ignore Report Reply Quick Reply
File: 1506819563741.jpg -(16329B / 15.95KB, 290x290) Thumbnail displayed, click image for full size. 16329
Soo.. I'm soon going to start working on my school project and I've decided to make DIY electric drums. I'll use piezo senzors. The problem I'm having is how should I connect 4-6 drum pads to my computer and what program to use... I'd be very glad if u could help me out with this one progs ;)
>>
Eliza Lightdock - Sun, 01 Oct 2017 04:32:59 EST ID:P6PS9CBz No.37202 Ignore Report Quick Reply
Grab some simple piezo sensors and wire 'em up to your Arduino, then wire your Arduino up to your computer. All the common Arduino boards have 6 analog inputs. Write a simple program that reads analog values from these analog inputs and detects beats, then simply send the beats (also probably with their beat amplitudes) from the Arduino to your computer and have the computer do whatever you want with the info.


C++ delete not working on (I believe) allocated pointer by Matilda Bandlechutch - Wed, 27 Sep 2017 21:44:16 EST ID:5sC0bueS No.37196 Ignore Report Reply Quick Reply
File: 1506563056371.jpg -(111717B / 109.10KB, 1920x1080) Thumbnail displayed, click image for full size. 111717
Sup my people, I come here, humbly, once again to seek your guidance of C++.

I'm trying to implement my own linked list in a search algorithm and am running in to memory leaks. I define a node struct, create a 4 element array of pointers (because of the search algorithm), use new to fill those pointers, add those pointers to a linked list, and then create 4 new elements using the same array of pointers. HOWEVER, when I go to iterate through the list later to delete everything, I get an error saying:

malloc: *** error for object 0x7fff5fbfe4f0: pointer being freed was not allocated

I don't understand why I saying it was never allocated? Here is some of the code highlights and I'll also paste a link to the full code on pastebin:

//USING NEW TO (ALLOCATE?) NEW MEMORY (THIS IS IN A LOOP)
list_node* neighbors[4]; //The FOUR neighbors
neighbors[0] = new list_node;
*neighbors[0] = {nullptr, nullptr, q, (q->x)-1 , q->y , 9999, 9999, 9999};
neighbors[1] = new list_node;
*neighbors[1] = {nullptr, nullptr, q, (q->x)+1 , q->y , 9999, 9999, 9999};
neighbors[2] = new list_node;
Comment too long. Click here to view the full text.
>>
Eugene Hillynore - Wed, 27 Sep 2017 22:29:49 EST ID:gezKXAce No.37197 Ignore Report Quick Reply
>>37196
At the start of your code

list_node temp = {nullptr, nullptr, nullptr, x1, y1, 0, 0, 0};

need to use new there
>>
Matilda Bandlechutch - Thu, 28 Sep 2017 19:36:34 EST ID:5sC0bueS No.37198 Ignore Report Quick Reply
1506641794371.png -(807B / 807bytes, 48x48) Thumbnail displayed, click image for full size.
>>37197
Holy shit, that worked! Thank you so much.

I forgot to initialize the very first node with new and delete somehow knew. Does that function check the address and it's able to tell what's on the heap or something?
>>
Thomas Brindleworth - Thu, 28 Sep 2017 23:13:20 EST ID:gezKXAce No.37199 Ignore Report Quick Reply
>>37198
I believe calling delete on something not created with new is undefined, so it depends on your compiler.
>>
George Senningstone - Fri, 29 Sep 2017 13:08:19 EST ID:P6PS9CBz No.37200 Ignore Report Quick Reply
>>37198
At least on Windows with the debug CRT there's a mechanism built in to detect you calling delete or free on a pointer that did not come from the current process heap. You can easily do this in constant-time by simply checking the address against the lower and upper address bounds of your heap region.


a phone os by Basil Gugglegold - Thu, 10 Aug 2017 09:59:00 EST ID:CZA5DFLp No.37145 Ignore Report Reply Quick Reply
File: 1502373540803.jpg -(80244B / 78.36KB, 1000x661) Thumbnail displayed, click image for full size. 80244
How realistic would it be to create a very basic os for an arm phone?

I'd be content if I could just boot, and maybe send a blank sms by pressing the home button or something. Has anyone ever done something like this? Do you know of any good resources to get started?
I had a basic computer architecture class, so I know how to program simple startup code and taskmanagers for x64/x86 and some microprocessors, so learning arm assembly wont be a problem. Having access to I/O, and eventually the gsm functions will probably be the difficult part.

I never really wanted a smartphone, but now I got a 2015 samsung galaxy a3 because it was only 25 euro. The battery life is really shitty (40 hours at best), so an ultra efficient os would be really cool.
5 posts omitted. Click Reply to view.
>>
Oliver Cemmlehood - Sat, 09 Sep 2017 13:41:24 EST ID:2mg3P58s No.37186 Ignore Report Quick Reply
>>37185
> because they're somewhat antiquated
yes, because of this. AT commands and telnet are similar in that way.
>>
Oliver Cemmlehood - Sat, 09 Sep 2017 13:44:06 EST ID:2mg3P58s No.37187 Ignore Report Quick Reply
>>37185
>>37186
this, by the way, is coming from someone who's a great fan of unix and lives on the cli basically so it's not that i'm *inherently* biased against "old" things. but with some things you feel that it should have been replaced a long time ago when you use it.
>>
Jarvis Sodgemon - Sun, 10 Sep 2017 00:33:33 EST ID:xLKzmVTo No.37188 Ignore Report Quick Reply
>>37187
> but with some things you feel that it should have been replaced a long time ago when you use it.

Agreed. AT commands are a pain in the ass.
>>
Ian Brookfield - Mon, 18 Sep 2017 16:27:34 EST ID:4MJeso9G No.37192 Ignore Report Quick Reply
>>37145
You should try flash it to lineage
many report huge battery time increases with all the bloat removed
>>
Fucking Hallymitch - Tue, 19 Sep 2017 02:19:40 EST ID:P6PS9CBz No.37193 Ignore Report Quick Reply
>>37192
This sounds like spam to me.


TDD by Frederick Sushdock - Thu, 31 Aug 2017 10:33:41 EST ID:9cestl8h No.37169 Ignore Report Reply Quick Reply
File: 1504190021194.jpg -(324209B / 316.61KB, 503x376) Thumbnail displayed, click image for full size. 324209
Hey how often is test driven actually used in the real world.

Arrange - act - assert...
>>
Hamilton Shakeshit - Thu, 31 Aug 2017 21:14:15 EST ID:bkh8m0qR No.37172 Ignore Report Quick Reply
It has mainstream awareness and real traction, but I don't think it sees much use outside of agile teams which are themselves not the norm in most industries/places. I myself practice TDD-lite, writing tests for things that I don't fully understand or that I'm afraid of getting wrong.
>>
Oliver Cennerpetch - Fri, 01 Sep 2017 13:12:10 EST ID:P6PS9CBz No.37173 Ignore Report Quick Reply
I would agree with the above poster. Variants on "TDD-lite" are far more common than real full-on TDD. I think that asserts are pretty widely used (due to their low cost, low maintenance approach), though complete integration tests and even widespread use of functional testing are much less common.
>>
John Sockleson - Mon, 11 Sep 2017 19:29:18 EST ID:9QSfnS0r No.37189 Ignore Report Quick Reply
It one of the things teams wholeheartedly agree on to do for "the next project" during an intense debugging session.
After that it becomes irrelevant again.

Well sort of, this stuff is usually done for code that's intended to be shared on your github curriculum, because you want people to know you can if you must.
>>
Jack Chobblebot - Tue, 12 Sep 2017 10:50:53 EST ID:MEaLO7ku No.37190 Ignore Report Quick Reply
1505227853286.jpg -(89762B / 87.66KB, 493x396) Thumbnail displayed, click image for full size.
>>37189
> Well sort of, this stuff is usually done for code that's intended to be shared on your github curriculum

The pretty well sums up the quality of my code. "Will anyone else else ever look at this code? If yes then pretty code, if no then garbage."
>>
David Blatherbury - Fri, 15 Sep 2017 02:43:23 EST ID:P6PS9CBz No.37191 Ignore Report Quick Reply
>>37190
Yep same here.


Help me as I ask questions by Samuel Gunningtack - Wed, 23 Aug 2017 18:12:33 EST ID:FzfAQ7sK No.37162 Ignore Report Reply Quick Reply
File: 1503526353355.gif -(2193920B / 2.09MB, 125x125) Thumbnail displayed, click image for full size. 2193920
>1. Goal = define a function that takes input and then returns it in reverse
>2. result https://pastebin.com/BqUXJMxP
>3. Question = I somehow got it to work, but I dont even know how. I intended for this to just print the last part of an input, but it actually did it and I dont understand how


for i in text:
new_string = i+new_string


someone explain the code logic for why this returns the input in reverse for me, thanks
>>
Shit Blackham - Thu, 24 Aug 2017 12:03:01 EST ID:8B+9eE7j No.37164 Ignore Report Quick Reply
1503590581119.jpg -(50795B / 49.60KB, 1024x434) Thumbnail displayed, click image for full size.
A good way to understand what's going on in code is to throw some output statements in there. Try this:

https://pastebin.com/SnShQ5qQ
>>
Charles Gallylat - Thu, 24 Aug 2017 12:05:26 EST ID:9QSfnS0r No.37165 Ignore Report Quick Reply
  • it start with an empty string:
  • it starts a loop over each character starting with one
  • takes a concatenation of character of the loop and the variable and stores it into the variable
    • it does that till there is no characters left

in python you'd actually can do:
"abcd"[::-1]
and get:
'dcba'
>>
Hedda Sevinglock - Sat, 02 Sep 2017 10:06:04 EST ID:umBY7e8A No.37174 Ignore Report Quick Reply
>>37162
Try this code visualizer: http://www.pythontutor.com/visualize.html#mode=edit
>>
Basil Duckspear - Fri, 08 Sep 2017 14:58:56 EST ID:2mg3P58s No.37183 Ignore Report Quick Reply
Inside of the reverse function your code creates an empty string and then for each character in the string provided as argument you are *prepending* the current character to the string that is defined in the function.

Say that you have the string "hello world", here's what happens:

you enter the reverse function and create an empty string ''

you take the first character of "hello world"; 'h' and put it in front of the empty string and then assign that to the variable that held the empty string. Now that variable holds "h".

Next iteration of the for-loop it takes the next character of the argument string, so 'e', and it puts that in front of what it has and it becomes "eh"

It then continues in this fashion until all of the characters of the argument string have been consumed.

"leh"

"lleh"
Comment too long. Click here to view the full text.


Data Structures by Alice Drissledig - Sun, 03 Sep 2017 19:28:25 EST ID:rvUFtpA8 No.37175 Ignore Report Reply Quick Reply
File: 1504481305294.gif -(530982B / 518.54KB, 360x362) Thumbnail displayed, click image for full size. 530982
hey /prog/,

I'm looking for a good book or resource to help myself learn about data structures.
I'm in a college course next semester and for some reason they don't have a text for the class.
1 posts omitted. Click Reply to view.
>>
Fanny Nishshit - Sun, 03 Sep 2017 21:14:40 EST ID:BBXKtFPn No.37177 Ignore Report Quick Reply
Don't reach for a book if you've never had exposure to algorithms. Do the lectures and problem sets for MIT 6.006.
>>
Henry Mollybire - Mon, 04 Sep 2017 00:06:09 EST ID:bUN1r2sV No.37178 Ignore Report Quick Reply
> for some reason they don't have a text for the class.

That kind of sucks. How are the course notes?
>>
Hannah Neshdale - Wed, 06 Sep 2017 01:37:32 EST ID:BBXKtFPn No.37180 Ignore Report Quick Reply
>>37179
You're not allowed to post here anymore. Please go away.
>>
Priscilla Trotwill - Wed, 06 Sep 2017 22:16:55 EST ID:rvUFtpA8 No.37181 Ignore Report Quick Reply
>>37178

Notes are bad, not allowed to use a computer to take notes during lectures.

>>37177

I know a little bit about Data Structures, I passed the introduction course with a C. I got mono during the first section, and after that the teacher pretty much hated me since I needed help catching up.

>>37176
I've seen that one already, was just wondering if anyone had other advice.

A friend of mine recommended a book called Cracking The Coding Interview
>>
Graham Clommlelad - Thu, 07 Sep 2017 13:04:24 EST ID:jt2fMkCV No.37182 Ignore Report Quick Reply
1504803864531.jpg -(70341B / 68.69KB, 620x372) Thumbnail displayed, click image for full size.
Could you post a list of data structures that you need to know and maybe we can find resources for you or help explain things?

Also, what language are you using in the course?


Pages Next>>
0 1 2 3 4 5 6 7 8 9
Report Post
Reason
Note
Please be descriptive with report notes,
this helps staff resolve issues quicker.