#programming

1 messages ยท Page 29 of 1

warped axle
#

ahhhh

fading tartan
#

last comma is [,]$

#

but just the fifth ๐Ÿ™‚

#

this hurts my brain

dusty ore
#

same here

#

I guess you should watch a video explaining about regex

#

In this regular expressions (regex) tutorial, we're going to be learning how to match patterns of text. Regular expressions are extremely useful for matching common patterns of text such as email addresses, phone numbers, URLs, etc. Almost every programming language has a regular expression library, so learning regular expressions with not only ...

โ–ถ Play video
#

Then you will get a rough idea about how to do it

#

Goodluck

warped axle
#

i remember spending 8 hours trying to figure this out in a ctf once

#

completely fried my brain

fading tartan
wispy kestrelBOT
#

Gave +1 Rep to @dusty ore

dusty ore
warped axle
#

ngl at this point i feel like manual labor is better unless you've got an absolute aircraft carrier of a data set

fading tartan
#

well it has 1.2M lines so finding another option is the best thing to do i gues haha

#

regex isnt gonna do it for me with my knowledge atleastt ๐Ÿ˜„

#

Thanks for the help mate ๐Ÿ™‚

solar palm
#

selecting the 5th comma somewhere could be done by matching the first 4 and then looking for another one, using {n} as a counter

steel vigil
#

I have no clue what to do so I ask here, I have made a portscanner on python via ubuntu Linux VM, and It works great, but when I tried to run the script on my main os (windows) it didn't work, and cause some weird issues

timid dove
steel vigil
#

Iโ€™ve used the re, socket, multiprocessing, colorama, timeit

#

Do you think there is some kind of issue with those module on windows

#

?

#

Cuz my code compiles just fine, but the execution is weird

solar hull
#

All but colorama are (IIRC) built-in, so they should be fine.

magic falcon
#

If you don't post screenshots of what the weird behavior is, we aren't able to diagnose and troubleshoot with you

velvet walrus
#

Hey Guys! I have a Question.

I Don't know wich Programming Language i need to lern first..
What would you Recommend?

mystic nimbus
#

python is a good language to start with, but it depends on what you are trying to do

velvet walrus
#

I think for Pentesting would be Automatisation great

warped axle
#

sounds like a job for python

#

then powershell is handy for windows targets

onyx merlin
velvet walrus
#

Thank you Guys!

What do you think would be a great second language ? C or C++?

warped axle
#

well if you're trying to write botnets that do make typos then C++ maybe

velvet walrus
#

Thank You Brother!

onyx merlin
#

What

warped axle
onyx merlin
velvet walrus
#

Okey i think than i go first for python and than for PowerShell

onyx merlin
#

Just make sure you learn OOP IMO, it will help with powershell later on

velvet walrus
#

Thank You

mellow onyx
#

is codecademy a good way to learn python?

warped axle
#

I think that depends on how you learn tbh

#

ohh wait

#

codecademy have video resources too dont they

mellow onyx
#

im pretty sure yeah

warped axle
#

well then i'd say try it out for your self

mellow onyx
#

yea ill try a few courses and see how it is

stone kayak
#

Does anyone here know Julia? Can I get a vibe check?

magic falcon
#

Sorry Bee, that one isn't one I've done anything in.

tulip sail
brazen eagle
serene vortex
# mellow onyx is codecademy a good way to learn python?

I started there but found I learn better just doing things with it. I built an app for work recently (Second time trying to build an app, first that was decent enough to be used). Between, freecodecamp(more of their YT stuff than the website), some foundational stuff on codecademy and A LOT of stack exchange and documentation, I made something that works well enough.

cursive zephyr
#

anyone knows how to communicate with upnp serveces ?

lilac holly
#

Which is the iso file I need to download for kali Linux using VMware

pine barn
clear needle
#

the vmware download isnt an iso its an ova image

brazen eagle
#

You can grab the iso and install the thing manually

#

Or you can get the ova image and import that

silk lotus
#

There is an ova for virtualbox as well btw

#

Yes

lilac holly
#

What do you guys prefer most baremetal install or VM for your attack machine .. ?

magic falcon
#

I prefer VMs. Because I can packed up the entire VM disk image into an ISO and hand it off as a deliverable

#

Also, sandboxing is part of a healthy ecosystem to manage all the things.

true pumice
#

Also means you can make mistakes and not have to worry about destroying your baremetal machine

magic falcon
#

That too

#

Borking a system bad enough can require a re-image; if it's a VM, snapshops are a super easy way to recover with minimal loss

true pumice
#

imo, I prefer using a VM anyway, feels safer. I probably wouldn't do pentest stuff on my host. If I did get something on my VM, it's enclosed and an attacker would be trapped there.

I rarely install anything to my host too and I have good anti-virus.

magic falcon
#

I do that for almost everything, Jabba. the only systems I don't run in a VM are my gaming PCs

true pumice
#

I do like the idea of having a machine designated to pentesting but it probably would just be used for that.

lilac holly
#

I think antivirus are pretty much useless if you are that contained and don't install anything on your host

magic falcon
#

SecureVNC and SSH let me do practically everything I would on bare metal, but on a VM in my lab instead of on my desktop

true pumice
#

I install stuff, but only things I know and trust. Always good practice to check what you're installing and scan it. You never know.

magic falcon
#

Depends on what you probability of being targeted by spearphishing or poison docs being passed around

true pumice
#

A lot of what I install nowadays is pretty much gaming related and I would do so through steam. Although, I don't game that often.

#

I use my Macbook for work so I don't really install anything there either.

magic falcon
#

A lot of cloud based data storage services perform AV scans, it's actually slightly harder than you'd think to pass around a poison pdf.

true pumice
magic falcon
#

And most of what I'm looking for in AV is just an alert that something tried to change a protected file

#

It's not useless, but i'm low-risk to be infected just due to my general system hygiene.

#

Suspicious torrents, unknown source game downloads, sketch websites are all things on my no-no list. I have a blacklist in my pi-hole specifically for warez and related garbage.

lilac holly
#

But what I prefer is a device laptop/desktop that has a baremetal installation of either Kali, Ubuntu, parrot or any other Linux distro that I use only for pentest and stuff and my regular work device with a VM in it

thorny lion
#

How to hack

lilac holly
# thorny lion How to hack

If you wanna learn that you are in a right place .. THM has lots of resources, machines to practice and community of amazing people ready to help you in your learning endeavor

magic falcon
#

That is exactly backwards for how to segregate potentially sensitive data.

#

I typically have a VM set up for each project, keeping the environment for each completely separate.

thorny lion
dusty ore
#

Do all variables in bash have to be in all caps?

tulip ibex
#

nop

brazen eagle
rugged juniper
#

Matrix class as a two-dimensional array.

class Matrix {
  constructor(width, height, element = (x, y) => undefined) {
    this.width = width;
    this.height = height;
    this.content = [];
    for (let y = 0; y < height; y++) {
      for (let x = 0; x < width; x++) {
        this.content[y * width + x] = element(x, y);
      }
    }
  }
  get(x, y) {
    return this.content[y * this.width + x];
  }
  set(x, y, value) {
    this.content[y * this.width + x] = value;  
  }
}

what is "element" doing here?

steel vigil
#

hi, How can I run python script from anywhere in Linux?

mystic nimbus
#

do you mean from a different directory python <location of script>\<script>

steel vigil
#

yes

mystic nimbus
#

just add the directory path of the script

steel vigil
#

yes but i want like just the name of the file

mystic nimbus
#

if you aren't in the same directory, you need to add the directory path before the scriptname

steel vigil
#

sure?

#

so how nmap actually do it?

mystic nimbus
#

nmap has a specific folder that it stores the nse scripts in

steel vigil
#

so you mean i cant?

mystic nimbus
#

not an nmap expert, but the documentation might give some guidance

stoic badger
# steel vigil yes but i want like just the name of the file

The easiest way to do this with your own files is by adding whatever folder it's in to the path, and making the python file executable with a shebang at the top of the file.
It's really just a lot of work for very little payoff. Just type out the whole thing: python /PATH/TO/SCRIPT/file.py.

#

Unless you're actively developing a python project where you want to call it by its name, there are very few reasons I see why you would need to do that

stoic badger
#

I always forget that symlinks exist

solar hull
brazen eagle
#

Looks like an initialization function

#

To initialize the array

blazing lava
#

or, is there a room for that... or is that possible?

sand bough
#

hey i am new to machine learning and i am creating a breast cancer detection thing but i have come across this error. When i run the last code cell this error keeps on showing. Epoch 1/1000

TypeError Traceback (most recent call last)
<ipython-input-34-a5e6a9bff808> in <module>()
----> 1 model.fit(x_train, y_train, epochs=1000)

2 frames
/usr/local/lib/python3.7/dist-packages/tensorflow/python/eager/def_function.py in _call(self, args, **kwds)
915 # In this case we have created variables on the first call, so we run the
916 # defunned version which is guaranteed to never create variables.
--> 917 return self._stateless_fn(args, **kwds) # pylint: disable=not-callable
918 elif self._stateful_fn is not None:
919 # Release the lock early so that multiple threads can perform the call

TypeError: 'NoneType' object is not callable
[07:46]
i made this with google collab in python. https://colab.research.google.com/drive/19G-e-uTGvX4El62vIkn5WMoRR3pTY00h#scrollTo=NAtXjaF4UPbO&uniqifier=5

tulip sail
#

!rule 3

narrow terraceBOT
#

Rule 3: No excessive self promotion. Linking to another discord server is strictly prohibited, unless you have the infosec-developer role and the server is being linked as a resource to provide help with a specific tool (e.g. linking the Ciphey official Discord server for help with Ciphey). Don't turn it into advertising.

tulip sail
#

Not the place to advertise @elfin spruce :)

elfin spruce
#

Oh sorry

tulip sail
#

Np :)

tulip ibex
#

and then space to enter

coarse raft
steel vigil
#

How bro?

steel vigil
#

Ola, Can someone explain to me about Unions in C++ (How they work, How to use them, etc.)?

desert eagle
#

Is java good for learning hacking and if not then suggest me some like 1 language for both community and pentesting purpose

onyx merlin
#

Python

ocean horizon
desert eagle
ocean horizon
onyx merlin
#

Java applets are a historical thing really

onyx merlin
ocean horizon
#

Aw

desert eagle
magic falcon
#

If union still doesn't matter sense, please ask some more clarifying questions

full drift
#

I've a question : in order to understand TCP/IP networks functioning, should we spend a lot of time in learning how to cut addresses ranges ?

magic falcon
#

Are you talking about classless network design? Subnet specification is a huge area of understanding IP based networks.

steel vigil
#

@magic falcon ๐Ÿ™

full drift
forest dock
lilac jewel
#

Hey all,
recently, I programmed a keylogger and I used 'pyinstaller' to convert the file from .py to .exe.
But when I want to run it on windows, this errorbox shows (below).
So I tried to turn off virus protection in windows defender, but that didn't help.
Than I tried to turn on developer mode in security setting, but it didn't help either.
I even try to encode the python script to base64 in the belief, this could
bypass this problem, but no results.
Does anyone know, how to fix this problem?
thx

tulip sail
lilac jewel
tulip sail
lilac jewel
#

educational purpose, just a project, really

tulip sail
#

Really? Awfully malicious choice

lilac jewel
#

well, I'm starting at learning python and I wanted something easy to start ๐Ÿ˜„

#

sooo, do you know how to fix it?

autumn kettle
#

ur a girl ๐Ÿ˜ฎ

tulip sail
tulip sail
#

Word of advice: probably better not making a scene when someone says something like that. It does not make you look good.

autumn kettle
#

ok

lilac holly
lilac jewel
#

I just don't know what to do, I tried everything I know but the error is still there. I would be grateful if you could help me.

brazen eagle
tulip sail
#

It's like selling a stick of plastic explosive to a random person off the street. Sure, they might (as they claim) just want to study it, but more likely they want it to blow something up

lilac jewel
lilac jewel
wispy kestrelBOT
#

Gave +1 Rep to @strong bison

tulip sail
steel vigil
brazen eagle
#

not a fan of multiprocessing, personally

remote echo
#

This is good first issue if you want to contribute to lemmeknow ๐Ÿฆ€โค๏ธ.

We need some comparison and benchmarks for performance compared to PyWhat!

You can add some more comparison if you got idea โ˜บ๏ธ, hoping to see PRs.

https://github.com/swanandx/lemmeknow/issues/2

GitHub

This project uses same regex database as PyWhat , we need some performance benchmarks against it <3 ! For identifying single text For analyzing strings from a file Calling function multiple ...

cosmic wolf
#

hey I am coding a small page and I was wondering how I can make the page unscrollable

brazen eagle
#

css can probably do it

#

try looking at the overflow property

hushed arrow
cosmic wolf
#

Thanks

plucky abyss
#

oops, this is unrelated to thm, I'll probably get in trouble if I ask here, nevermind sorry x.D

brazen eagle
#

there's a bit more leeway here

small pine
#

Is there anywhere that takes the time to break other people's(or their own) code down line by line (or block by block) to explain what is going on? Is there such a thing?

static night
#

Idk anything that does more than that, hopefully that helps though

small pine
#

@static night , that'd actually suffice I think.....I'll look into it. Thanks ๐Ÿ™‚

wispy kestrelBOT
#

Gave +1 Rep to @static night

small pine
#

My brain turns off when it comes to making code because it feels so non-straightforward...

small pine
#

so I am trying to reverse engineer how other people decide what goes first, second, third, so on

static night
#

Ah fairs, good luck. And lmk if I can help in any way

small pine
#

I did a codeninja exercise where it wanted me to list..I defined before and not after..and was told it was wrong lol..every since it's been bugging me

brazen eagle
#

eh?

#

it helps if you know exactly what it is you want to do, then it's a matter of breaking everything down into bite-sized bits, and preferably testing

mortal lintel
#

hi! i'm new around here. Could someone tell me where to start the studys?

lilac holly
#

Hello, I suggest you to read #start-here in the first place and ask us your questions if you have any ( more likely in #infosec-general )

brazen flax
#

Hello people, I need a bit of help win WinAPI. I am trying to write a program to execute a shellcode(for example, launch calc.exe)

I generate the shellcode with:

msfvenom -f c -p windows/exec CMD="C:\windows\system32\calc.exe" -b '\x00'

And the cpp script looks like this:

#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(void)
{
    
    unsigned char payload[] = <SHELLCODE>;
    void * exec_mem;
    BOOL rv;
    HANDLE th;
    DWORD oldprotect = 0;
    unsigned int payload_len = sizeof(payload);

// Allocate a memory buffer for payload
        exec_mem = VirtualAlloc(0, payload_len, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
        printf("%-20s : 0x%-016p\n", "payload addr", (void *)payload);
        printf("%-20s : 0x%-016p\n", "exec_mem addr", (void *)exec_mem);

        // Copy payload to new buffer
        RtlMoveMemory(exec_mem, payload, payload_len);
        
        // Make new buffer as executable
        rv = VirtualProtect(exec_mem, payload_len, PAGE_EXECUTE_READ, &oldprotect);

        printf("\nHit me!\n");
        getchar();

        // If all good, run the payload
        if ( rv != 0 ) {
                        th = CreateThread(0, 0, (LPTHREAD_START_ROUTINE) exec_mem, 0, 0, 0);
                        WaitForSingleObject(th, -1);
        }
    
    return 0;
}

I compile it with x86_64-w64-mingw32-g++ on Linux and cl.exe on Windows but both give me the same error. Any suggestions? ๐Ÿ™‚

thin lynx
#

Does anybody familiar with Java/Kotlin/android here?

lilac holly
#

You should ask your question directly, so you won't wait unnecessarily

brazen eagle
#

Can't help if we don't know what you want

atomic egret
#

Do anyone let me know about how to reduce the** font size** of any text ?
Because I am making a discord python bot and the text seems relatively bigger.

thin lynx
#

Anybody with good knowledge of android/Smali please dm me
I need some help with a reverse engineering project
Thanks in advance

lilac holly
#
  try:
    # something
  except some_error:
    # I fixed the exception here and wants to try again. that's why everything is in a while loop
    continue
  else:
    # somethings
  finally:
    # somethings
    break
#

problem is that it ignores the continue statement in except block and jumps into the finally block which has the break statement, and breaks out of the loop
I want to try again after fixing the exception in except block
any solutions?
it works if I omit the finally block
but I don't want to exclude finally block as it does some important tasks which I want to perform with or without exception

verbal yacht
#

que

steady gazelle
verbal yacht
#

i wouldnt use else??? and finally?

#

uunclear

steady gazelle
#
while True:
  try:
    #do something1

  except some_error:
    #do something2

  print("try and except completed")
  #move onto rest of code
  if condition == met:
    break
#

something like this yes? ^^

lilac holly
verbal yacht
#

this is the normal try and except thing.

try:
    num = 'z'
    assert num / 2 ==  6
except:
    print("que?")
else:
    print("code go brrr")

finally, is always going to happen, hence why its always breaking.

try:
    num = 'z'
    assert num / 2 ==  6
except:
    print("que?")
else:
    print("code go brrr")
finally:
    print("ends up here")
lilac holly
#

Uhmm... I know how try and except works but idk why continue in except was ignored

#

Anyways, my goal is to retry after running the code in except block. That's all

verbal yacht
#

remove finally

#

and it will work ๐Ÿ˜‰

lilac holly
verbal yacht
#

everytime, a try block is executed, it will run straight into the finally

#

just put the code in??? (without the finally)

#

finally will always execute

lilac holly
#

I will try without finally. It works I know.

#

Thanks ๐Ÿ˜Š

#

I was actually opening a file in read mode inside try block

#

If file does not exist then create the file in except block

#

And then wanted to try again

#

Finally black was closing the file

#

Maybe now you understand what I want to do @verbal yacht @steady gazelle

steady gazelle
#

Yeah now I do understnad, one mo

verbal yacht
steady gazelle
#

Why don't you just check if the file actually exists in the first place?

#
if my_file.exists():
#

with something like that ^^

verbal yacht
#

you could, iirc just do file = open("myfile", "w+")

#

w+ would put the pointer at the beginning of the file to read from.

#

but opens as reading and writing

#

you could also use a+

#

which i think is more sutiable

#

it will create a new file, or opens an exiting file. but the pointer is put at the end.

lilac holly
#

tell me I don't know about exists() method

lilac holly
wispy kestrelBOT
#

Gave +1 Rep to @verbal yacht

lilac holly
verbal yacht
#

๐Ÿ‘

lilac holly
verbal yacht
#

yep

lilac holly
verbal yacht
#

oh i think they're confusing it with the os.path.exists() method

steady gazelle
#

Sorry, I think you need the os module

#

Yeah I am, maybe I'll keep hush ๐Ÿ˜†

lilac holly
verbal yacht
#

that is a good solution

lilac holly
#

anyways, problem is solved I guess. thank you both ๐Ÿ˜

sharp coral
#

how do you pick which license to put a project under? I was looking at just using "The Unlicense" but I see some people saying it's bad for open-source - I just want all of my stuff to be freely available to copy/modify/use in perpetuity

lilac holly
brazen eagle
lilac holly
#

continue means jump to next loop

brazen eagle
brazen eagle
wispy kestrelBOT
#

Gave +1 Rep to @solar jewel

brazen eagle
#

GPLv3 and derivatives are the plague

#

And I mean literally the plague.

#

Creative Commons licenses shouldn't be too bad either though

sharp coral
brazen eagle
#

It's a cya type thing

sharp coral
#

the bit I like with the GPL licenses is that it seems that any modifications mean that the updated source code needs to be available

brazen eagle
#

The problem with GPLv3 is that merely using a GPLv3 component means that code must then also be licensed under the GPLv3

lilac holly
brazen eagle
#

AGPLv3 is even more infectious

magic falcon
#

Even without license attached, your code is still copyright by you though. proving it's yours might be more problematic though

brazen eagle
#

The WTFPL is amusing

magic falcon
#

more amusing than the HTML error RFC?

brazen eagle
#

Probably not

stoic badger
plain path
#

im sure this has been asked 500 times already but since im struggling to find good advice on reddit, stackoverflow etc. im gonna ask it here.

What course would you guys recommend for learning assembly from scratch for the purposes of binary exploitation / reverse engineering? Should I learn C first? (I know python and js)

tulip ibex
hexed cargo
#

Hey everyone
I have some programming skills and i want to create tool for hacking which i will able to use it for terminal direct
Ps: i can create tool in python
But what should i do to make it usable in terminal
Ex:- MYTOOLNAME {some_values} -p {some_values}
(Something like this)

warped axle
#

So you want to parse arguments?

#

Take a look at sys.argv, either look it up in the docs or just google it

hexed cargo
#

Thanks

worthy spire
#

I ran this and it's not giving any output, why so?

a = 9 ** 99999999999999999999
print(a)

edit: so it turned out there's a fix integer value limit. But can't I find how can I Increase it or print this value.

worthy spire
#

I dont get how that work (sys.maxvalue), but I got to know that it'll print out the value after some time, but will eat up resources and memory

thorn moon
# plain path im sure this has been asked 500 times already but since im struggling to find go...

At least in the USA, the course in a typical college Computer Science program that covers assembly (and computer hardware) in depth is often called โ€œComputer Organizationโ€

Unfortunately thatโ€™s not a specific recommendation, but maybe itโ€™ll be helpful for googling or looking at potential books?

You could also try diving in head-first and learning as you go, which will be a bit harder in some ways, but will teach you things you know youโ€™ll specifically need for RE

wispy kestrelBOT
#

Gave +1 Rep to @thorn moon

plain path
#

Yeah I did kinda dive in head first and learn as I go

#

im picking things up fast

#

this cheatsheet is the perfect middleground between condense and still beginner friendly

gusty dock
#

lol cursed

warped axle
#

What the...

gray ledge
#

is anybody well versed in java?

magic falcon
#

Many of us. Please just ask your question, and someone will hopefully chime in.

ancient garnet
#

hello

plain path
#

The "ret" instruction in assembly is "Pop return address from stack and jump there"

But how can that be? I thought the only way you can pop something off the stack is if its at the top (first in last out)? Is the return address always at the top of the stack? How? Also theres so many pointers. base pointer, instruction pointer, stack pointer. someone care to ELI5 difference between the pointers? I have a rough idea but need to drive it home

#
  1. if I write some C code and allocate 500 bytes of memory, the assembly code wont show how much is being allocated, or its showing but not 500. how?
magic falcon
#

Each register stores a pointer for a reason - some exercises that will help you understand what is happening is to walk through how the stack changes when a function is called, when a loop executes, when a decision happens, when variables are declared, and when a function exits

#

C doesn't render to assembly directly, unless you are using a really weird toolchain.

plain path
#

ah

magic falcon
#

you can compile the C to native code, then use a disassembler to see what equivalent assembly code could be

#

Compilers make a lot of decisions, especially with respect to optimization. It's the most successful tool in computer science

plain path
#

Right, but with all that efficiency = harder reverse engineering

magic falcon
#

Not necessarily

plain path
#

more stuff stripped away

magic falcon
#

Because it renders into more recognizable patterns

plain path
#

but the stack thing - you can always only access whatever is at the top, right?

magic falcon
#

The hardest ASM is written by people who are just learning, because they don't understand good conventions, best practices, nor good style

#

Nope

#

The exercises I listed will show you exactly what you want to know if you pay attention and go slow

plain path
#

list me please

plain path
# magic falcon Nope

aite cuz the first thing any educational video says about stacks is that its first in last out data structure

magic falcon
#

A stack is commonly used in that way for adding and removing with push and pop. Accessing the stack is a different operation than either of those.

plain path
#

aaaaaaaaaah

brazen eagle
#

The RPN calculator kata is good for understanding stacks as a data structure

#

In the end it's usually implemented as an array, or a deque

magic falcon
#

the main data stack isn't usually treated as a pure data structure stack though

#

random access is required, just due to how allocation in a function in organized

jade jay
#

Sorry if this is off topic, still new to the channel.
Is it possible to install kali on my 970 Evo plus(I have a usb-c adapter so it's portable)

And use it on multiple devices? Say if I'm at home and wanna use it on my desktop. Then when I travel can I plug it into the laptop and boot it up?

I know their is a kali usb live. But will that work?

#

Once again my bad if this is on the wrong channel ๐Ÿ˜…

mortal merlin
#

usb live means you boot it into memory and not persisting it on the disk

jade jay
#

Yea I did, it worked. Only for the laptop tho when I plugged it into desktop it would say something like no access filesystem restricted or something. I'll reinstall and try it again. I basically installed usb live to my thumb drive. Then used easeus disk copy to the m.2 it booted up and worked, I did updates unplugged it from laptop and plugged into desktop and got nothing but errors about permissions. Heh

mortal merlin
#

Why would you copy an iso file over ? xD

jade jay
#

Think at this point I'm just gonna make a drive for each system with kali seems a lot easier then trying to get 1 drive to work with both systems.

I installed usb live onto my SanDisk 256gb usb. Then did a disk copy. I mean it worked but only for 1 system lol

mortal merlin
#

But you cant install usb live

jade jay
#

Ahh I'm starting to understand

mortal merlin
#

The whole point of a live is that it isnt persistent but it is a quick boot

jade jay
#

I followed the add persistance to it then did the disk copy

mortal merlin
#

You need to install kali on a disk in order te keep all your changes on your file system

jade jay
#

Ah gotcha

mortal merlin
#

If you follow the installation guide you will have a disk with a working kali linux, make sure the grub is configured correctly

jade jay
#

Will do ๐Ÿ‘๐Ÿผ thank you

mortal merlin
#

From there it shouldnt matter much if you put it in computer XYZ

#

your welcome ๐Ÿ™‚

jade jay
#

Ohh I didn't know that. I thought it would bug out since the installation was configured to that computers hardware

mortal merlin
#

Nope that shouldnt matter

jade jay
#

Sweet =]

mortal merlin
#

Because everything that is persistent is on the disk itself

jade jay
#

I see

plain path
#

What exactly is the point of assigning the arg1&2 and then reassigning it to the registers?

#

why not just do movl edi/esi -> edx/eax respectively right away

#

why is it just juggling variables/values around without doing anything to them

#

frame pointer and base pointer are the same thing if im understanding things correctly? frame/base pointer points at the frame being used and stack pointer just points at the top of the stack?

brazen eagle
#

I'd assume you use the base pointer as a base for any pointer maths :)

sour apex
#

is there a string where the md5 hash is the same as the string itself?

magic falcon
plain path
#

Any suggestions for tried and tested resources where I can learn data structures and algos from the ground up? To give myself a better overall picture of programming

magic falcon
#

The Corman book is a university standard.

brazen eagle
brazen eagle
lilac holly
#

Can someone suggest me an project related to AI in cybersecurity ,in python

magic falcon
brazen eagle
#

fair

#

can't remember what my Algos book was, but it was also 20 years ago

magic falcon
#

The other good one is the red book, by princeton publishing

#

Walls & Mirrors isn't bad, it is way better at explaining 2-3 and self-balancing trees than most algo books are. W&M also isn't nearly as dense

brazen eagle
magic falcon
#

i forgot about the openGL red book. I've called Sedgewick&Wayne the red book because it's cover is bright, eye searing red.

#

It's almost as memorable as the dragon book

brazen eagle
#

yeah

plain path
#

I know how to convert ASCII letters to binary, but how does the computer know the binary numbers its reading, i.e. bits, are representing letters / words and not numbers?

solar hull
#

The interpretation of the contents is solely on the responsibility of the operations done on the data.

plain path
#

makes sense

solar hull
#

Higher level languages naturally provide convenience methods and utilities for this.

clear lodge
#

Hey, are there any iOS developers here who have experience with releasing apps to the app store?

brazen eagle
#

Also context

#

I misread the question. But yeah it depends on the operation. It's all numbers at the lowest level

#

Even assembly is all numbers, as each function is represented by an opcode. This is how shell code basically works

plain path
brazen eagle
#

pretty much

plain path
#

thanks @brazen eagle

wispy kestrelBOT
#

Gave +1 Rep to @brazen eagle

brazen eagle
#

the function will translate at some level, or the terminal program will see a series of bytes and say ah, this is a / or this is a u, I should display that

proud kelp
#

Hey, I want to connect to a server with ssh and then copy a text file to my directory. What is the command to copy a file from the server to my computer?๐Ÿค”

lilac holly
#

What is your Host OS ; Windows or Linux ?

proud kelp
#

Linux

lilac holly
#

So scp should do the trick, I guess it's something like

scp username@vivid island:/path/of/your/file your/local/computer/path

With username & IP from your server

#

Oops someone is called IP here, sorrykekw

proud kelp
lilac holly
#

Yep

proud kelp
#

Let me check it

lilac holly
#

What do you want to do exactly ? If I may ask

solar hull
proud kelp
sly breach
#

Happy #NationalCodingWeek ๐Ÿ˜„

plucky musk
#

Man python is a pain โ€ฆall im trying to do is install my python appโ€ฆ. If I was just trying to install it as a library I would be fine โ€ฆ

hoary scaffold
#

It feels so good once you start to understand the language your learning

#

Just wish I would have learned sooner ๐Ÿ˜ฉ

plucky musk
#

๐Ÿคจ

hoary scaffold
#

๐Ÿ˜ˆ

idle fulcrum
#

๐Ÿฆ‰

queen gate
#

which distro is best

remote echo
#

the one you like and gets your job done.

onyx merlin
#

+you won't have to spend hours fixing it in a work day or study session

worthy spire
#

Is today mentorship day or smth?

hoary scaffold
brazen eagle
magic falcon
frosty ice
#

is there any resource to make a file forbidden on the webserver?

tulip sail
frosty ice
#

I am gonna need to read something from a file in the website, then try processing it, but I need to make the file inaccessible from outside

#

I think ur question were different, but eh

tulip sail
#

That tells me nothing about your environment. Linux? Windows? Apache? IIS? Nginx? Python WSGI? Express?

vernal thicket
#

can't you just move that file out of the webroot, and hard code the path in the script that works with the file?

frosty ice
#

Windows. Nothing special, no special technologies. Only jQuery and maybe could utilise some PHP somehow.

frosty ice
tulip sail
#

I don't have a clue how Live Server works, but either shift it outside the webroot or remove permissions for your user to read it.

frosty ice
#

@vernal thicket you could still do /../.., right?

tulip sail
#

Unless Live Server lets you configure rules

tulip sail
frosty ice
brazen eagle
#

Live server is great for dev work, but probably shouldn't be used to actually host anything

#

it's got zero security

frosty ice
brazen eagle
#

I think you can share it over a sharing session though

tulip sail
#

I'll defer to your experience @brazen eagle. I dislike VSCode ๐Ÿคทโ€โ™‚๏ธ

brazen eagle
#

it's fine

tulip sail
brazen eagle
#

yeah but it's good for rapid prototyping

magic falcon
#

Not sure what the MS Server equivalent would be

tulip sail
#

Bear in mind that MS is completely broken...

magic falcon
#

So business as usual then ๐Ÿ™‚

vernal thicket
#

Can't you use a .htaccess file to deny access to that file? Or does that also affect access from scripts on the server itself?

#

and if you can , does Live Server support .htaccess files?

brazen eagle
#

dunno, never tried doing something that silly with live server

tulip sail
#

Hence asking about environment

vernal thicket
#

fair point. nvm than

patent birch
#

Quick question - I'm trying to setup an Ubuntu Server at my apartment with an old laptop that I kept around, and I think I am running into a wifi problem on setup. The thing is when I logged into the wifi here the first time they had me log into their program via browser to complete the wifi connection. Well my Ubuntu server only has terminal so is there a way to either bypass or certify that checkpoint without downloading ubuntu as a desktop?

hollow ember
#

I don't know the answer to your question, but what you see when you are connecting to wifi is called a captive portal. Maybe that will help you find the answer.

dull tangle
#

some of those captive portals allow you to whitelist mac addresses for an account, it completely depends on the providers configuration

midnight cliff
magic falcon
brazen eagle
#

Ah juun was faster... There's w3m as well if you don't like lynx

patent birch
#

I haven't had a chance to try it yet but I will, thank you all!

jolly dagger
#

hey guys anyone here good with react ?

balmy flint
jolly dagger
# balmy flint Shoot your question if anyone knows will guide you

i created a modal for a post like if anyone wants to dislike the post then the modal pop up for notification to confirm that really wanna dislike and if person click on yes then i want to remove one like from the post and i have written modal code its working fine and previously i have written logic for like and dislike now the problem i encounter is that i want to connect that yes notification option with likes decrement

jolly dagger
wispy kestrelBOT
#

Gave +1 Rep to @queen gate

queen gate
jolly dagger
queen gate
jolly dagger
queen gate
jolly dagger
queen gate
jolly dagger
#

yes

queen gate
jolly dagger
#

you might be searching fr=or react native?

jolly dagger
queen gate
jolly dagger
#

yes

queen gate
jolly dagger
queen gate
jolly dagger
queen gate
#

i am new adult

jolly dagger
jolly dagger
#

and i'm learning from 20 yr boy and from 40yr guy so dosent matter

#

and i help 47yr female to learn all things and help her in errors lol

queen gate
#

i also made three successful app

queen gate
jolly dagger
jolly dagger
#

what stack you're working with?

queen gate
#

due to some situation in afganistan i dont focus on my career

jolly dagger
long summit
jolly dagger
queen gate
jolly dagger
jolly dagger
#

hello guys i need help in yarn actually i was creating react projects like npx CRA and now i want to switch to yarn and i tried with yarn but myZSH shows command not found do yarn need some installation before to use it? and if i install yarn then if for some reason i again want to use npm then will npm work or what will be the switching process between them?

should is run this command or not 

npm install --global yarn```
brazen eagle
#

did you run that?

#

npm is baseline with node, and the two are mostly interoperable

#

as the config is pretty much the same

graceful ginkgo
#

any bash expert here

remote echo
#

A lot are, it would be better if you just ask your question

graceful ginkgo
#

this the question help me make this

#
{
read -p "Enter the IP: " IP
echo "The IP you are using $IP"
read -p "Enter the path to save Files : " PATH
echo "Selected Path : $PATH"
}

add_ip

ping $IP -c 1 | grep "1 received"

nmap = (nmap -sC -sV -p- -T4 -A -v $IP) 

sudo dirsearch -u $IP > $PATH/

nikto -url $IP -C all

sublist3r -d $IP

gobuster dir $IP -w /usr/share/wordlists/dirbuster/directory-list-lowercase-2.3-medium.txt```
#

making conditions is pain i'm good at reading but making is pain ๐Ÿ˜‹ ๐Ÿ˜…

#

i have so many ip's to scan if anybody can help me quickly ill be very thankful

dull tangle
#

have you heard of our lord and savior that is code blocks, wrap that monstrosity in ```

#

no put your code in ```

#
like this
granite agate
#

the very top left keypad thing

#

`

graceful ginkgo
#

ok

icy bobcat
#

If u don't wanna reinvent the bicycle

#

Tibs got u covered

graceful ginkgo
#

@icy bobcat bro i have to comment ever line the one i dont want

#

i use mostly these 6 tools and make the record

#

of mountain of IP's

#

then do it manually

icy bobcat
#

Then get comfy with ifs and functions in bash

graceful ginkgo
#

and thats the pain im talking about

#

bro

dull tangle
#

Ok so the main issue you're going to face doing it in bash

icy bobcat
#

There are like a million tutorials. You'll be fine

dull tangle
#

is you will hit one command, it will not progress until you get past that command

icy bobcat
#

Which might be a good thing

dull tangle
#

And this is where you learn about golang, the fantastic language that can solve this with ease and threading

icy bobcat
#

If it's a crazy fuzzer

graceful ginkgo
#

Yare Yare Daze

magic falcon
graceful ginkgo
#

Nope for my self

brazen eagle
#

I'd use a command line parameter for inputs like ip addresses

#

Instead of a prompt

#

Autorecon does a bit of magic based on what nmap finds, iirc

#

Great tool though

fleet tusk
onyx merlin
#

Allowing it to be used with pipes is also neat

brazen eagle
#

Yesh

fleet tusk
#

Agreed.

errant tartan
wispy kestrelBOT
#

Gave +1 Rep to @brazen eagle

brazen eagle
#

โค๏ธ

#

I use it less than I probably should, and more than I want...wait invert that

jagged agate
#

@everyone Anyone interested in solving project euler problems DM me...

brazen eagle
#

you don't need the everyone

inland hazel
#

well that is just the type of person they are

#

a person that tries to ping 87000+ people to have fun solving project euler problems

brazen eagle
#

too much math for me tonight

true crypt
#

๐Ÿ˜†

hoary scaffold
#

Anyone here good with python? struggling with an exercise

tidal panther
#

ask the question?

hoary scaffold
#

I did

#

oh...it didn't get posted

#

hold on

#

The exercise states Define an EXPECTED_BAKE_TIME constant that returns how many minutes the lasagna should bake in the oven. According to your cookbook, the Lasagna should be in the oven for 40 minutes. I do EXPECTED_BAKE_TIME = 40 and it says ImportError: cannot import name 'preparation_time_in_minutes' from 'lasagna' (.mnt.exercism-iteration.lasagna.py)

#

What am I overlooking?

tidal panther
#

where is it getting preparation time in minutes? whats your code look like?

magic falcon
#

you aren't defining the thing it's asking for

#

hint: look on line 23

hoary scaffold
#

wow well thats embarassing

magic falcon
#

no worries

tidal panther
#

ha ha

#

its alright

magic falcon
#

this is how looking at code always goes

tidal panther
#

it happens, trust me

magic falcon
#

you get stuck, ask for help, realize it's something trivial that's hanging you up.... welcome to the pain ๐Ÿ˜„

hoary scaffold
#

thanks for the help guys

magic falcon
#

it happens to everyone, no need to be embarrassed

#

i once spent 10 hours troubleshooting why a C++ class wasn't compiling

#

turned out to be a missing semicolon

hoary scaffold
#

lol

jolly dagger
jolly dagger
brazen eagle
#

Mostly to be safe

jolly dagger
#

yep right

brazen eagle
#

I've seem some projects work only with npm though

#

And others work only with yarn

jolly dagger
#

yeah actually project should be run on one only but i was just making clear for me that after installing yarn are we able to make projects with both package manager or just with the current installed one

#

like one project with yarn and another with npx so i think both should work without any issue

jolly dagger
# brazen eagle should be alright

okay can you please also help me with bootable drive i want to format it i forgot what software i used to make it bootable last time so i want to make it normal now so whats the process for it?

brazen eagle
#

I'm assuming that's a different beast, and might be a better job for google

jolly dagger
#

okay and have you used differentt OS like my machine is old actually i3 6th gen with 4gb ram 1tb hd and currently i'm using ubuntu but its better than windows but still got freeze alot as you know ubuntu is also not lighter now i'm confuse that should is use linux mint cinnamon flavour or XFCE the lightest version ?

brazen eagle
#

I'd say use what works ๐Ÿ™‚

jolly dagger
brazen eagle
#

I mean the 4 GB RAM is a bit light

#

it's probably the main bottleneck, so something like XFCE might not be a bad idea

graceful ginkgo
#

hey somebody tell me how can i make new dir and make separate files with different tools info in bash

#

-_-

#

๐Ÿ™„

warped axle
#

That is one confusing question

#

Can u elaborate with an example orr something?

#

What is different tools info supposed to mean?

graceful ginkgo
#

mkdir 10.10.10.10 > nmap.txt,nikto.txt etc.

true pumice
#

You would probably have to call each tool separately and just throw the output into the file?

graceful ginkgo
#

dm.

true pumice
#

mkdir $IP
nmap $IP > $IP/nmap.txt

#

I donโ€™t program bash, thatโ€™s just my best guess:)

graceful ginkgo
#

the main problem im having with path

#

lets see what can i do

brazen eagle
#

-oN

true pumice
#

Ah yeah, I type it every time and yet I still forget

edgy falcon
#

looking for some assistance on this python problem. question says Define an EXPECTED_BAKE_TIME constant that returns how many minutes the lasagna should bake in the oven. According to your cookbook, the Lasagna should be in the oven for 40 minutes: I put def EXPECTED_BAKE_TIME(): which gives me the error "ImportError: cannot import name 'bake_time_remaining' from 'lasagna' (.mnt.exercism-iteration.lasagna.py)"

narrow terraceBOT
onyx merlin
#

And is this a school assignment?

#

Also that's not how you define a constant in python.

edgy falcon
onyx merlin
#

What's the assignment/questions from?

edgy falcon
#

A website called exercism

onyx merlin
#

Ok. Research how to define a constant in python.

onyx merlin
edgy falcon
onyx merlin
#

So that was neither.

hoary scaffold
onyx merlin
#

def name(): is for functions.

hoary scaffold
#

yeah I know I've just been trying different things

#

also sorry for the confusion on the different profile switch its not intentional I have multiple browsers and apps open right now @onyx merlin

onyx merlin
alpine smelt
#

Hi ! Any of you aware of a way to retrieve UEFI boot order infos with either C# or powershell ? I'm at loss right now

alpine smelt
#

Yeah I tried this module and it doesn't work, I'll give it a try again but from what I read it was for an exercice and it might be that the dev isn't maintaining it

alpine smelt
rustic wadi
#

I see

#

what about Get-SecureBootUEFI?

alpine smelt
#

It only informs on the current booted session

#

It is a tricky problem I guess

graceful ginkgo
#

how do i cut short the nmap output

#

from this to this

solar dust
#

What exactly would be a good way of finding out an error within a tree to see if it actually is a valid tree?

pearl rock
#

@graceful ginkgo - what command are you using for the scan? What level of -v do you have?

#

for example if you are using -vv try -v instead

distant zenith
magic falcon
stark summit
#

PS: I do not want to use selenium for now

jolly dagger
#

hello guys zshrc editor how to open it?

#

please help

graceful ginkgo
distant zenith
graceful ginkgo
#

I want to short the output using cat or awk but I'm not good at it thats why i asked you guys to give hand here

distant zenith
#

echo "hi all foo bb" | cut -d " " -f 1

#

this will output "hi" as a result

#

echo "hi all foo bb" | cut -d " " -f 2
this will output "all" as a result

#

========================
echo "hi all foo bb" | cut -d " " -f 3
this will output "foo" as a result

graceful ginkgo
#

What about multiple lines

distant zenith
#

multi lines you can use awk for this is an example

graceful ginkgo
#

Don't give examples

#

Join me in dm

distant zenith
#

echo "welcome all TRY THIS another foo" | awk -F 'TRY THIS' '{print $2}'
this will print "another foo"

#

echo "welcome all TRY THIS another foo" | awk -F 'TRY THIS' '{print $1}'

this will print "welcome all"

distant zenith
lilac holly
still crescent
#

Hey peeps. I wrote a little 160 line python script for Linux that lets you scan for then take over the keyboard for a Roku device on the network. I don't know if this is the place to link it, but if anyone is interested in it and could give me feedback that would be dope! https://github.com/wsmaxcy/RokuTyper

GitHub

Fun Roku hack to take over search keyboard and type messages on Roku Device on your network - GitHub - wsmaxcy/RokuTyper: Fun Roku hack to take over search keyboard and type messages on Roku Device...

faint kite
#

Hi everyone, was doing the room on Escaping Vi Editor to get shell. the syntax was "sudo vi -c ':!/bin/sh' /dev/null" Can anyone explain why is it necessary to have /dev/null I think i have seen /dev/null in other shells and was wondering why we need to output stuff to null

true pumice
faint kite
wispy kestrelBOT
#

Gave +1 Rep to @true pumice

molten lance
#

Someone program in rust language?

rancid panther
#

anyone know c++?

lilac holly
#

If there is any questions behind it please ask it directly, don't ask to ask prayge

rancid panther
#
using namespace std;

int main () 
{
double numFirst;
double numSecond;

cout << "Please enter the first number" << endl;
cin >> numFirst >> endl;

cout << "Please enter the second number" << endl;
cin >> numSecond >> endl;
  
  
  return 0;
}```
#

why am i getting an error here?

magic falcon
#

What's the error you are getting?

lilac holly
#

I'm garbage at C++ so I won't be able to assist you further kekw

rancid panther
#

its a whole lot but this is the first one

#

ah i cant post images

#
      could not be resolved; did you mean to call it?
cin >> numFirst >> endl;```
magic falcon
#

So that makes sense. Have you looked at ifstream where cin resides? That will likely give you some deeper info on why it's breaking.

rancid panther
#

whats ifstream?

#

ah i got it lol im stupid

magic falcon
#

๐Ÿ™‚

solar hull
magic falcon
#

It's mixing operators

#

std::cin is an input stream, using << attempts to feed the std::endl into an output stream. The two categories of stream objects aren't compatible in that way.

lilac holly
narrow terraceBOT
lilac holly
#

Once you're verified you'll be able to

steel vigil
#

Hi boiz!
Suggestions to a python project on cyber security stuff? (e.g portscannerโ€ฆ)

tepid cargo
#

Jsconf coming to india!!

thin lynx
#

If anybody here familiar with Java/Kotlin for android
i need some help for my project (we can negotiate about terms of the work)
please dm me if you are interested

brazen eagle
#

am familiar, no I won't do your homework for you

bronze forum
#

hello can anyone help with my interviews program questions

raven hill
brazen eagle
#

yeah we aren't going to help you with interview questions, though the distribution of notes makes a simple algorithm optimal

raven hill
#

If you lack the skills to solve the interview challenge, then how are you going to perform the job, which is likely to be much harder?

#

There's literally 0 point to cheating.

brazen eagle
#

yup

raven hill
#

You're just digging yourself a nasty hole that you do not want to be in.

brazen eagle
#

also I suggest you properly read the instructions ๐Ÿ™‚

bronze forum
#

the job does not require this amount of coding at all. idk why they ask this

brazen eagle
#

because it's an algorithms question, not a coding question.

raven hill
#

That's not going to change my response. Your potential future employer is gauging your skill level for a reason

bronze forum
#

i can see how the function works but struggle to implement it

brazen eagle
#

sorry mate, won't help. And I'll mute any that does

raven hill
#

Keep in mind that some employers will still hire you if you're underskilled, and then train you. Don't cheat your interview challenge, it's going to make them think you don't need training and they're going to assign tasks to you that are above your skill level.

brazen eagle
#

you'll have to figure it out on your own. might steal that question for later though

#

I mean it's basic CS so

magic falcon
#

If you lack a compsci or math background, these questions may be out of your skillset. If that's the case, your best bet is to ask a lot of questions and show your thought path to approach this kind of question.

brazen eagle
#

in any case there are multiple possible solutions, some more optimal than others

magic falcon
#

both of those statements are true

#

remember that the naive brute force approach is always an option in algorithms questions. the question is just asking for a solution, not an optimal or approximately optimal solution

brazen eagle
#

yup

#

I mean I'd probably brute force first to make it work, then figure out the cute method

magic falcon
#

yeah

#

draw it up, do the complexity analysis, then optimize

brazen eagle
#

I had 2 ideas on how to do this right now, though both are variants on the same theme

magic falcon
#

it's a really common algorithms problem

brazen eagle
#

yes

magic falcon
#

it's been taught in a slightly different way in every DS&A class I've taken or been a TA for

brazen eagle
#

that's either a good thing, or infuriating

#

dunno if I'd do it in C at first though

tepid cargo
#

the recursive memoization explanation is easier to grasp.

brazen eagle
#

you're not helping

raven hill
#

No one should be helping honestly haaaha

tepid cargo
#

from the UI i believe it's hackerrank.

brazen eagle
#

could be

tepid cargo
brazen eagle
#

but as it's an interview question, we aren't helping

tepid cargo
#

aye aye cap

magic falcon
#

i would like to think that hydra and i weren't helping, we were halping ๐Ÿ˜„

brazen eagle
#

if they figured out what we were talking about from that, then they should be able to code the thing

tepid cargo
#

lol now i read the conversation after the image lmao

#

i saw the image and replied first.

brazen eagle
#

ye

tepid cargo
#

yeah sorry

brazen eagle
#

would you like your mute now or later? ๐Ÿ˜‰

tepid cargo
#

later pls pepehands

#

changed the msg kekw

brazen eagle
#

was about to nuke it but that works too

lilac holly
#

I created python program to perform various opration on array using if and elif to make it user intertactive but it exit after 1 input does not prompt again to perform another opration instead it exit

how i keep it running until user choose exit option

I know how to do it in other languages using switch but don't know in python
I m learning python

remote echo
#

Use while loop maybe?

magic falcon
#

If you are asking about a switch statement, that doesn't exist in python.

remote echo
#

*it does exist now

#

From python 3.10

magic falcon
#

oh snap. is that in any repos yet?

magic falcon
#

Yeah, I just read the official 3.10 changelog. It'll be interesting to see benchmarks of advanced match cases

wispy kestrelBOT
#

Gave +1 Rep to @magic falcon

lilac holly
wispy kestrelBOT
#

Gave +1 Rep to @remote echo

rustic wadi
#
# A simple example

while True:
    ask = input("blah?: ")
    if ask == "exit":
        exit_the_program
true pumice
#

Change exit_the_program to break?

rustic wadi
true pumice
#

Your example was simple :p

#

I was adding to your example

rustic wadi
#

๐Ÿ˜‰

true pumice
#

You understand where Iโ€™m coming from, right? :)

rustic wadi
#

Yeah ๐Ÿ˜›

#

pattern matching / switch case will be in python 3.10

#

definitely the best feature in 3.10

magic falcon
#

pattern matching is already in python. RE is already a library... You mean the syntax to support a switch(){ case ... } type of construct

onyx merlin
rustic wadi
thin lynx
#

guys does anybody knows any Discord server specific for Java Developers?

harsh lodge
#

I'm having a bit of an issue. I was wondering of perhaps someone here can help me out with that.
I'm trying to make a visual editor for some game (DayZ), which uses a lot of XML files. I felt like entering coordinates in text sucks as I have to teleport around the map, copy them down, tab into the text editor, enter them... the whole process takes forever.
There is a website where you can view an online map. The map is served as 256x256px images for various zoom settings. I made a python script to download the map images. Works fine.
I then made a winforms project in C# to stitch the map back together using Magick.Net (ImageMagick) and load that into a picturebox control. I wanted a drag and drop type control that slews the image by whatever amount the mouse moved while the mouse button is down.
The actual issue is that this slewing, while it works in principle, is very janky, jumping back and forth. I have no idea why that is.
I am using mouse events on the picture box itself for the slewing. On mouse down I set a boolan, on mouse up I reset it. On mouse move I update the coordinates of the viewport if the boolean is set.
Would someone be kind enough to have a look or maybe suggest how I can find out what goes wrong? The thing is that step by step debugging really doesn't work since the issue is sporadic. The picturebox generates many mouse move events and stepping through them all is really unfeasible.

Code available here: https://github.com/FalcoGer/DayZ-Editors
If you want to check it out, I recommend you remove all but one map from the json file in Assets/Maps/ so you don't download the whole 3GB image database. swansisland is the smallest since it only has 6 zoom settings.

GitHub

Various Editors for DayZ's XML files. Contribute to FalcoGer/DayZ-Editors development by creating an account on GitHub.

#

I already tried putting a lock statement inside every mouse event function and the update function which creates the new image.
it didn't have any effect on the bug so I removed them again.

harsh lodge
#

I'm going to bed. if anyone wants to help me, send me a DM. Good night

#

๐Ÿงบ๐ŸฆŠ๐Ÿ’ค

tepid cargo
# harsh lodge I'm going to bed. if anyone wants to help me, send me a DM. Good night

i have gone through some of the code.. specially dayzmapview.cs.. now i think the problem is timer and mousemove.

generally for draggin you update the view on the mousemove event. but u are not doing that instead it's delegated to the time tick with the updateNeeded flag.
i would suggest in time_tick check for slewing if it is false then do whatever u want and use the update() in the mousemove event.

#

tho i don't know if it will work tho kekw so

naive tartan
#

How important is learning SQL in order to perform SQLi attacks? Should i touch up on the basics of the language or do i just need to understand one or two things? Hope this question makes sense

onyx merlin
#

You ideally want to be able to query a database and interpret queries comfortably

harsh lodge
#

fixed it.

#

@tepid cargo the issue was with calculating the delta outside of slew from the mouse position. the viewport changes but the position of the mouse on the map doesn't. I don't know exactly what caused it but in my dreams i had the revelation that i should calculate the delta in the slew function and make it absolute rather than relative. and now it works. yay.

steel vigil
#

Hi, how can I list the ip address of every device in a network via python?

true pumice
#

Why?

steel vigil
#

cuz I need this to a project

#

i want to boardcast a message to every device in a network

true pumice
#

Why?

steel vigil
#

will you help me or not?

true pumice
#

I need to know your intentions:)

steel vigil
#

its for a final project of school

true pumice
#

Hmm, we usually don't help with school projects

steel vigil
#

so consider this as a standalone project that is not connected to the project of school

true pumice
#

Too late Shrug2

onyx merlin
steel vigil
#

I will make it one

brazen eagle
#

ICMP is a pain in the arse in python... I tried

magic falcon
#

Please just as k your question

tulip sail
#

If it's something you shouldn't be asking about (i.e. cheating) then we aren't helping in DMs either ๐Ÿคทโ€โ™‚๏ธ
If it's not sensitive, or is a generalised programming question then just post it here. Might help others down the line

thin lynx
#

Does anybody worked with Accessibility service in android? Does it just prompt for user permission granting or it just opens and let user decides with the options?

untold egret
#

hello, everyone. can anyone help me to understand what is logging in python??

brazen eagle
#

as in logging to file? logging to console? logging in general?

topaz charm
inland lance
#

Good day to all of you.
I'm using NodeJS crypto and PHP sodium but I encountered this error

Uncaught SodiumException: scalar and point must be SODIUM_CRYPTO_SCALARMULT_SCALARBYTES

This is my javascript Code

const { publicKey, privateKey } = generateKeyPairSync('x25519', {
   publicKeyEncoding: {
      type: 'spki',
      format: 'der'
   },
   privateKeyEncoding: {
      type: 'pkcs8',
      format: 'der'
   }
});

And this is my PHP, the value of $fromJavascript is the publicKey of Javascript I'm just pasting it as of now because I'm experimenting with different libraries.

$fromJavascript = "****";

$bob     = sodium_crypto_box_keypair();
$bobPB = sodium_crypto_box_publickey($bob);
$bobsharedKey = sodium_crypto_scalarmult(sodium_crypto_box_secretkey($bob), $fromJavascript);

Can you help me guys?

brazen eagle
#

is there an actual question in all that? not sure I follow exactly what you're trying to do here. Is there any specific error?

inland lance
brazen eagle
#

Then convert it?

inland lance
#

I tried converting it to base64, hex but it's the same error.

The docs says the sodium_crypto_box_keypair generate X25519 key pair which is the same with my javascript generateKeyPairSync

untold egret
#

what is threading in python?

onyx merlin
#

Pretty much the same as it is in any other language

untold egret
#

I don't have much experience with other programming languages

onyx merlin
#

Ok, it's best to learn the high level concept before starting with threading in Python

#

Threading is something I really wouldn't recommend for beginners

untold egret
#

๐Ÿ‘

shrewd oracle
#

hello someone can help me recover my password from my email please

onyx merlin
#

@shrewd oracle We don't do that here. Talk to the company

safe grotto
#

Need to retrieve extension version /ID of simplexml by phpinfo() function
Can anyone help with the syntax?

#

Doing rfi

covert stirrup
#

how can i add a start button to my game in js

magic falcon
#

How much do you know about web based applications?

covert stirrup
#

a fair bit

#

my issueis

#

the function i make comes as undefined

magic falcon
#

So that's not just adding a button. That's a different issue.

covert stirrup
#

but

#

i have the button

#

it just comes back as undefined

magic falcon
#

How does a client communicate to the server?

covert stirrup
#

the button on click trigers a function, which makes the button dissapear and the game start

magic falcon
#

Web applications are stateless.

covert stirrup
#

at game end it reappears

#

var character = document.getElementById("character");
var block = document.getElementById("block");
var counter = 0;
var start = 2

function jump() {
  if (character.classList == "animate") { return }
  character.classList.add("animate");
  setTimeout(function () {
    character.classList.remove("animate");
  }, 300);
}
document.addEventListener("keyup", event => {
  if(event.isComposing || event.keycode == 32) {
    jump()
  }
})
var checkDead = setInterval(function () {
  let characterTop = parseInt(window.getComputedStyle(character).getPropertyValue("top"));
  let blockLeft = parseInt(window.getComputedStyle(block).getPropertyValue("left"));
  if (blockLeft < 20 && blockLeft > -20 && characterTop >= 130) {
    block.style.animation = "none";
    alert("| Game Over | Score: " + Math.floor(counter / 100) + " |");
    counter = 0;
    block.style.animation = "block 1s infinite linear";
  } else {
    counter++;
    document.getElementById("scoreSpan").innerHTML = Math.floor(counter / 100);
  }
}, 10);

function start() {
  return;
}```
#

start() comes up as "not a function"

#

start comes up as undefined even thoughit has correct syta

#

syntax

frosty notch
onyx merlin
onyx merlin
frosty notch
onyx merlin
#

Yeah

#

But it's defined

frosty notch
#

Yeah but it returns nothing

onyx merlin
#

It returns undefined. It is not undefined.

#

This is why we need context.

#

The fact it does nothing is not important.

frosty notch
#

Try adding return 'define me'

onyx merlin
#

No, the return value of the function is undefined.
THE FUNCTION IS DEFINED.

#

But the function itself is undefined this is point-blank wrong

frosty notch
#

Sorry, I misunderstood

mystic oracle
#

salu a tous

covert stirrup
#

i figured it out

#

i had a function and a var both named start

#

so it came as undefined

brazen eagle
covert stirrup
#

yessir

#

how get vc perms

willow sluice
#

Hi, i need help with a python program. Nothing related to Hacking/scripts.

#

Please help.

warped axle
#

Just ask your question

autumn plover
#

Hey folks!
Sorry for asking a stupid question. I have an output like this:

https://www.mrc.org.pk/ [88.151.101.9]
I want to fetch only IP 88.151.101.9?
I know it can be done using regex but i'm not able to get this.
Thanks in advance

#

I'm using httpx for finding IP's
cat domain.txt | httpx -ip
but it gives me the output with URL I only want IP.

onyx merlin
wispy kestrelBOT
#

Gave +1 Rep to @onyx merlin

autumn plover
#

Does any one know a better tool than httprobe and httpx for finding live sites out of the list of subdomains.txt
I've used httprobe and httpx but i didn't get rich results. I only get 30,000 live sites out of 1.5 lac subdomains.
Or how to use httprobe and httpx more efficielty to get more results.
I've used the following commands:
httpx -l domains.txt -o live.txt
cat domain.txt | httprobe > live.txt

true current
#

anyone familiar with ios app development?

jolly dagger
#

Anyone here please help me to erase linux mint and install manjaro in system please

#

My system is showing different options than tutorial video

brazen eagle
#

Or query dns I guess

lilac holly
#

You just have to delete the partition where Mint is on and create a new one iirc

#

During the installation process

jolly dagger
#

one from the downloading page of manjaro and two three more

#

there is no media upload option in this server other wise i can put screenshots

lilac holly
#

!docs verify

narrow terraceBOT
lilac holly
#

Follow it then you'll be able to send ss

#

not so programming related

jolly dagger
#

ok

cursive orchid
#

are there any other built-in node modules than child_process we can use to run shell commands?

#

or does anyone know if express has any functions to run shell commands?

deft lava
#

hello i have a problem i made a program using c# and i want to make it anti-decompiled and i found confuserex on github i downloaded it but i dont know how to install it or run it can anyone please help me by tellimg me what to do or by sharing a video with me?/

true current
#

any code wars websites?

flint steeple
placid goblet
#

This is the lambda function
exports.handler = async (event, context) => {

console.log("Define Auth Challenge: " + JSON.stringify(event));

if (event.request.session &&
    event.request.session.find(attempt => attempt.challengeName !== 'CUSTOM_CHALLENGE')) {
    // We only accept custom challenges; fail auth
    event.response.issueTokens = false;
    event.response.failAuthentication = true;
} else if (event.request.session &&
    event.request.session.length >= 3 &&
    event.request.session.slice(-1)[0].challengeResult === false) {
    // The user provided a wrong answer 3 times; fail auth
    event.response.issueTokens = false;
    event.response.failAuthentication = true;
} else if (event.request.session &&
    event.request.session.length &&
    event.request.session.slice(-1)[0].challengeName === 'CUSTOM_CHALLENGE' &&
    event.request.session.slice(-1)[0].challengeResult === true) {
    // The user provided the right answer; succeed auth
    event.response.issueTokens = true;
    event.response.failAuthentication = false;
} else {
    // The user did not provide a correct answer yet; present challenge
    event.response.issueTokens = false;
    event.response.failAuthentication = false;
    event.response.challengeName = 'CUSTOM_CHALLENGE';
}

return event;

}

#

I am getting the following error

#

I created a rest api to the lambda function, but when I am trying to access the url, I am getting the above error

#

Could anyone help me resolving this issue

onyx merlin
#

Event.request is undefined

#

Also screenshots ree

placid goblet
#

Shall I sent another pic?

placid goblet
onyx merlin
#

No I cannot

#

Because I do not have the full context

#

And this seems like a CTF?

placid goblet
#

Basically I deployed the following git repo

#

It creates 6 lambda functions and 2 S3 buckets in our aws account

#

Now I need to create REST API to those 6 lambda functions, I created one REST API to one of the functions, then if I access the invoked url, I am getting that error

onyx merlin
#

Get confident first, them big projects

placid goblet
#

Only this part of my work is on JS, remaining work I completed in Py

onyx merlin
#

If you're not confident in JS, don't use JS.

placid goblet
#

ok

flint steeple
#

also use backticks in discord for code highlighting ๐Ÿ™‚

brazen eagle
brazen eagle
brazen eagle
flint steeple
#

yes that ^

onyx merlin
brazen eagle
#

you did

#

so did ben

placid goblet
brazen eagle
#

looks like it's something that's sent to your handler

placid goblet
#

Can I dm you, if you don't mind

brazen eagle
#

nah, I'm busy atm

placid goblet
#

Ok

#

I have 6 lambda functions. I need to create rest api to it, I created for one and tried to access the url

#

It gave that error

brazen eagle
#

so you said

#

good luck

tepid cargo
#

or u need event.json?

placid goblet
#

If it's ok for you, can I dm you ? @tepid cargo

tepid cargo
#

there is a very good chance that i will not be able to reply. so if u have questions put it here so that any one of us can reply. there are some highly highly (wayy more than me) experienced devs here like hydra or juun..

placid goblet
#

I have 6 lambda functions and few other resources in one lambda application. Can we create an API to the application, or do we need create api separately to all functions?

stone kayak
#

If your application is like:

Buy Food
* Count money (lambda 1)
* Calculate change (lambda 2)

You can certainly use one API to the application lambda which internally calls the other lambdas (you do not need an API-gateway to do this, you can use the step functions in lambda i believe)

placid goblet
#

Yes I want to create one api to the application instead of separately. Could you please tell me how to create for application

placid goblet
#

Please help me by telling how to create an API for application (which has lambda functions and S3 buckets in it)

proper void
#

when a function is called,its stack frame is set up,i want to know whether the return address of the function lies within the stack frame or outside?

brazen eagle
#

Within

proper void
brazen eagle
#

guess it depends on how you define the context of the stack frame

placid goblet
#

Can't we create an API to application directly similar to creating to single lambda function??

brazen eagle
#

normally yes? that's the point of a microservice, or any backend really

placid goblet
#

Means can we create an API to the lambda application

#

Instead of one api for each lambda function separately

brazen eagle
#

why not?

placid goblet
#

Can you say how

#

I got how to create separately

brazen eagle
#

it depends on your use case

#

you'll have to interface with the lambdas regardless

#

get the pen and paper out and draw out your use cases

#

it'll help define your architecture I think

placid goblet
#

The functionality is like, it's for face authentication. For signing in, the lambda function matches the user face with the one in S3 bucket. If sign-up, then the camera will take a photo and store it in one S3 buckets

#

1st bucket: Stores photos while logging in
2nd bucket: Stores photo while registering

brazen eagle
#

probably don't want to store the photo for login

#

and when registering you'll likely want to store some form of hash made from your key data points rather than the photo itself

#

regenerate that hash and compare those for login

placid goblet
#

Yup... But this is readymade git repo of Amazon. I deployed it. Now need to create rest api

brazen eagle
#

ah ok

placid goblet
#

So my task is to create api without modifying the functionality

brazen eagle
#

ok so you want something in front that'll call your lambdas while exposing an API for the end user, yes?

placid goblet
#

Yes

brazen eagle
#

I can see 2 use cases that you described: Login and Register

#

sounds like the beginnings of an API to me

#

are you constrained by language, as you'll have some code to write?

placid goblet
#

I am presently good at python and Java

#

For creating api for one lambda function, we can use api gateway in AWS console. So similarly can't we create api for lambda application using api gateway

brazen eagle
#

on the Java side I'd say use Spring Boot. not my favourite, but it's sufficiently well known to have lots of resources around. For python, anything based on Flask should be fine

placid goblet
#

Ok...will try

brazen eagle
#

if you want to have a bit of fun, Quarkus is an interesting new-ish framework

#

don't know how it integrates with Lamdba though, I assume you call an endpoint to call the function, yes?

placid goblet
#

Yes, the invoked url calls the function

brazen eagle
#

ok so you'll need a REST client

placid goblet
#

Yup

brazen eagle
#

both Spring and Quarkus provide one

placid goblet
#

Ok

brazen eagle
#

and for Python, requests is good

placid goblet
#

Thanks for your help friend ๐Ÿ˜ƒ, I will try that

brazen eagle
#

good hunting

placid goblet
#

๐Ÿ‘๐Ÿ˜ƒ

stone kayak
brazen eagle
#

Haha

#

Free shirts are fun

steel vigil
brazen eagle
#

So self promotion is generally frowned upon. That said, why is there an infinite busy-wait loop in your main?

steel vigil
#

yep i removed it

#

just old code

magic falcon
brazen eagle
#

something to look up

brazen eagle
#

poetry keeps eating dirt

proper void
#

i want to know the difference between buffer and stack,and the difference between buffer overflow and stack overflow, i tried searching it on google but there wasn't any satisfactory explanation.

magic falcon
#

This seems like a homework question.

tepid cargo
stone kayak
brazen eagle
#

Pycharm doesn't seem to like it either

#

I really need a linux box

onyx merlin
# proper void i want to know the difference between buffer and stack,and the difference betwee...

https://en.wikipedia.org/wiki/Stack_overflow
https://en.wikipedia.org/wiki/Buffer_overflow
I hate to do this, but reading even just the intro of each article will be a good start

In software, a stack overflow occurs if the call stack pointer exceeds the stack bound. The call stack may consist of a limited amount of address space, often determined at the start of the program. The size of the call stack depends on many factors, including the programming language, machine architecture, multi-threading, and amount of availab...

In information security and programming, a buffer overflow, or buffer overrun, is an anomaly where a program, while writing data to a buffer, overruns the buffer's boundary and overwrites adjacent memory locations.
Buffers are areas of memory set aside to hold data, often while moving it from one section of a program to another, or between progr...

cursive orchid
#

is it possible to screenshot a webpage in python without importing external libraries?

#

i can't seem to find anything

onyx merlin
#

You'd need some HTML renderer, or headless browser

tulip sail
#

^^^

onyx merlin
#

There are some good libs that make that simpler, I was reading about one earlier

tulip sail
#

Neither of which are inbuilt

cursive orchid
#

hmm oke